[Solved] Can't hammer some copper ingots.

  • I have four mods that add copper ingots:

    Arcana RPG,

    Soul Forest,

    End Ores,

    and IC2 itself...


    The new copper ingot from the End Ores mod can be smashed. But the other two, from Arcana RPG & Soul Forest, can't.


    I tried registering them as ingotCopper but that didn't work.

    Java: Class.java
    if(Loader.isModLoaded("gibby_dungeons")) { //Arcana RPG
        OreDictionary.registerOre("ingotCopper", new ItemStack(GameRegistry.findBlock("gibby_dungeons", "dungeons_copper")));
    }
    
    if(Loader.isModLoaded("soulforest")) { //Soul Forest
        OreDictionary.registerOre("ingotCopper", new ItemStack(GameRegistry.findBlock("soulforest", "Copperingot")));
    }

    How can I get ingots from other mods to be smashed with a hammer? How does End Ores do it?


    MC-1.7.10

  • I'm registering them at the FMLInitializationEvent

    Like this:

    Java
    public void init(FMLInitializationEvent event)
        {
            initOreDict();
        }
    
    public static void initOreDict() {
        if(Loader.isModLoaded("gibby_dungeons")) {
                OreDictionary.registerOre("ingotCopper", new ItemStack(GameRegistry.findBlock("gibby_dungeons", "dungeons_copper")));
            }
    }
  • I tried,

    System.out.println("ITEMSTACK OUT >> "+ new ItemStack(GameRegistry.findBlock("soulforest", "Copperingot")).getUnlocalizedName());

    and also,

    System.out.println("ITEMSTACK OUT >> "+ new ItemStack(GameRegistry.findBlock("soulforest", "Copperingot")));

    And it crashed both times:

    Does that mean that the stack is empty?

    I also tried it at FMLPostInitializationEvent instead of FMLInitializationEvent and that didn't work.

  • Aha! I found something interesting...