Topic category: Troubleshooting, bugs, and solutions
TLDR;
Loot tables for oak leaves and dark oak leaves do not function; oak and dark oak leaves always drop vanilla loot.
All other loot tables, including other block loot tables, function correctly
Current stable release functions correctly.
I am attempting to add a custom item to the loot tables of oak and dark oak trees. any time i create a loot table for oak or dark oak leaves, they are simply not used when testing the game. I even tried manually editing the dark oak loot table and loading it into the loot table element with direct code editing.
{ "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:alternatives", "children": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:alternative", "terms": [ { "condition": "minecraft:match_tool", "predicate": { "item": "minecraft:shears" } }, { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "minecraft:silk_touch", "levels": { "min": 1 } } ] } } ] } ], "name": "minecraft:dark_oak_leaves" }, { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:survives_explosion" }, { "condition": "minecraft:table_bonus", "enchantment": "minecraft:fortune", "chances": [ 0.05, 0.0625, 0.083333336, 0.1 ] } ], "name": "minecraft:dark_oak_sapling" } ] } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:table_bonus", "enchantment": "minecraft:fortune", "chances": [ 0.02, 0.022222223, 0.025, 0.033333335, 0.1 ] } ], "functions": [ { "function": "minecraft:set_count", "count": { "min": 1.0, "max": 2.0, "type": "minecraft:uniform" } }, { "function": "minecraft:explosion_decay" } ], "name": "minecraft:stick" } ], "conditions": [ { "condition": "minecraft:inverted", "term": { "condition": "minecraft:alternative", "terms": [ { "condition": "minecraft:match_tool", "predicate": { "item": "minecraft:shears" } }, { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "minecraft:silk_touch", "levels": { "min": 1 } } ] } } ] } } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:survives_explosion" }, { "condition": "minecraft:table_bonus", "enchantment": "minecraft:fortune", "chances": [ 0.005, 0.0055555557, 0.00625, 0.008333334, 0.025 ] } ], "name": "minecraft:apple" } ], "conditions": [ { "condition": "minecraft:inverted", "term": { "condition": "minecraft:alternative", "terms": [ { "condition": "minecraft:match_tool", "predicate": { "item": "minecraft:shears" } }, { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "minecraft:silk_touch", "levels": { "min": 1 } } ] } } ] } } ] }, { "rolls": 1, "entries": [ { "type": "minecraft:item", "conditions": [ { "condition": "minecraft:survives_explosion" }, { "condition": "minecraft:table_bonus", "enchantment": "minecraft:fortune", "chances": [ 0.005, 0.0055555557, 0.00625, 0.008333334, 0.025 ] } ], "name": "armor_balance:lemon" } ], "conditions": [ { "condition": "minecraft:inverted", "term": { "condition": "minecraft:alternative", "terms": [ { "condition": "minecraft:match_tool", "predicate": { "item": "minecraft:shears" } }, { "condition": "minecraft:match_tool", "predicate": { "enchantments": [ { "enchantment": "minecraft:silk_touch", "levels": { "min": 1 } } ] } } ] } } ] } ] }
entity loot tables and other block loot tables seem to function correctly.
in the last stable release, replacing the vanilla leaf loot table also seems to function correctly, so I'm not sure what could be preventing the loot table from being used.
This is a snapshot with bugs.
Thx for code. :)
I just was searching in internet for loot table file so I can make vanilla like loot for leaves.