Started by
ShadZ
on
Topic category: Help with MCreator software
I tried to add functions to the custom loot table json (chest)
I took a look at the vanilla loot tables and tried to add:
- min and max stack size (count)
- entchanted gear and books
The problem is that after I added the specific section in the code the loot table stopped working. Everything worked fine before I changed the json file. Did I do something wrong? (edited json part down below)
Would be glad if someone knows the answer aka. my problem.
Function-count:
{
"type": "minecraft:item",
"weight": 100
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1,
"max": 3
}
}
],
"name": "minecraft:cobblestone",
},
Function-Enchantments:
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:enchant_with_levels",
"levels": 30,
"treasure": true
}
],
"name": "minecraft:book"
},
Edited by ShadZ on Thu, 03/26/2020 - 18:03
Hi there @ShadowzWalker, I've actually been trying to figure this out myself. I'm not much of a coder but I would like to see those two options available.
I'm currently working on a mod that edits the vanilla loot tables and adds my own stuff in them, but I read that a) mod loot tables override vanilla loot (kinda bad in my case) b) vanilla loot uses staked items and enchanted items (can't mod unless you use code)
Since your post was the only post I found that talks about this topic, maybe If we can get enough people to talk about this, the developers could add these options in a later update.
I'll look into coding to see if I could help you out, but If you find out a solution before me could you let me know. Thank you and thanks for posting!
Oh, and another thing I'm looking into is Item durability in loot tables, I'll let you know If I fin out how to do that as well.