Adding Items to Vanilla Mob Loot

Started by slave2midn on

Topic category: Help with MCreator software

Last seen on 18:37, 1. Nov 2022
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?

Last seen on 00:43, 14. Jan 2023
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

Last seen on 05:05, 30. Oct 2022
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).

Last seen on 20:53, 18. Jan 2024
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