Jump to content

Please Help my Loot Tables aren't working [1.12.2]


slowfish_

Recommended Posts

I'm trying to modify the simple_dungeon loot table to add in my mod's loot, I tried to follow the Forge Documentation for modifying vanilla loot tables (https://docs.minecraftforge.net/en/1.12.x/items/loot_tables/#modifying-vanilla-loot)  but it's not working and I don't know what I'm doing wrong, please help. Here's my code

 

LootHandler.java

public class LootHandler 
{
    @SubscribeEvent
    public void lootLoad(LootTableLoadEvent evt) 
    {
        if (evt.getName().toString().equals("minecraft:chests/simple_dungeon")) 
        {
            
        }
    }
    
    private LootEntryTable getInjectEntry(String name, int weight)
    {
        return new LootEntryTable(new ResourceLocation("scorchingembers:inject/simple_dungeon"), weight, 0, new LootCondition[0], "scorchingembers_inject_entry");
    }

    private LootPool getInjectPool(String entryName) 
    {
        return new LootPool(new LootEntry[] { getInjectEntry(entryName, 1) }, new LootCondition[0], new RandomValueRange(1), new RandomValueRange(0, 1), "scorchingembers_inject_pool");
    }
    
}

 

simple_dungeon.json

{
    "pools":[
       {
          "name":"main",
          "rolls":1,
          "entries":[
             {
                "type":"item",
                "name":"scorchingembers:ember_crystalweave",
                "weight":10
             },
             {
                "type":"item",
                "name":"scorchingembers:alchemical_annihiliator",
                "weight":10
             },
             {
                "type":"empty",
                "weight":80
             }
          ]
       }
    ]
 }

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.