CraftTweaker

CraftTweaker

151M Downloads

[1.20.1] LootModifiers doesn't seems to work for entities

Bwapt opened this issue ยท 1 comments

commented

Issue description

Loot modifiers doesn't work for entities, entities won't drop any different loot than the based one.

Steps to reproduce

  1. Run Minecraft only with CraftTweaker (and Fabric ofc)
  2. Create a script to create a LootModifiers for entities
  3. /reload
  4. Kill a mob

Script used

https://pastebin.com/cvN9bCYB

The crafttweaker.log file

https://pastebin.com/S4iqAj0G

Minecraft version

1.20.1

Modloader

Fabric

Modloader version

0.14.22

CraftTweaker version

14.0.17

Other relevant information

I tried to modify the loot of a blaze, that is why I've first tried this :

<entitytype:minecraft:blaze>.addLootModifier("blaze_no_killed_by_player_condition", CommonLootModifiers.addWithChance(<item:minecraft:diamond> % 100));

But this didn't work, the blaze wasn't dropping anything new. That's why the admin Silk advised me to try with a global modifier (the script I pasted). This explained some things :

  • This is not a modpack incompatibility as I tried only with this mod
  • LootModifiers doesn't probably work only with entities as blocks are dropping.

The latest.log file

https://pastebin.com/Tc1AWbZR

commented

Close by eb8bc8c.