How to add into an existing loot table?

Started by Ali107 on

Topic category: Help with modding (Java Edition)

Last seen on 23:20, 19. Apr 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to add into an existing loot table?

How do I add extra items that are rare into an existing vanilla loot table without removing all the other items?

Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Find the original loot table…
Thu, 07/07/2022 - 22:54

Find the original loot table json file in: <your minecraft version>.jar \ data \ minecraft \ loot_tables \ XXX \  XXX.json

Open this file with a text editor and copy the contents.

Make a new loot table in mcreator.

Set the namespace to minecraft and the type to the appropriate type.

Set the Loot table registry name to match the original file.

Save, then open with the code editor.

Paste in the original loot table data over whatever is in the new file.

Save and Lock. 

 

You can now code edit this copy of the original loot table and insert your new item manually.

Last seen on 23:20, 19. Apr 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for the help!  But…
Fri, 07/08/2022 - 14:24

Thanks for the help! 

But won't this make it not compatible with other mods if they try to add stuff in the same loot table?

Last seen on 05:05, 30. Oct 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's the nature of the beast…
Fri, 07/08/2022 - 21:04

It's the nature of the beast, the game will use whichever loot table is loaded last.  

Last seen on 10:29, 24. Sep 2023
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I do this, but when I load…
Sun, 08/13/2023 - 06:29

I do this, but when I load up minecraft and open chests in a desert temple, its empty? Should I keep everything the same except for the loot table entry? I changed the number of rolls at the end and I changed minecraft:item to mod:item.

Last seen on 23:20, 19. Apr 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So the only option is to…
Sun, 08/13/2023 - 17:16

So the only option is to copy the existing loot table and add whatever I like.

Last seen on 10:29, 24. Sep 2023
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did everything the…
Tue, 08/15/2023 - 15:54

I did everything the tutorial said but only desert temple works, all other structures only have minecraft loot, but not my custom item. Why is that? What is wrong? I tried increasing weight, didn't help.

Last seen on 10:29, 24. Sep 2023
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did everything the…
Fri, 08/18/2023 - 17:04

I did everything the tutorial said but only desert temple works, all other structures only have minecraft loot, but not my custom item. Why is that? What is wrong? I tried increasing weight, didn't help.

Last seen on 10:29, 24. Sep 2023
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Will someone please answer…
Fri, 08/18/2023 - 17:46

Will someone please answer me/help me?

Last seen on 22:47, 25. Mar 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When I followed the tutorial…
Thu, 02/29/2024 - 19:35

When I followed the tutorial up above, I got vanilla items to appear in the chests, but when I added my own custom ones, the chest appeared to be blank. I then tried it with a new thing, but instead of having it ticked to "minecraft", I had it on "mod" and when I did that, it started to appear. So i came to the conclusion that you can't add custom items to already existing loot tables in the vanilla game.