I don't know what I'm doing wrong
Insane96 opened this issue ยท 1 comments
Description:
I've made pigs drop cooked meat when on fire but they drop cooked porkchop even when not
Version Info (Exact versions only):
LootTweaker: 0.0.7
CraftTweaker/Minetweaker: 4.1.5
Forge: 14.23.2.2618
Minecraft: 1.12.2
Script:
val pig = LootTables.getTable("minecraft:entities/pig");
mainPool = pig.getPool("main");
mainPool.removeEntry("minecraft:porkchop");
mainPool.addItemEntryHelper(<minecraft:porkchop>, 1, 0, [Functions.parse({"condition": 'entity_properties', "entity": 'this', "properties": {"minecraft:on_fire": true}, "function":'furnace_smelt'} as IData), Functions.setCount(1, 3), Functions.lootingEnchantBonus(-1, 2, 2000000)], []);
They do that because that furnace smelt function is written incorrectly. Functions take an array of conditions which has the key conditions
. You seem to have tried to merge a condition with a function, which won't work. Look at the pig loot table's porkchop entry to see how to do this correctly.