Started by
Radikid
on
Topic category: Help with Minecraft modding (Java Edition)
I looked for a way to make my mob only drop items when it was killed by the player, but I couldn't figure out how to do this. Does anyone have any ideas or know if this is even possible? It would be even better if I could trigger a loot table when an entity dies but only when a player kills it. My entities are hostile to each other normally and I don't want the act of them killing each other to litter the ground with free items.
Thanks!
You could make a procedure "When entity dies", then it checks if the source entity is player type, and if it is, then it'll just drop the items you want it to drop.
Sorry to "excavate" this old thread, but this is exact the problem I'm just stuck at: all I want is a global rule, that Mobs / entitites only drop loot according to their respective loot tables, when they are killed by a player (global anti-auto-farm control).
I found this :
but I'm struggling at the "do", how to link to the respective loot table of the entity ?
Any hint would be much appreciated !
cheers !
picture link didn't work, this is the procedure so far: