[Tutorial] How to make items / blocks from other mods spawn in the loot tables of your mod

Started by The_librarian on

Topic category: User side tutorials

[Tutorial] How to make items / blocks from other mods spawn in the loot tables of your mod
Sat, 09/11/2021 - 13:36 (edited)

Hi, ever wished that something of another mod could be obtainable from yours through the loot but you didn't know how to do it? Well, I have the solution for you, you will just have to follow my steps.

 

Warning: in this tutorial I will assume that you knows how to make a loot table using mcreator

 

1) first you will need to get the id of the object / block you want to get. It must be like: mod id: item id. Then download the Rasa_Novum's Mod Checker plugin for mcreator

2) create your custom loot table and names it as you want, but dont put in the name block,chest, ecc. /

3) put a vanilla item in the box where you want the item to spawn with weight ecc.

4) lock the code of the loot table and copy the .json file

5) create a new loot table and lock the code

7) clear all and paste the code from the other loot table

8) change the vanilla item in the text with the mod item. It must be like this:

 "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "modid:moditemid",
          "weight": 1,
          "functions": [
            {
              "function": "set_count",
              "count": {
                "min": 1,
                "max": 1
              }
            },
            {
              "function": "minecraft:explosion_decay"

9) save the code 

10) create a procedure with a trigger you want (when a entity dies, a block is broken)

11) put the procedure "execute command at" and put this command: loot spawn ~ ~ ~ loot yourmodid:loottablename. Then put a if procedure with a mod id checker. It must be like this:

.

12) change wobr with the id of the mod you want (ignore achievement procedure)

I hope this tutorial was helpful to you. If you have any questions, please write in the forum.

Edited by The_librarian on Sat, 09/11/2021 - 13:36
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
haha 911
Mon, 04/11/2022 - 21:36

haha 911

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, have you working link on…
Wed, 04/05/2023 - 17:10

Hi, have you working link on Mod Checker plugin?