• 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Quote from IX iTzRogue XI

    In your mod_Blocks you have the ID of some blocks above 256, which is the limit for block IDs.


    Hey thanks a lot! That fixed ALL of my errors.
    I had no idea about the 256 limit, thanks again!

    +1 reputation to you, kind sir.
    :laugh.gif:
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Quote from IX iTzRogue XI

    Might be because all of sudden you started putting .shiftedIndex at the end of some items in your recipes inside mod_Tools.


    Thanks, that was the problem. But, after I fixed that, I got a few more errors and fixed those, but now i'm getting this. I looked at my code and I can't figure this out for the life of me.


    Mods loaded: 2
    ModLoader Beta 1.8.1
    net.minecraft.src.mod_Armor 3.14159265

    Minecraft has crashed!
    ----------------------

    Minecraft has stopped running because it encountered a problem.

    If you wish to report this, please copy this entire text and email it to [email protected]
    Please include a description of what you did when the error occured.



    --- BEGIN ERROR REPORT 4f045195 --------
    Generated 10/10/11 4:05 PM

    Minecraft: Minecraft Beta 1.8.1
    OS: Windows 7 (x86) version 6.1
    Java: 1.6.0_26, Sun Microsystems Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: ATI Radeon HD 5450 version 2.1.9029, ATI Technologies Inc.

    java.lang.ExceptionInInitializerError
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at net.minecraft.src.ModLoader.addMod(ModLoader.java:224)
    at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
    at net.minecraft.src.ModLoader.init(ModLoader.java:692)
    at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
    at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
    at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
    at net.minecraft.client.Minecraft.run(Minecraft.java:438)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 5005
    at net.minecraft.src.Block.<init>(Block.java:48)
    at net.minecraft.src.Block.<init>(Block.java:77)
    at net.minecraft.src.BlockTitaniumOre.<init>(BlockTitaniumOre.java:8)
    at net.minecraft.src.mod_Blocks.<clinit>(mod_Blocks.java:6)
    ... 15 more
    --- END ERROR REPORT 8ab6df97 ----------


    If you could help me out again, it would be VERY much appreciated. :laugh.gif:


    Here is mod_, if you need to look at all the other stuff let me know.



    [code]
    package net.minecraft.src;
    import java.util.Random;

    public class mod_Tools extends BaseMod
    {
    public static final Item TitaniumPickaxe = new ItemPickaxe(5000,EnumToolMaterial.TITANIUM).setItemName("TitaniumPickaxe");
    public static final Item TitaniumShovel = new ItemSpade(5001,EnumToolMaterial.TITANIUM).setItemName("TitaniumShovel");
    public static final Item TitaniumSword = new ItemSword(5002,EnumToolMaterial.TITANIUM).setItemName("TitaniumSword");
    public static final Item TitaniumAxe = new ItemAxe(5003,EnumToolMaterial.TITANIUM).setItemName("TitaniumAxe");
    public static final Item TitaniumHoe = new ItemHoe(5004,EnumToolMaterial.TITANIUM).setItemName("TitaniumHoe");
    public static final Item MeteoritePickaxe = new ItemPickaxe(5040, EnumToolMaterial.METEORITE).setItemName("MeteoritePickaxe");
    public static final Item MeteoriteShovel = new ItemSpade(5041, EnumToolMaterial.METEORITE).setItemName("MeteoriteShovel");
    public static final Item MeteoriteSword = new ItemSword(5042, EnumToolMaterial.METEORITE).setItemName("MeteoriteSword");
    public static final Item MeteoriteAxe = new ItemAxe(5043, EnumToolMaterial.METEORITE).setItemName("MeteoriteAxe");
    public static final Item MeteoriteHoe = new ItemHoe(5044, EnumToolMaterial.METEORITE).setItemName("MeteoriteHoe");
    public static final Item AntiMatterPickaxe = new ItemPickaxe(6000, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
    public static final Item AntiMatterShovel = new ItemSpade(6001, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterShovel");
    public static final Item AntiMatterSword = new ItemSword(6002, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterSword");
    public static final Item AntiMatterAxe = new ItemAxe(6003, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterAxe");
    public static final Item AntiMatterHoe = new ItemHoe(6004, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterHoe");
    public static final Item AntiMatterPaxel = new ItemPaxel(6011, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPaxel");

    public mod_Tools()
    {
    TitaniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumPickaxe.png");
    TitaniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumShovel.png");
    TitaniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumSword.png");
    TitaniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumAxe.png");
    TitaniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumHoe.png");
    MeteoritePickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoritePickaxe.png");
    MeteoriteShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteShovel.png");
    MeteoriteSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteSword.png");
    MeteoriteAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteAxe.png");
    MeteoriteHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteHoe.png");
    AntiMatterPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterPickaxe.png");
    AntiMatterShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterShovel.png");
    AntiMatterSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterSword.png");
    AntiMatterAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterAxe.png");
    AntiMatterHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterHoe.png");
    AntiMatterPaxel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterPaxel.png");


    ModLoader.AddName(TitaniumPickaxe, "Titanium Pickaxe");
    ModLoader.AddName(TitaniumShovel, "Titanium Shovel");
    ModLoader.AddName(TitaniumSword, "Titanium Sword");
    ModLoader.AddName(TitaniumAxe, "Titanium Axe");
    ModLoader.AddName(TitaniumHoe, "Titanium Hoe");
    ModLoader.AddName(MeteoritePickaxe, "Meteorite Pickaxe");
    ModLoader.AddName(MeteoriteShovel, "Meteorite Shovel");
    ModLoader.AddName(MeteoriteSword, "Meteorite Sword");
    ModLoader.AddName(MeteoriteAxe, "Meteorite Axe");
    ModLoader.AddName(MeteoriteHoe, "Meteorite Hoe");
    ModLoader.AddName(AntiMatterPickaxe, "Anti-Matter Pickaxe");
    ModLoader.AddName(AntiMatterShovel, "Anti-Matter Shovel");
    ModLoader.AddName(AntiMatterSword, "Anti-Matter Sword");
    ModLoader.AddName(AntiMatterAxe, "Anti-Matter Axe");
    ModLoader.AddName(AntiMatterHoe, "Anti-Matter Hoe");
    ModLoader.AddName(AntiMatterPaxel, "Anti-Matter Paxel");

    ModLoader.AddRecipe(new ItemStack(TitaniumPickaxe, 1), new Object[] {
    "XXX", " S ", " S ", Character.valueOf('X'), mod_Items.TitaniumIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(TitaniumShovel, 1), new Object[] {
    " X ", " S ", " S ", Character.valueOf('X'), mod_Items.TitaniumIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(TitaniumSword, 1), new Object[] {
    " X ", " X ", " S ", Character.valueOf('X'), mod_Items.TitaniumIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(TitaniumAxe, 1), new Object[] {
    "XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.TitaniumIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(TitaniumHoe, 1), new Object[] {
    "XX ", " S ", " S ", Character.valueOf('X'), mod_Items.TitaniumIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(MeteoritePickaxe, 1), new Object[] {
    "XXX", " S ", " S ", Character.valueOf('X'), mod_Items.MeteoriteIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(MeteoriteShovel, 1), new Object[] {
    " X ", " S ", " S ", Character.valueOf('X'), mod_Items.MeteoriteIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(MeteoriteSword, 1), new Object[] {
    " X ", " X ", " S ", Character.valueOf('X'), mod_Items.MeteoriteIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(MeteoriteAxe, 1), new Object[] {
    "XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.MeteoriteIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(MeteoriteHoe, 1), new Object[] {
    "XX ", " S ", " S ", Character.valueOf('X'), mod_Items.MeteoriteIngot, Character.valueOf('S'), Item.stick
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterPickaxe, 1), new Object[] {
    "XXX", " D ", " D ", Character.valueOf('X'), mod_Items.AntiMatter, Character.valueOf('D'), mod_Items.DiamondRod
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterShovel, 1), new Object[] {
    " X ", " D ", " D ", Character.valueOf('X'), mod_Items.AntiMatter, Character.valueOf('D'), mod_Items.DiamondRod
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterSword, 1), new Object[] {
    " X ", " X ", " D ", Character.valueOf('X'), mod_Items.AntiMatter, Character.valueOf('D'), mod_Items.DiamondRod
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterAxe, 1), new Object[] {
    "XX ", "XD ", " D ", Character.valueOf('X'), mod_Items.AntiMatter, Character.valueOf('D'), mod_Items.DiamondRod
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterHoe, 1), new Object[] {
    "XX ", " D ", " D ", Character.valueOf('X'), mod_Items.AntiMatter, Character.valueOf('D'), mod_Items.DiamondRod
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterPaxel, 1), new Object[] {
    "PAS", " D ", " D ", Character.valueOf('P'), mod_Tools.AntiMatterPickaxe, Character.valueOf('S'), mod_Tools.AntiMatterShovel, Character.valueOf('A'), mod_Tools.AntiMatterAxe, Character.valueOf('D'), mod_Items.DiamondRod
    });


    }

    public String Version()
    {
    return "3.14159265";
    }
    }
    [code]

    [code]
    package net.minecraft.src;
    import java.util.Random;

    public class mod_Items extends BaseMod
    {
    public static final Item TitaniumIngot = new ItemTitaniumIngot(5006).setItemName("TitaniumIngot");
    public static final Item MeteoriteIngot = new ItemMeteoriteIngot(5046).setItemName("MeteoriteIngot");
    public static final Item AntiMatter = new ItemAntiMatter(6005).setItemName("AntiMatter");
    public static final Item DiamondRod = new ItemDiamondRod(6050).setItemName("DiamondRod");

    public mod_Items()
    {
    TitaniumIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Ore/Titanium/TitaniumIngot.png");
    MeteoriteIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Ore/Meteorite/MeteoriteIngot.png");
    AntiMatter.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Ore/AntiMatter/AntiMatter.png");
    DiamondRod.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Items/DiamondRod.png");

    ModLoader.AddName(TitaniumIngot, "Titanium Ingot");
    ModLoader.AddName(MeteoriteIngot, "Meteorite Ingot");
    ModLoader.AddName(AntiMatter, "Anti-Matter Gem");
    ModLoader.AddName(DiamondRod, "Diamond Rod");

    }

    public String Version()
    {
    return "3.14159265";
    }
    }
    [code]

    [code]
    package net.minecraft.src;
    import java.util.Random;

    public class mod_Blocks extends BaseMod
    {
    public static final Block oreTitanium = new BlockTitaniumOre(5005, 0).setHardness(4F).setResistance(10F).setBlockName("TitaniumOre");
    public static final Block oreMeteorite = new BlockMeteorite(5045, 0).setHardness(5F).setResistance(30F).setLightValue(2.5F).setBlockName("MeteoriteOre");
    public static final Block oreAntiMatter = new BlockAntiMatter(6006, 0).setHardness(9F).setResistance(80F).setBlockName("AntiMatterOre");


    public mod_Blocks()
    {
    ModLoader.RegisterBlock(oreTitanium);
    ModLoader.RegisterBlock(oreMeteorite);
    ModLoader.RegisterBlock(oreAntiMatter);

    oreTitanium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/Titanium/TitaniumOre.png");
    oreMeteorite.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/Meteorite/MeteoriteOre.png");
    oreAntiMatter.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/AntiMatter/AntiMatterBlock.png");

    ModLoader.AddName(oreTitanium, "Titanium Ore");
    ModLoader.AddName(oreMeteorite, "Meteorite");
    ModLoader.AddName(oreAntiMatter, "Anti-Matter");

    ModLoader.AddSmelting(mod_Blocks.oreTitanium.blockID, new ItemStack (mod_Items.TitaniumIngot, 1));
    ModLoader.AddSmelting(mod_Blocks.oreMeteorite.blockID, new ItemStack (mod_Items.MeteoriteIngot, 1));
    }

    public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
    {
    for (int i=0; i < 1; i++)
    {
    int randPosX = chunkX + rand.nextInt(6);
    int randPosY = rand.nextInt(64);
    int randPosZ = chunkZ + rand.nextInt(6);
    (new WorldGenMinable(oreTitanium.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
    }

    }



    public String Version()
    {
    return "3.14159265";
    }
    }
    [code]

    [code]
    package net.minecraft.src;
    import java.util.Random;

    public class mod_Armor extends BaseMod
    {
    public static final Item TitaniumHelmet = (new ItemArmor(5007, 4, 5, 3).setItemName("TitaniumHelmet"));
    public static final Item TitaniumChestplate = (new ItemArmor(5008, 4, 5, 1).setItemName("TitaniumChestplate"));
    public static final Item TitaniumLeggings = (new ItemArmor(5009, 4, 5, 2).setItemName("TitaniumLeggings"));
    public static final Item TitaniumBoots = (new ItemArmor(5010, 4, 5, 0).setItemName("TitaniumBoots"));
    public static final Item MeteoriteHelmet = (new ItemArmor(5047, 5, 6, 3).setItemName("MeteoriteHelmet"));
    public static final Item MeteoriteChestplate = (new ItemArmor(5048, 5, 6, 1).setItemName("MeteoriteChestplate"));
    public static final Item MeteoriteLeggings = (new ItemArmor(5049, 5, 6, 2).setItemName("MeteoriteLeggings"));
    public static final Item MeteoriteBoots = (new ItemArmor(5050, 5, 6, 0).setItemName("MeteoriteBoots"));
    public static final Item AntiMatterHelmet = (new ItemArmor(6007, 20, 7, 3).setItemName("AntiMatterHelmet"));
    public static final Item AntiMatterChestplate = (new ItemArmor(6008, 20, 7, 1).setItemName("AntiMatterChestplate"));
    public static final Item AntiMatterLeggings = (new ItemArmor(6009, 20, 7, 2).setItemName("AntiMatterLeggings"));
    public static final Item AntiMatterBoots = (new ItemArmor(6010, 20, 7, 0).setItemName("AntiMatterBoots"));

    public mod_Armor()
    {
    TitaniumHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumHelmet.png");
    TitaniumChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumChestplate.png");
    TitaniumLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumLeggings.png");
    TitaniumBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumBoots.png");
    MeteoriteHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteHelmet.png");
    MeteoriteChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteChestplate.png");
    MeteoriteLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteLeggings.png");
    MeteoriteBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteBoots.png");
    AntiMatterHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterHelmet.png");
    AntiMatterChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterChestplate.png");
    AntiMatterLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterLeggings.png");
    AntiMatterBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterBoots.png");




    ModLoader.AddRecipe(new ItemStack(TitaniumHelmet, 1), new Object [] {
    "XXX", "X X", Character.valueOf('X'), mod_Items.TitaniumIngot
    });
    ModLoader.AddRecipe(new ItemStack(TitaniumChestplate, 1), new Object [] {
    "X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.TitaniumIngot
    });
    ModLoader.AddRecipe(new ItemStack(TitaniumLeggings, 1), new Object [] {
    "XXX", "X X", "X X", Character.valueOf('X'), mod_Items.TitaniumIngot
    });
    ModLoader.AddRecipe(new ItemStack(TitaniumBoots, 1), new Object [] {
    "X X", "X X", Character.valueOf('X'), mod_Items.TitaniumIngot
    });
    ModLoader.AddRecipe(new ItemStack(MeteoriteHelmet, 1), new Object [] {
    "XXX", "X X", Character.valueOf('X'), mod_Items.MeteoriteIngot
    });
    ModLoader.AddRecipe(new ItemStack(MeteoriteChestplate, 1), new Object [] {
    "X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.MeteoriteIngot
    });
    ModLoader.AddRecipe(new ItemStack(MeteoriteLeggings, 1), new Object [] {
    "XXX", "X X", "X X", Character.valueOf('X'), mod_Items.MeteoriteIngot
    });
    ModLoader.AddRecipe(new ItemStack(MeteoriteBoots, 1), new Object [] {
    "X X", "X X", Character.valueOf('X'), mod_Items.MeteoriteIngot
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterHelmet, 1), new Object [] {
    "XXX", "X X", Character.valueOf('X'), mod_Items.AntiMatter
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterChestplate, 1), new Object [] {
    "X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.AntiMatter
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterLeggings, 1), new Object [] {
    "XXX", "X X", "X X", Character.valueOf('X'), mod_Items.AntiMatter
    });
    ModLoader.AddRecipe(new ItemStack(AntiMatterBoots, 1), new Object [] {
    "X X", "X X", Character.valueOf('X'), mod_Items.AntiMatter
    });

    ModLoader.AddName(TitaniumHelmet, "Titanium Helmet");
    ModLoader.AddName(TitaniumChestplate, "Titanium Chestplate");
    ModLoader.AddName(TitaniumLeggings, "Titanium Leggings");
    ModLoader.AddName(TitaniumBoots, "Titanium Boots");
    ModLoader.AddName(MeteoriteHelmet, "Meteorite Helmet");
    ModLoader.AddName(MeteoriteChestplate, "Meteorite Chestplate");
    ModLoader.AddName(MeteoriteLeggings, "Meteorite Leggings");
    ModLoader.AddName(MeteoriteBoots, "Meteorite Boots");
    ModLoader.AddName(AntiMatterHelmet, "Anti-Matter Helmet");
    ModLoader.AddName(AntiMatterChestplate, "Anti-Matter Chestplate");
    ModLoader.AddName(AntiMatterLeggings, "Anti-Matter Leggings");
    ModLoader.AddName(AntiMatterBoots, "Anti-Matter Boots");
    }

    public String Version()
    {
    return "3.14159265";
    }
    }
    [code]


    Again, it would be very much appreciated if you help me out. :biggrin.gif:

    -Thanks!
    Posted in: Tutorials
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    I recompile, and it says I have no errors, but then, I run the game and it says this:



    Mods loaded: 2
    ModLoader Beta 1.8.1
    net.minecraft.src.mod_Items 3.14159265
    
          Minecraft has crashed!      
          ----------------------      
    
    Minecraft has stopped running because it encountered a problem.
    
    If you wish to report this, please copy this entire text and email it to [email protected]
    Please include a description of what you did when the error occured.
    
    
    
    --- BEGIN ERROR REPORT 209464d6 --------
    Generated 10/2/11 7:39 PM
    
    Minecraft: Minecraft Beta 1.8.1
    OS: Windows 7 (x86) version 6.1
    Java: 1.6.0_26, Sun Microsystems Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: ATI Radeon HD 5450 version 2.1.9029, ATI Technologies Inc.
    
    java.lang.NullPointerException
            at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
            at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
            at net.minecraft.src.mod_Tools.<init>(mod_Tools.java:87)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at java.lang.Class.newInstance0(Unknown Source)
            at java.lang.Class.newInstance(Unknown Source)
            at net.minecraft.src.ModLoader.addMod(ModLoader.java:224)
            at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
            at net.minecraft.src.ModLoader.init(ModLoader.java:692)
            at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
            at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
            at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
            at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
            at net.minecraft.client.Minecraft.run(Minecraft.java:438)
            at java.lang.Thread.run(Unknown Source)
    --- END ERROR REPORT 856e82d1 ----------



    So here is my mod_ files:




    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Items extends BaseMod
    {
    	public static final Item itemTitaniumIngot = new ItemTitaniumIngot(5006).setItemName("TitaniumIngot");
    	public static final Item itemMeteoriteIngot = new ItemMeteoriteIngot(5046).setItemName("MeteoriteIngot");
    	public static final Item itemAntiMatter = new ItemAntiMatter(6005).setItemName("AntiMatter");
    	public static final Item itemDiamondRod = new ItemDiamondRod(6050).setItemName("DiamondRod");
    
    	public mod_Items()
    	{
    		itemTitaniumIngot.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/Titanium/TitaniumIngot.png");
    		itemMeteoriteIngot.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/Meteorite/MeteoriteIngot.png");
    		itemAntiMatter.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/AntiMatter/RefinedAntiMatter.png");
    		itemDiamondRod.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Items/DiamondRod.png");
    		
    		ModLoader.AddName(itemTitaniumIngot, "Titanium Ingot");
    		ModLoader.AddName(itemMeteoriteIngot, "Meteorite Ingot");
    		ModLoader.AddName(itemAntiMatter, "Anti-Matter Gem");
    		ModLoader.AddName(itemDiamondRod, "Diamond Rod");
    		
    	}
    
    	public String Version()
    	{
    		return "3.14159265";
    	}
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Blocks extends BaseMod
    {
    	public static final Block oreTitanium = new BlockTitaniumOre(5005, 0).setHardness(4F).setResistance(10F).setBlockName("TitaniumOre");   
    	public static final Block oreMeteorite = new BlockMeteorite(5045, 0).setHardness(5F).setResistance(30F).setBlockName("MeteoriteOre").setLightValue(2.5F);
    	public static final Block oreAntiMatter = new BlockAntiMatter(6006, 0).setHardness(9F).setResistance(80F).setBlockName("AntiMatterOre");
    	
    	
    	public mod_Blocks()
    	{
    		ModLoader.RegisterBlock(oreTitanium);
    		ModLoader.RegisterBlock(oreMeteorite);
    		ModLoader.RegisterBlock(oreAntiMatter);
    		
    		oreTitanium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/Titanium/TitaniumOre.png");
    		oreMeteorite.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/Meteorite/MeteoriteOre.png");
    		oreAntiMatter.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/AntiMatter/AntiMatterOre.png");
    		
    		ModLoader.AddName(oreTitanium, "Titanium Ore");
    		ModLoader.AddName(oreMeteorite, "Meteorite");
    		ModLoader.AddName(oreAntiMatter, "Anti-Matter Block");
    		
    		ModLoader.AddSmelting(mod_Blocks.oreTitanium.blockID, new ItemStack (mod_Items.itemTitaniumIngot, 1));	
    		ModLoader.AddSmelting(mod_Blocks.oreMeteorite.blockID, new ItemStack (mod_Items.itemMeteoriteIngot, 1));
    	}
    	
    	public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
    	{
    		for (int i=0; i < 1; i++)
    		{
    			int randPosX = chunkX + rand.nextInt(6);
    			int randPosY = rand.nextInt(64);
    			int randPosZ = chunkZ + rand.nextInt(6);
    			(new WorldGenMinable(oreTitanium.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
    		}
    		for (int i=0; i < 1; i++)
    		{
    			int randPosX = chunkX + rand.nextInt(4);
    			int randPosY = rand.nextInt(64);
    			int randPosZ = chunkZ + rand.nextInt(4);
    			(new WorldGenMinable(oreMeteorite.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
    		}
    	}
    	
    	
    
    	public String Version()
    	{
    		return "3.14159265";
    	}
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Tools extends BaseMod
    {
    	public static final Item TitaniumPickaxe = new ItemPickaxe(5000,EnumToolMaterial.TITANIUM).setItemName("TitaniumPickaxe");
    	public static final Item TitaniumShovel = new ItemSpade(5001,EnumToolMaterial.TITANIUM).setItemName("TitaniumShovel");
    	public static final Item TitaniumSword = new ItemSword(5002,EnumToolMaterial.TITANIUM).setItemName("TitaniumSword");
    	public static final Item TitaniumAxe = new ItemAxe(5003,EnumToolMaterial.TITANIUM).setItemName("TitaniumAxe");
    	public static final Item TitaniumHoe = new ItemHoe(5004,EnumToolMaterial.TITANIUM).setItemName("TitaniumHoe");
    	public static final Item MeteoritePickaxe = new ItemPickaxe(5040, EnumToolMaterial.METEORITE).setItemName("MeteoritePickaxe");
    	public static final Item MeteoriteShovel = new ItemSpade(5041, EnumToolMaterial.METEORITE).setItemName("MeteoriteShovel");
    	public static final Item MeteoriteSword = new ItemSword(5042, EnumToolMaterial.METEORITE).setItemName("MeteoriteSword");
    	public static final Item MeteoriteAxe = new ItemAxe(5043, EnumToolMaterial.METEORITE).setItemName("MeteoriteAxe");
    	public static final Item MeteoriteHoe = new ItemHoe(5044, EnumToolMaterial.METEORITE).setItemName("MeteoriteHoe");
    	public static final Item AntiMatterPickaxe = new ItemPickaxe(6000, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
    	public static final Item AntiMatterShovel = new ItemSpade(6001, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterShovel");
    	public static final Item AntiMatterSword = new ItemSword(6002, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterSword");
    	public static final Item AntiMatterAxe = new ItemAxe(6003, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterAxe");
    	public static final Item AntiMatterHoe = new ItemHoe(6004, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterHoe");
    
    	public mod_Tools()
    	{
    		TitaniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumPickaxe.png");
    		TitaniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumShovel.png");
    		TitaniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumSword.png");
    		TitaniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumAxe.png");
    		TitaniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumHoe.png");
    		MeteoritePickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoritePickaxe.png");
    		MeteoriteShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteShovel.png");
    		MeteoriteSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteSword.png");
    		MeteoriteAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteAxe.png");
    		MeteoriteHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteHoe.png");
    		AntiMatterPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterPickaxe.png");
    		AntiMatterShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterShovel.png");
    		AntiMatterSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterSword.png");
    		AntiMatterAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterAxe.png");
    		AntiMatterHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterHoe.png");
    		
    		
    		ModLoader.AddName(TitaniumPickaxe, "Titanium Pickaxe");
    		ModLoader.AddName(TitaniumShovel, "Titanium Shovel");
    		ModLoader.AddName(TitaniumSword, "Titanium Sword");
    		ModLoader.AddName(TitaniumAxe, "Titanium Axe");
    		ModLoader.AddName(TitaniumHoe, "Titanium Hoe");
    		ModLoader.AddName(MeteoritePickaxe, "Meteorite Pickaxe");
    		ModLoader.AddName(MeteoriteShovel, "Meteorite Shovel");
    		ModLoader.AddName(MeteoriteSword, "Meteorite Sword");
    		ModLoader.AddName(MeteoriteAxe, "Meteorite Axe");
    		ModLoader.AddName(MeteoriteHoe, "Meteorite Hoe");
    		ModLoader.AddName(AntiMatterPickaxe, "Anti-Matter Pickaxe");
    		ModLoader.AddName(AntiMatterShovel, "Anti-Matter Shovel");
    		ModLoader.AddName(AntiMatterSword, "Anti-Matter Sword");
    		ModLoader.AddName(AntiMatterAxe, "Anti-Matter Axe");
    		ModLoader.AddName(AntiMatterHoe, "Anti-Matter Hoe");
    		
    		ModLoader.AddRecipe(new ItemStack(TitaniumPickaxe, 1), new Object[] {
    			"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumShovel, 1), new Object[] {
    			" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumSword, 1), new Object[] {
    			" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumAxe, 1), new Object[] {
    			"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumHoe, 1), new Object[] {
    			"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoritePickaxe, 1), new Object[] {
    			"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteShovel, 1), new Object[] {
    			" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteSword, 1), new Object[] {
    			" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteAxe, 1), new Object[] {
    			"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteHoe, 1), new Object[] {
    			"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterPickaxe, 1), new Object[] {
    			"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterShovel, 1), new Object[] {
    			" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterSword, 1), new Object[] {
    			" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterAxe, 1), new Object[] {
    			"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterHoe, 1), new Object[] {
    			"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		
    		
    	}
    
    	public String Version()
    	{
    		return "3.14159265";
    	}
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Armor extends BaseMod
    {
    	public static final Item TitaniumHelmet = (new ItemArmor(5007, 4, 5, 3).setItemName("TitaniumHelmet"));
    	public static final Item TitaniumChestplate = (new ItemArmor(5008, 4, 5, 1).setItemName("TitaniumChestplate"));
    	public static final Item TitaniumLeggings = (new ItemArmor(5009, 4, 5, 2).setItemName("TitaniumLeggings"));
    	public static final Item TitaniumBoots = (new ItemArmor(5010, 3, 4, 0).setItemName("TitaniumBoots"));
    	public static final Item MeteoriteHelmet = (new ItemArmor(5047, 5, 6, 3).setItemName("MeteoriteHelmet"));
    	public static final Item MeteoriteChestplate = (new ItemArmor(5048, 5, 6, 1).setItemName("MeteoriteChestplate"));
    	public static final Item MeteoriteLeggings = (new ItemArmor(5049, 5, 6, 2).setItemName("MeteoriteLeggings"));
    	public static final Item MeteoriteBoots = (new ItemArmor(5050, 5, 6, 0).setItemName("MeteoriteBoots"));
    	public static final Item AntiMatterHelmet = (new ItemArmor(6007, 20, 7, 3).setItemName("AntiMatterHelmet"));
    	public static final Item AntiMatterChestplate = (new ItemArmor(6008, 20, 7, 1).setItemName("AntiMatterChestplate"));
    	public static final Item AntiMatterLeggings = (new ItemArmor(6009, 20, 7, 2).setItemName("AntiMatterLeggings"));
    	public static final Item AntiMatterBoots = (new ItemArmor(6010, 20, 7, 0).setItemName("AntiMatterBoots"));
    
    	public mod_Armor()
    	{
    		TitaniumHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumHelmet.png");
    		TitaniumChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumChestplate.png");
    		TitaniumLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumLeggings.png");
    		TitaniumBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumBoots.png");
    		MeteoriteHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteHelmet.png");
    		MeteoriteChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteChestplate.png");
    		MeteoriteLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteLeggings.png");
    		MeteoriteBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteBoots.png");
    		AntiMatterHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterHelmet.png");
    		AntiMatterChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterChestplate.png");
    		AntiMatterLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterLeggings.png");
    		AntiMatterBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterBoots.png");
    		
    		
    		
    		
    		ModLoader.AddRecipe(new ItemStack(TitaniumHelmet, 1), new Object [] {
    			"XXX", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumChestplate, 1), new Object [] {
    			"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumLeggings, 1), new Object [] {
    			"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumBoots, 1), new Object [] {
    			"X X", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteHelmet, 1), new Object [] {
    			"XXX", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteChestplate, 1), new Object [] {
    			"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteLeggings, 1), new Object [] {
    			"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteBoots, 1), new Object [] {
    			"X X", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterHelmet, 1), new Object [] {
    			"XXX", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterChestplate, 1), new Object [] {
    			"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterLeggings, 1), new Object [] {
    			"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterBoots, 1), new Object [] {
    			"X X", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
    		});
    		
    		ModLoader.AddName(TitaniumHelmet, "Titanium Helmet");
    		ModLoader.AddName(TitaniumChestplate, "Titanium Chestplate");
    		ModLoader.AddName(TitaniumLeggings, "Titanium Leggings");
    		ModLoader.AddName(TitaniumBoots, "Titanium Boots");
    		ModLoader.AddName(MeteoriteHelmet, "Meteorite Helmet");
    		ModLoader.AddName(MeteoriteChestplate, "Meteorite Chestplate");
    		ModLoader.AddName(MeteoriteLeggings, "Meteorite Leggings");
    		ModLoader.AddName(MeteoriteBoots, "Meteorite Boots");
    		ModLoader.AddName(AntiMatterHelmet, "Anti-Matter Helmet");
    		ModLoader.AddName(AntiMatterChestplate, "Anti-Matter Chestplate");
    		ModLoader.AddName(AntiMatterLeggings, "Anti-Matter Leggings");
    		ModLoader.AddName(AntiMatterBoots, "Anti-Matter Boots");
    	}
    
    	public String Version()
    	{
    		return "3.14159265";
    	}
    }



    And my blocks and items:



    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockAntiMatter extends Block
    {
    	protected BlockAntiMatter(int i, int j)
    	{
    		super (i,j, Material.iron);
    	}
    	
    	public int idDropped(int i, Random random)
    	{
    		return mod_Items.itemAntiMatter.shiftedIndex;
    	}
    	
    	public int quantityDropped(Random random)
    	{
    		return 1;
    	}
    	
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockMeteorite extends Block
    {
    	protected BlockMeteorite(int i, int j)
    	{
    		super (i,j, Material.iron);
    	}
    	
    	public int idDropped(int i, Random random)
    	{
    		return mod_Blocks.oreMeteorite.blockID;
    	}
    	
    	public int quantityDropped(Random random)
    	{
    		return 1;
    	}
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockTitaniumOre extends Block
    {
    	protected BlockTitaniumOre(int i, int j)
    	{
    		super (i,j, Material.iron);
    	}
    	
    	public int idDropped(int i, Random random)
    	{
    		return mod_Blocks.oreTitanium.blockID;
    	}
    	
    	public int quantityDropped(Random random)
    	{
    		return 1;
    	}
    }


    package net.minecraft.src;
    
    public class ItemAntiMatter extends Item
    {
    	public ItemAntiMatter(int i)
    	{
    		super (i);
    		maxStackSize = 64;
    	}
    
    
    }


    package net.minecraft.src;
    
    public class ItemDiamondRod extends Item
    {
    	public ItemDiamondRod(int i)
    	{
    		super (i);
    		maxStackSize = 64;
    	}
    
    
    }


    package net.minecraft.src;
    
    public class ItemMeteoriteIngot extends Item
    {
    	public ItemMeteoriteIngot(int i)
    	{
    		super (i);
    		maxStackSize = 64;
    	}
    
    
    }


    package net.minecraft.src;
    
    public class ItemTitaniumIngot extends Item
    {
    	public ItemTitaniumIngot(int i)
    	{
    		super (i);
    		maxStackSize = 64;
    	}
    
    
    }




    And generation code:



    package net.minecraft.src;
    import java.util.Random;
    
    public class WorldGenAntiMatter extends BaseMod
    {
    
            public void GenerateSurface(World world, Random random, int i, int j)
            {
                    
                    if(random.nextInt(30) == 0)
                    {
                            
                            for(int depth = 64; depth < 67; depth++)
                            {
                                   
                                    for(int row = 0; row < 3; row++)
                                    {
                                           
                                            for(int column = 0; column < 3; column++)
                                            {
                                                    
                                                    world.setBlock(i+row, depth, j+column, mod_Blocks.oreMeteorite.blockID);
                                            }
                                    }                                               
                            }
                            
                            for(int depth = 65; depth < 66; depth++)
                            {
                                 
                                    for(int row = 1; row < 1; row++)
                                    {
                                            
                                            for(int column = 1; column < 1; column++)
                                            {
                                                    
                                                    world.setBlock(i+row, depth, j+column, mod_Blocks.oreAntiMatter.blockID);
                                            }
                                    }                                               
                            }
                            
                    }
            }
            
            
            
            public String Version()
            {
            	return "1.8.1";
            }
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class WorldGenMeteorite extends BaseMod
    {
    
            public void GenerateSurface(World world, Random random, int i, int j)
            {
                    
                    if(random.nextInt(30) == 0)
                    {
                            
                            for(int depth = 64; depth < 67; depth++)
                            {
                                    
                                    for(int row = 0; row < 3; row++)
                                    {
                                            
                                            for(int column = 0; column < 3; column++)
                                            {
                                                    
                                                    world.setBlock(i+row, depth, j+column, mod_Blocks.oreMeteorite.blockID);
                                            }
                                    }                                               
                            }
                                                    
                            
                    }
            }
            
            
            
            public String Version()
            {
            	return "1.8.1";
            }
    }






    And that's it. :wink.gif:


    So if anyone can help me it would be very much appreciated. :iapprove:
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader]Zid's Tutorials - Not Just ModLoader[12/04/2011]
    Quote from charsmud

    Give your code. We cant help if you dont give us your code.


    Okay, I have replied to this several times and posted my code, but apparently it isn't showing up,so in hopes of it showing up THIS time,here it is again, ALL of my code:



    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Items extends BaseMod
    {
    	public static final Item itemTitaniumIngot = new ItemTitaniumIngot(5006).setItemName("TitaniumIngot");
    	public static final Item itemMeteoriteIngot = new ItemMeteoriteIngot(5046).setItemName("MeteoriteIngot");
    	public static final Item itemAntiMatter = new ItemAntiMatter(6005).setItemName("AntiMatter");
    	public static final Item itemDiamondRod = new ItemDiamondRod(6050).setItemName("DiamondRod");
    
    	public mod_Items()
    	{
    		itemTitaniumIngot.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/Titanium/TitaniumIngot.png");
    		itemMeteoriteIngot.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/Meteorite/MeteoriteIngot.png");
    		itemAntiMatter.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Ore/AntiMatter/RefinedAntiMatter.png");
    		itemDiamondRod.iconIndex = ModLoader.addOverride("/gui/item.png", "/Cyber/Items/DiamondRod.png");
    		
    		ModLoader.AddName(itemTitaniumIngot, "Titanium Ingot");
    		ModLoader.AddName(itemMeteoriteIngot, "Meteorite Ingot");
    		ModLoader.AddName(itemAntiMatter, "Anti-Matter Gem");
    		ModLoader.AddName(itemDiamondRod, "Diamond Rod");
    		
    	}
    
    	public String Version()
    	{
    		return "3.14159265";
    	}
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Blocks extends BaseMod
    {
    	public static final Block oreTitanium = new BlockTitaniumOre(5005, 0).setHardness(4F).setResistance(10F).setBlockName("TitaniumOre");   
    	public static final Block oreMeteorite = new BlockMeteorite(5045, 0).setHardness(5F).setResistance(30F).setBlockName("MeteoriteOre").setLightValue(2.5F);
    	public static final Block oreAntiMatter = new BlockAntiMatter(6006, 0).setHardness(9F).setResistance(80F).setBlockName("AntiMatterOre");
    	
    	
    	public mod_Blocks()
    	{
    		ModLoader.RegisterBlock(oreTitanium);
    		ModLoader.RegisterBlock(oreMeteorite);
    		ModLoader.RegisterBlock(oreAntiMatter);
    		
    		oreTitanium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/Titanium/TitaniumOre.png");
    		oreMeteorite.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/Meteorite/MeteoriteOre.png");
    		oreAntiMatter.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Cyber/Ore/AntiMatter/AntiMatterOre.png");
    		
    		ModLoader.AddName(oreTitanium, "Titanium Ore");
    		ModLoader.AddName(oreMeteorite, "Meteorite");
    		ModLoader.AddName(oreAntiMatter, "Anti-Matter Block");
    		
    		ModLoader.AddSmelting(mod_Blocks.oreTitanium.blockID, new ItemStack (mod_Items.itemTitaniumIngot, 1));	
    		ModLoader.AddSmelting(mod_Blocks.oreMeteorite.blockID, new ItemStack (mod_Items.itemMeteoriteIngot, 1));
    	}
    	
    	public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
    	{
    		for (int i=0; i < 1; i++)
    		{
    			int randPosX = chunkX + rand.nextInt(6);
    			int randPosY = rand.nextInt(64);
    			int randPosZ = chunkZ + rand.nextInt(6);
    			(new WorldGenMinable(oreTitanium.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
    		}
    		for (int i=0; i < 1; i++)
    		{
    			int randPosX = chunkX + rand.nextInt(4);
    			int randPosY = rand.nextInt(64);
    			int randPosZ = chunkZ + rand.nextInt(4);
    			(new WorldGenMinable(oreMeteorite.blockID, 6)).generate(world, rand, randPosX, randPosY, randPosZ);
    		}
    	}
    	
    	
    
    	public String Version()
    	{
    		return "3.14159265";
    	}
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Tools extends BaseMod
    {
    	public static final Item TitaniumPickaxe = new ItemPickaxe(5000,EnumToolMaterial.TITANIUM).setItemName("TitaniumPickaxe");
    	public static final Item TitaniumShovel = new ItemSpade(5001,EnumToolMaterial.TITANIUM).setItemName("TitaniumShovel");
    	public static final Item TitaniumSword = new ItemSword(5002,EnumToolMaterial.TITANIUM).setItemName("TitaniumSword");
    	public static final Item TitaniumAxe = new ItemAxe(5003,EnumToolMaterial.TITANIUM).setItemName("TitaniumAxe");
    	public static final Item TitaniumHoe = new ItemHoe(5004,EnumToolMaterial.TITANIUM).setItemName("TitaniumHoe");
    	public static final Item MeteoritePickaxe = new ItemPickaxe(5040, EnumToolMaterial.METEORITE).setItemName("MeteoritePickaxe");
    	public static final Item MeteoriteShovel = new ItemSpade(5041, EnumToolMaterial.METEORITE).setItemName("MeteoriteShovel");
    	public static final Item MeteoriteSword = new ItemSword(5042, EnumToolMaterial.METEORITE).setItemName("MeteoriteSword");
    	public static final Item MeteoriteAxe = new ItemAxe(5043, EnumToolMaterial.METEORITE).setItemName("MeteoriteAxe");
    	public static final Item MeteoriteHoe = new ItemHoe(5044, EnumToolMaterial.METEORITE).setItemName("MeteoriteHoe");
    	public static final Item AntiMatterPickaxe = new ItemPickaxe(6000, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
    	public static final Item AntiMatterShovel = new ItemSpade(6001, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
    	public static final Item AntiMatterSword = new ItemSword(6002, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
    	public static final Item AntiMatterAxe = new ItemAxe(6003, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
    	public static final Item AntiMatterHoe = new ItemHoe(6004, EnumToolMaterial.ANTIMATTER).setItemName("AntiMatterPickaxe");
    
    	public mod_Tools()
    	{
    		TitaniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumPickaxe.png");
    		TitaniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumShovel.png");
    		TitaniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumSword.png");
    		TitaniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumAxe.png");
    		TitaniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Titanium/TitaniumHoe.png");
    		MeteoritePickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoritePickaxe.png");
    		MeteoriteShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteShovel.png");
    		MeteoriteSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteSword.png");
    		MeteoriteAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteAxe.png");
    		MeteoriteHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/Meteorite/MeteoriteHoe.png");
    		AntiMatterPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterPickaxe.png");
    		AntiMatterShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterShovel.png");
    		AntiMatterSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterSword.png");
    		AntiMatterAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterAxe.png");
    		AntiMatterHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Tools/AntiMatter/AntiMatterHoe.png");
    		
    		
    		ModLoader.AddName(TitaniumPickaxe, "Titanium Pickaxe");
    		ModLoader.AddName(TitaniumShovel, "Titanium Shovel");
    		ModLoader.AddName(TitaniumSword, "Titanium Sword");
    		ModLoader.AddName(TitaniumAxe, "Titanium Axe");
    		ModLoader.AddName(TitaniumHoe, "Titanium Hoe");
    		ModLoader.AddName(MeteoritePickaxe, "Meteorite Pickaxe");
    		ModLoader.AddName(MeteoriteShovel, "Meteorite Shovel");
    		ModLoader.AddName(MeteoriteSword, "Meteorite Sword");
    		ModLoader.AddName(MeteoriteAxe, "Meteorite Axe");
    		ModLoader.AddName(MeteoriteHoe, "Meteorite Hoe");
    		ModLoader.AddName(AntiMatterPickaxe, "Anti-Matter Pickaxe");
    		ModLoader.AddName(AntiMatterShovel, "Anti-Matter Shovel");
    		ModLoader.AddName(AntiMatterSword, "Anti-Matter Sword");
    		ModLoader.AddName(AntiMatterAxe, "Anti-Matter Axe");
    		ModLoader.AddName(AntiMatterHoe, "Anti-Matter Hoe");
    		
    		ModLoader.AddRecipe(new ItemStack(TitaniumPickaxe, 1), new Object[] {
    			"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumShovel, 1), new Object[] {
    			" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumSword, 1), new Object[] {
    			" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumAxe, 1), new Object[] {
    			"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumHoe, 1), new Object[] {
    			"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemTitaniumIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoritePickaxe, 1), new Object[] {
    			"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteShovel, 1), new Object[] {
    			" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteSword, 1), new Object[] {
    			" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteAxe, 1), new Object[] {
    			"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteHoe, 1), new Object[] {
    			"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemMeteoriteIngot, Character.valueOf('S'), Item.stick
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterPickaxe, 1), new Object[] {
    			"XXX", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterShovel, 1), new Object[] {
    			" X ", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterSword, 1), new Object[] {
    			" X ", " X ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterAxe, 1), new Object[] {
    			"XX ", "XS ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterHoe, 1), new Object[] {
    			"XX ", " S ", " S ", Character.valueOf('X'), mod_Items.itemAntiMatter, Character.valueOf('S'), mod_Items.itemDiamondRod.shiftedIndex
    		});
    		
    		
    	}
    
    	public String Version()
    	{
    		return "3.14159265";
    	}
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Armor extends BaseMod
    {
    	public static final Item TitaniumHelmet = (new ItemArmor(5007, 4, 5, 3).setItemName("TitaniumHelmet"));
    	public static final Item TitaniumChestplate = (new ItemArmor(5008, 4, 5, 1).setItemName("TitaniumChestplate"));
    	public static final Item TitaniumLeggings = (new ItemArmor(5009, 4, 5, 2).setItemName("TitaniumLeggings"));
    	public static final Item TitaniumBoots = (new ItemArmor(5010, 3, 4, 0).setItemName("TitaniumBoots"));
    	public static final Item MeteoriteHelmet = (new ItemArmor(5047, 5, 6, 3).setItemName("MeteoriteHelmet"));
    	public static final Item MeteoriteChestplate = (new ItemArmor(5048, 5, 6, 1).setItemName("MeteoriteChestplate"));
    	public static final Item MeteoriteLeggings = (new ItemArmor(5049, 5, 6, 2).setItemName("MeteoriteLeggings"));
    	public static final Item MeteoriteBoots = (new ItemArmor(5050, 5, 6, 0).setItemName("MeteoriteBoots"));
    	public static final Item AntiMatterHelmet = (new ItemArmor(6007, 20, 7, 3).setItemName("AntiMatterHelmet"));
    	public static final Item AntiMatterChestplate = (new ItemArmor(6008, 20, 7, 1).setItemName("AntiMatterChestplate"));
    	public static final Item AntiMatterLeggings = (new ItemArmor(6009, 20, 7, 2).setItemName("AntiMatterLeggings"));
    	public static final Item AntiMatterBoots = (new ItemArmor(6010, 20, 7, 0).setItemName("AntiMatterBoots"));
    
    	public mod_Armor()
    	{
    		TitaniumHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumHelmet.png");
    		TitaniumChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumChestplate.png");
    		TitaniumLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumLeggings.png");
    		TitaniumBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Titanium/TitaniumBoots.png");
    		MeteoriteHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteHelmet.png");
    		MeteoriteChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteChestplate.png");
    		MeteoriteLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteLeggings.png");
    		MeteoriteBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/Meteorite/MeteoriteBoots.png");
    		AntiMatterHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterHelmet.png");
    		AntiMatterChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterChestplate.png");
    		AntiMatterLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterLeggings.png");
    		AntiMatterBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Cyber/Armor/AntiMatter/AntiMatterBoots.png");
    		
    		
    		
    		
    		ModLoader.AddRecipe(new ItemStack(TitaniumHelmet, 1), new Object [] {
    			"XXX", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumChestplate, 1), new Object [] {
    			"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumLeggings, 1), new Object [] {
    			"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(TitaniumBoots, 1), new Object [] {
    			"X X", "X X", Character.valueOf('X'), mod_Items.itemTitaniumIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteHelmet, 1), new Object [] {
    			"XXX", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteChestplate, 1), new Object [] {
    			"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteLeggings, 1), new Object [] {
    			"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(MeteoriteBoots, 1), new Object [] {
    			"X X", "X X", Character.valueOf('X'), mod_Items.itemMeteoriteIngot.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterHelmet, 1), new Object [] {
    			"XXX", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterChestplate, 1), new Object [] {
    			"X X", "XXX", "XXX", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterLeggings, 1), new Object [] {
    			"XXX", "X X", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
    		});
    		ModLoader.AddRecipe(new ItemStack(AntiMatterBoots, 1), new Object [] {
    			"X X", "X X", Character.valueOf('X'), mod_Items.itemAntiMatter.shiftedIndex
    		});
    		
    		ModLoader.AddName(TitaniumHelmet, "Titanium Helmet");
    		ModLoader.AddName(TitaniumChestplate, "Titanium Chestplate");
    		ModLoader.AddName(TitaniumLeggings, "Titanium Leggings");
    		ModLoader.AddName(TitaniumBoots, "Titanium Boots");
    		ModLoader.AddName(MeteoriteHelmet, "Meteorite Helmet");
    		ModLoader.AddName(MeteoriteChestplate, "Meteorite Chestplate");
    		ModLoader.AddName(MeteoriteLeggings, "Meteorite Leggings");
    		ModLoader.AddName(MeteoriteBoots, "Meteorite Boots");
    		ModLoader.AddName(AntiMatterHelmet, "Anti-Matter Helmet");
    		ModLoader.AddName(AntiMatterChestplate, "Anti-Matter Chestplate");
    		ModLoader.AddName(AntiMatterLeggings, "Anti-Matter Leggings");
    		ModLoader.AddName(AntiMatterBoots, "Anti-Matter Boots");
    	}
    
    	public String Version()
    	{
    		return "3.14159265";
    	}
    }



    And then there is my blocks and items:



    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockAntiMatter extends Block
    {
    	protected BlockAntiMatter(int i, int j)
    	{
    		super (i,j, Material.iron);
    	}
    	
    	public int idDropped(int i, Random random)
    	{
    		return mod_Items.itemAntiMatter.shiftedIndex;
    	}
    	
    	public int quantityDropped(Random random)
    	{
    		return 1;
    	}
    	
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockMeteorite extends Block
    {
    	protected BlockMeteorite(int i, int j)
    	{
    		super (i,j, Material.iron);
    	}
    	
    	public int idDropped(int i, Random random)
    	{
    		return mod_Blocks.oreMeteorite.blockID;
    	}
    	
    	public int quantityDropped(Random random)
    	{
    		return 1;
    	}
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockTitaniumOre extends Block
    {
    	protected BlockTitaniumOre(int i, int j)
    	{
    		super (i,j, Material.iron);
    	}
    	
    	public int idDropped(int i, Random random)
    	{
    		return mod_Blocks.oreTitanium.blockID;
    	}
    	
    	public int quantityDropped(Random random)
    	{
    		return 1;
    	}
    }


    package net.minecraft.src;
    
    public class ItemAntiMatter extends Item
    {
    	public ItemAntiMatter(int i)
    	{
    		super (i);
    		maxStackSize = 64;
    	}
    
    
    }


    package net.minecraft.src;
    
    public class ItemDiamondRod extends Item
    {
    	public ItemDiamondRod(int i)
    	{
    		super (i);
    		maxStackSize = 64;
    	}
    
    
    }


    package net.minecraft.src;
    
    public class ItemMeteoriteIngot extends Item
    {
    	public ItemMeteoriteIngot(int i)
    	{
    		super (i);
    		maxStackSize = 64;
    	}
    
    
    }


    package net.minecraft.src;
    
    public class ItemTitaniumIngot extends Item
    {
    	public ItemTitaniumIngot(int i)
    	{
    		super (i);
    		maxStackSize = 64;
    	}
    
    
    }




    And generation code:



    package net.minecraft.src;
    import java.util.Random;
    
    public class WorldGenAntiMatter extends BaseMod
    {
    
            public void GenerateSurface(World world, Random random, int i, int j)
            {
                    
                    if(random.nextInt(30) == 0)
                    {
                            
                            for(int depth = 64; depth < 67; depth++)
                            {
                                   
                                    for(int row = 0; row < 3; row++)
                                    {
                                           
                                            for(int column = 0; column < 3; column++)
                                            {
                                                    
                                                    world.setBlock(i+row, depth, j+column, mod_Blocks.oreMeteorite.blockID);
                                            }
                                    }                                               
                            }
                            
                            for(int depth = 65; depth < 66; depth++)
                            {
                                 
                                    for(int row = 1; row < 1; row++)
                                    {
                                            
                                            for(int column = 1; column < 1; column++)
                                            {
                                                    
                                                    world.setBlock(i+row, depth, j+column, mod_Blocks.oreAntiMatter.blockID);
                                            }
                                    }                                               
                            }
                            
                    }
            }
            
            
            
            public String Version()
            {
            	return "1.8.1";
            }
    }


    package net.minecraft.src;
    import java.util.Random;
    
    public class WorldGenMeteorite extends BaseMod
    {
    
            public void GenerateSurface(World world, Random random, int i, int j)
            {
                    
                    if(random.nextInt(30) == 0)
                    {
                            
                            for(int depth = 64; depth < 67; depth++)
                            {
                                    
                                    for(int row = 0; row < 3; row++)
                                    {
                                            
                                            for(int column = 0; column < 3; column++)
                                            {
                                                    
                                                    world.setBlock(i+row, depth, j+column, mod_Blocks.oreMeteorite.blockID);
                                            }
                                    }                                               
                            }
                                                    
                            
                    }
            }
            
            
            
            public String Version()
            {
            	return "1.8.1";
            }
    }



    And again, I have the error:



    Mods loaded: 2
    ModLoader Beta 1.8.1
    net.minecraft.src.mod_Items 3.14159265

    Minecraft has crashed!
    ----------------------

    Minecraft has stopped running because it encountered a problem.

    If you wish to report this, please copy this entire text and email it to [email protected]
    Please include a description of what you did when the error occured.



    --- BEGIN ERROR REPORT 209464d6 --------
    Generated 10/2/11 7:39 PM

    Minecraft: Minecraft Beta 1.8.1
    OS: Windows 7 (x86) version 6.1
    Java: 1.6.0_26, Sun Microsystems Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: ATI Radeon HD 5450 version 2.1.9029, ATI Technologies Inc.

    java.lang.NullPointerException
    at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
    at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
    at net.minecraft.src.mod_Tools.<init>(mod_Tools.java:87)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at net.minecraft.src.ModLoader.addMod(ModLoader.java:224)
    at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
    at net.minecraft.src.ModLoader.init(ModLoader.java:692)
    at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
    at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
    at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
    at net.minecraft.client.Minecraft.run(Minecraft.java:438)
    at java.lang.Thread.run(Unknown Source)
    --- END ERROR REPORT 856e82d1 ----------

    And that's it. :wink.gif:


    EDIT: Woo! It finally shows up! :tongue.gif:

    EDIT: Never mind, I fixed it.
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader]Zid's Tutorials - Not Just ModLoader[12/04/2011]
    I recompile, and it says I have no errors.
    But then, I run the game, and it says this:

    Mods loaded: 2
    ModLoader Beta 1.8.1
    net.minecraft.src.mod_Items 3.14159265
    
          Minecraft has crashed!      
          ----------------------      
    
    Minecraft has stopped running because it encountered a problem.
    
    If you wish to report this, please copy this entire text and email it to [email protected]
    Please include a description of what you did when the error occured.
    
    
    
    --- BEGIN ERROR REPORT 209464d6 --------
    Generated 10/2/11 7:39 PM
    
    Minecraft: Minecraft Beta 1.8.1
    OS: Windows 7 (x86) version 6.1
    Java: 1.6.0_26, Sun Microsystems Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: ATI Radeon HD 5450 version 2.1.9029, ATI Technologies Inc.
    
    java.lang.NullPointerException
    	at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:279)
    	at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:330)
    	at net.minecraft.src.mod_Tools.<init>(mod_Tools.java:87)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    	at java.lang.reflect.Constructor.newInstance(Unknown Source)
    	at java.lang.Class.newInstance0(Unknown Source)
    	at java.lang.Class.newInstance(Unknown Source)
    	at net.minecraft.src.ModLoader.addMod(ModLoader.java:224)
    	at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
    	at net.minecraft.src.ModLoader.init(ModLoader.java:692)
    	at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
    	at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
    	at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
    	at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:438)
    	at java.lang.Thread.run(Unknown Source)
    --- END ERROR REPORT 856e82d1 ----------


    Help? :tongue.gif:
    Posted in: Tutorials
  • To post a comment, please .