Conditional Loot Table Replacement

Started by Tamasho on Sat, 07/31/2021 - 23:06

Topic category: Help with modding (Java Edition)

Last seen on 01:33, 2. Aug 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Conditional Loot Table Replacement
Sat, 07/31/2021 - 23:06

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)