Adding Items to Vanilla Mob Loot

Started by slave2midn on

Topic category: Help with MCreator software

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Adding Items to Vanilla Mob Loot

Hey All!

This forum has been super helpful, and I thank everyone for contributing. I wanted to add a feature to my mod that allows certain mobs-namely Zombies & Skeletons to drop an Emerald as a chance drop. However, I don't want to modify or alter vanilla loot tables for the mobs in question.

I know I can make a loot table for a MC mod, and then add the emerald to the table list-but my question was does this OVERIDE the entire loot table of the mob? Or does it simply add to it?

Should I replicate the mobs loot table from MC wiki and then incorporate my item? Or is there a means of just adding an item to the mobs loot table and keeping its traditional loot drops?

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It just adds to it im pretty…
Sun, 05/29/2022 - 00:32

It just adds to it im pretty sure. Not entirely overriding

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It overrides. What you can…
Sun, 05/29/2022 - 14:55

It overrides.

What you can do is make a new loot table entry, you can leave it empty.  Open the vanilla Minecraft jar and find the loot table of the mob in question.  Open this file, select and copy all text. Go back to your new loot table and open it with the code editor.  Overwrite everything with the vanilla code.  Now, code in the edits you want to make then save and lock.

This keeps all the vanilla drop chances without needing to recreate them from scratch as well as any special code that Mcreator doesn't cover (like cooked meat dropping from burning cows).

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
U just go to procedures,…
Thu, 01/11/2024 - 09:49

U just go to procedures, then add the global trigger, entity dies

Then add if entitiy sub type(the entity u want to drop stuff) = true

Then spawn gem on it