Conditional Loot Table Replacement

Started by Tamasho on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Conditional Loot Table Replacement

I want to replace vanilla mobs` loot tables ONLY when i kill them a certain way, i mean, i want a cow to drop a custom item i made called infected meat instead of raw beef only when i kill the cow by feeding it another custom item i made, along with the leather it would normally drop. I tried by despawning the entity using the "entity dies" procedure and then just dropping the infected meat and leather but it just looks weird as it doesn´t normally die but just disappears. I made a logic NBT tag called "mobInfected" that i think would be useful but i just don´t know what to do next. (I already did the feeding mechanic, i just need help with the drop replacement part)