Minecraft Version
1.20.1
Mod Version
2.13.1
Describe the bug!
Essentially, when using .matchMainHand for entity loot modifiers, the code doesn't work for modded weapons. Example:
This works, and makes a chicken drop a diamond when killed with a diamond sword.
LootJS.modifiers((event) => {
event.addEntityLootModifier("minecraft:chicken").matchMainHand("minecraft:diamond_sword")
.addLoot("minecraft:diamond")
});
This also works, and makes the o_horse drop a diamond when killed with a diamond sword.
LootJS.modifiers((event) => {
event.addEntityLootModifier("dragnlivestock:o_horse").matchMainHand("minecraft:diamond_sword")
.addLoot("minecraft:diamond")
});
This, however, does not work. The o_horse drops nothing.
LootJS.modifiers((event) => {
event.addEntityLootModifier("dragnlivestock:o_horse").matchMainHand("butchery:bone_cleaver")
.addLoot("minecraft:diamond")
});
I also tried it with the Farmer's Delight netherite knife instead of the bone cleaver, and it also didn't work. The KubeJS server log doesn't show any error, nor does it error on reload.
Crash Report
No response
Log
No response
Additions and Modifications
No
Additions and Modifications Description
No response
Did the issue happen in singleplayer or on a server?
Both
Minecraft Version
1.20.1
Mod Version
2.13.1
Describe the bug!
Essentially, when using .matchMainHand for entity loot modifiers, the code doesn't work for modded weapons. Example:
This works, and makes a chicken drop a diamond when killed with a diamond sword.
This also works, and makes the o_horse drop a diamond when killed with a diamond sword.
This, however, does not work. The o_horse drops nothing.
I also tried it with the Farmer's Delight netherite knife instead of the bone cleaver, and it also didn't work. The KubeJS server log doesn't show any error, nor does it error on reload.
Crash Report
No response
Log
No response
Additions and Modifications
No
Additions and Modifications Description
No response
Did the issue happen in singleplayer or on a server?
Both