• 0

    posted a message on TechGuy's Modding Tutorials
    hey techguy
    I got an error when trying to add my

    own blocks to the creative inventory

    here is my code


    package net.minecraft.src;

    import java.util.Random;
    import net.minecraft.client.Minecraft;
    import java.util.List;

    public class mod_motools extends BaseMod
    {

    //Declare Amathestore
    public static Block m_Amathestore = new Amathestore(190, 0)
    .setHardness(5F).setResistance(1F)
    .setLightValue(0.0F).setBlockName("m_Amathestore");

    //Declare Zirconiumore
    public static Block m_Zirconiumore = new Zirconiumore(191, 0)
    .setHardness(5F).setResistance(5F)
    .setLightValue(0.0F).setBlockName("m_Zirconiumore");

    //Declare Bloodrockore
    public static Block m_Bloodrockore = new Bloodrockore(192, 0)
    .setHardness(5F).setResistance(4F)
    .setLightValue(0.0F).setBlockName("m_Bloodrockore");

    //Declare Lightoniumore
    public static Block m_Lightoniumore = new Lightoniumore(193, 0)
    .setHardness(7F).setResistance(8F)
    .setLightValue(0.0F).setBlockName("m_Lightoniumore");

    //Declare Onyxore
    public static Block m_Onyxore = new Onyxore(194, 0)
    .setHardness(7F).setResistance(7F)
    .setLightValue(0.0F).setBlockName("m_Onyxore");

    //Declare Amathestshard
    public static final Item m_Amathestshard = new Amathestshard(2268)
    .setItemName("m_Amathestshard");

    //Declare Zirconiumingot
    public static final Item m_Zirconiumingot = new Zirconiumingot(2269)
    .setItemName("m_Zirconiumingot");

    //Declare Bloodshard
    public static final Item m_Bloodshard = new Bloodshard(2270)
    .setItemName("m_Bloodshard");

    //Declare Lightoniumshard
    public static final Item m_Lightoniumshard = new Lightoniumshard(2271)
    .setItemName("m_Lightoniumshard");

    //Declare Onyxgem
    public static final Item m_Onyxgem = new Onyxgem(2272)
    .setItemName("m_Onyxgem");

    //Declare Amathest Pickaxe
    public static final Item m_AmathestPickaxe = new ItemPickaxeAmathest(2293, EnumToolAmathest.AMATHEST)
    .setItemName("m_AmathestPickaxe");

    //Declare Amathest Shovel
    public static final Item m_AmathestShovel = new ItemShovelAmathest(2294, EnumToolAmathest.AMATHEST)
    .setItemName("m_AmathestShovel");

    //Declare Amathest Axe
    public static final Item m_AmathestAxe = new ItemAxeAmathest(2295, EnumToolAmathest.AMATHEST)
    .setItemName("m_AmathestAxe");

    //Declare Amathest Hoe
    public static final Item m_AmathestHoe = new ItemHoeAmathest(2296, EnumToolAmathest.AMATHEST)
    .setItemName("m_AmathestHoe");

    //Declare Amathest Sword
    public static final Item m_AmathestSword = new ItemSwordAmathest(2297, EnumToolAmathest.AMATHEST)
    .setItemName("m_AmathestSword");

    //Declare Zirconium Pickaxe
    public static final Item m_ZirconiumPickaxe = new ItemPickaxeZirconium(2273, EnumToolZirconium.ZIRCONIUM)
    .setItemName("m_ZirconiumPickaxe");

    //Declare Zirconium Shovel
    public static final Item m_ZirconiumShovel = new ItemShovelZirconium(2274, EnumToolZirconium.ZIRCONIUM)
    .setItemName("m_ZirconiumShovel");

    //Declare Zirconium Axe
    public static final Item m_ZirconiumAxe = new ItemAxeZirconium(2275, EnumToolZirconium.ZIRCONIUM)
    .setItemName("m_ZirconiumAxe");

    //Declare Zirconium Hoe
    public static final Item m_ZirconiumHoe = new ItemHoeZirconium(2276, EnumToolZirconium.ZIRCONIUM)
    .setItemName("m_ZirconiumHoe");

    //Declare Zirconium Sword
    public static final Item m_ZirconiumSword = new ItemSwordZirconium(2277, EnumToolZirconium.ZIRCONIUM)
    .setItemName("m_ZirconiumSword");

    //Declare Lightonium Pickaxe
    public static final Item m_LightoniumPickaxe = new ItemPickaxeLightonium(2278, EnumToolLightonium.LIGHTONIUM)
    .setItemName("m_LightoniumPickaxe");

    //Declare Lightonium Shovel
    public static final Item m_LightoniumShovel = new ItemShovelLightonium(2279, EnumToolLightonium.LIGHTONIUM)
    .setItemName("m_LightoniumShovel");

    //Declare Lightonium Axe
    public static final Item m_LightoniumAxe = new ItemAxeLightonium(2280, EnumToolLightonium.LIGHTONIUM)
    .setItemName("m_LightoniumAxe");

    //Declare Lightonium Hoe
    public static final Item m_LightoniumHoe = new ItemHoeLightonium(2281, EnumToolLightonium.LIGHTONIUM)
    .setItemName("m_LightoniumHoe");

    //Declare Lightonium Sword
    public static final Item m_LightoniumSword = new ItemSwordLightonium(2282, EnumToolLightonium.LIGHTONIUM)
    .setItemName("m_LightoniumSword");

    //Declare BloodRock Pickaxe
    public static final Item m_BloodRockPickaxe = new ItemPickaxeBloodRock(2283, EnumToolBloodRock.BLOODROCK)
    .setItemName("m_BloodRockPickaxe");

    //Declare BloodRock Shovel
    public static final Item m_BloodRockShovel = new ItemShovelBloodRock(2284, EnumToolBloodRock.BLOODROCK)
    .setItemName("m_BloodRockShovel");

    //Declare BloodRock Axe
    public static final Item m_BloodRockAxe = new ItemAxeBloodRock(2285, EnumToolBloodRock.BLOODROCK)
    .setItemName("m_BloodRockAxe");

    //Declare BloodRock Hoe
    public static final Item m_BloodRockHoe = new ItemHoeBloodRock(2286, EnumToolBloodRock.BLOODROCK)
    .setItemName("m_BloodRockHoe");

    //Declare BloodRock Sword
    public static final Item m_BloodRockSword = new ItemSwordBloodRock(2287, EnumToolBloodRock.BLOODROCK)
    .setItemName("m_BloodRockSword");

    //Declare Onyx Pickaxe
    public static final Item m_OnyxPickaxe = new ItemPickaxeOnyx(2288, EnumToolOnyx.ONYX)
    .setItemName("m_OnyxPickaxe");

    //Declare Onyx Shovel
    public static final Item m_OnyxShovel = new ItemShovelOnyx(2289, EnumToolOnyx.ONYX)
    .setItemName("m_OnyxShovel");

    //Declare Onyx Axe
    public static final Item m_OnyxAxe = new ItemAxeOnyx(2290, EnumToolOnyx.ONYX)
    .setItemName("m_OnyxAxe");

    //Declare Onyx Hoe
    public static final Item m_OnyxHoe = new ItemHoeOnyx(2291, EnumToolOnyx.ONYX)
    .setItemName("m_OnyxHoe");

    //Declare Onyx Sword
    public static final Item m_OnyxSword = new ItemSwordOnyx(2292, EnumToolOnyx.ONYX)
    .setItemName("m_OnyxSword");

    public String getVersion()
    {
    return "motools 1.0.0";
    }
    public void load() { }

    ModLoader.setInGameHook(this, true, false);
    ModLoader.setInGUIHook(this, true, false);

    public mod_motools()
    {
    public boolean onTickInGame(float f, Minecraft minecraft)
    {
    if(minecraft.currentScreen == null)
    {
    creativeInventory = null;
    }
    return true;
    }
    public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen)
    {
    if((guiscreen instanceof GuiContainerCreative) && !(creativeInventory instanceof GuiContainerCreative) && !minecraft.theWorld.isRemote)
    {
    Container container = ((GuiContainer)guiscreen).inventorySlots;
    List list = ((ContainerCreative)container).itemList;
    int i = 0;
    list.add(new ItemStack(Zirconiumore, 1, i));
    list.add(new ItemStack(Lightoniumore, 1, i));
    list.add(new ItemStack(Onyxore, 1, i));
    }
    creativeInventory = guiscreen;
    return true;
    }


    private static GuiScreen creativeInventory;
    ModLoader.registerBlock(m_Amathestore); //Amathestore
    ModLoader.registerBlock(m_Zirconiumore); //Zirconiumore
    ModLoader.registerBlock(m_Bloodrockore); //Bloodrockore
    ModLoader.registerBlock(m_Lightoniumore); //Lightoniumore
    ModLoader.registerBlock(m_Onyxore); //Onyxore

    //Add Tooltips
    //Blocks
    ModLoader.addName(m_Amathestore, "Amathest Ore"); //Amathestore
    ModLoader.addName(m_Zirconiumore, "Zirconium Ore"); //Zirconiumore
    ModLoader.addName(m_Bloodrockore, "Blood Rock Ore"); //Bloodrockore
    ModLoader.addName(m_Lightoniumore, "Lightonium Ore"); //Lightoniumore
    ModLoader.addName(m_Onyxore, "Onyx Ore"); //Onyxore
    //Items
    ModLoader.addName(m_Amathestshard, "Amathest Shard"); //Amathestshard
    ModLoader.addName(m_Zirconiumingot, "Zirconium Ingot"); //Zirconiumingot
    ModLoader.addName(m_Bloodshard, "Blood Shard"); //Bloodshard
    ModLoader.addName(m_Lightoniumshard, "Lightonium Shard"); //Lightoniumshard
    ModLoader.addName(m_Onyxgem, "Onyx Gem"); //Onyxgem
    //Armor Sets
    //ToolSets
    ModLoader.addName(m_AmathestPickaxe, "Amathest Pickaxe"); //Amathest Pickaxe
    ModLoader.addName(m_AmathestShovel, "Amathest Shovel"); //Amathest Shovel
    ModLoader.addName(m_AmathestAxe, "Amathest Axe"); //Amathest Axe
    ModLoader.addName(m_AmathestHoe, "Amathest Hoe"); //Amathest Hoe
    ModLoader.addName(m_AmathestSword, "Amathest Sword"); //Amathest Sword

    ModLoader.addName(m_ZirconiumPickaxe, "Zirconium Pickaxe"); //Zirconium Pickaxe
    ModLoader.addName(m_ZirconiumShovel, "Zirconium Shovel"); //Zirconium Shovel
    ModLoader.addName(m_ZirconiumAxe, "Zirconium Axe"); //Zirconium Axe
    ModLoader.addName(m_ZirconiumHoe, "Zirconium Hoe"); //Zirconium Hoe
    ModLoader.addName(m_ZirconiumSword, "Zirconium Sword"); //Zirconium Sword

    ModLoader.addName(m_LightoniumPickaxe, "Lightonium Pickaxe"); //Lightonium Pickaxe
    ModLoader.addName(m_LightoniumShovel, "Lightonium Shovel"); //Lightonium Shovel
    ModLoader.addName(m_LightoniumAxe, "Lightonium Axe"); //Lightonium Axe
    ModLoader.addName(m_LightoniumHoe, "Lightonium Hoe"); //Lightonium Hoe
    ModLoader.addName(m_LightoniumSword, "Lightonium Sword"); //Lightonium Sword

    ModLoader.addName(m_BloodRockPickaxe, "BloodRock Pickaxe"); //BloodRock Pickaxe
    ModLoader.addName(m_BloodRockShovel, "BloodRock Shovel"); //BloodRock Shovel
    ModLoader.addName(m_BloodRockAxe, "BloodRock Axe"); //BloodRock Axe
    ModLoader.addName(m_BloodRockHoe, "BloodRock Hoe"); //BloodRock Hoe
    ModLoader.addName(m_BloodRockSword, "BloodRock Sword"); //BloodRock Sword

    ModLoader.addName(m_OnyxPickaxe, "Onyx Pickaxe"); //Onyx Pickaxe
    ModLoader.addName(m_OnyxShovel, "Onyx Shovel"); //Onyx Shovel
    ModLoader.addName(m_OnyxAxe, "Onyx Axe"); //Onyx Axe
    ModLoader.addName(m_OnyxHoe, "Onyx Hoe"); //Onyx Hoe
    ModLoader.addName(m_OnyxSword, "Onyx Sword"); //Onyx Sword


    //Textures
    //Blocks
    m_Amathestore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/blocks/Amathestore.png");
    m_Zirconiumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/blocks/Zirconiumore.png");
    m_Bloodrockore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/blocks/BloodRockore.png");
    m_Lightoniumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/blocks/Lightoniumore.png");
    m_Onyxore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/blocks/Onyxore.png");
    //Items
    m_Amathestshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Amathestshard.png");
    m_Zirconiumingot.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Zerconiumingot.png");
    m_Bloodshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/bloodshard.png");
    m_Lightoniumshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Lightoniumshard.png");
    m_Onyxgem.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Onyxgem.png");
    //ToolSets
    m_AmathestPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Amathestpickaxe.png");
    m_AmathestShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Amathestshovel.png");
    m_AmathestAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Amathestaxe.png");
    m_AmathestHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Amathesthoe.png");
    m_AmathestSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Amathestsword.png");

    m_ZirconiumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Zerconiumpickaxe.png");
    m_ZirconiumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Zerconiumshovel.png");
    m_ZirconiumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Zerconiumaxe.png");
    m_ZirconiumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Zerconiumhoe.png");
    m_ZirconiumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Zerconiumsword.png");

    m_LightoniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Lightoniumpickaxe.png");
    m_LightoniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Lightoniumshovel.png");
    m_LightoniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Lightoniumaxe.png");
    m_LightoniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Lightoniumhoe.png");
    m_LightoniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Lightoniumsword.png");

    m_BloodRockPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Bloodrockpickaxe.png");
    m_BloodRockShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Bloodrockshovel.png");
    m_BloodRockAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Bloodrockaxe.png");
    m_BloodRockHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Bloodrockhoe.png");
    m_BloodRockSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Bloodrocksword.png");

    m_OnyxPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Onyxpickaxe.png");
    m_OnyxShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Onyxshovel.png");
    m_OnyxAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Onyxaxe.png");
    m_OnyxHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Onyxhoe.png");
    m_OnyxSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/items/Onyxsword.png");


    //Recipes
    //Amathest Pickaxe Recipe
    ModLoader.addRecipe(new ItemStack(m_AmathestPickaxe, 1), new Object []{ "yyy" , " z " , " z " ,
    Character.valueOf('y'), m_Amathestshard
    , Character.valueOf('z'), Item.stick });
    //Amathest Shovel Recipe
    ModLoader.addRecipe(new ItemStack(m_AmathestShovel, 1), new Object []{ " y " , " z " , " z " ,
    Character.valueOf('y'), m_Amathestshard
    , Character.valueOf('z'), Item.stick });
    //Amathest Axe Recipe
    ModLoader.addRecipe(new ItemStack(m_AmathestAxe, 1), new Object []{ "yy " , "yz " , " z " ,
    Character.valueOf('y'), m_Amathestshard
    , Character.valueOf('z'), Item.stick });
    //Amathest Hoe Recipe
    ModLoader.addRecipe(new ItemStack(m_AmathestHoe, 1), new Object []{ "yy " , " z " , " z " ,
    Character.valueOf('y'), m_Amathestshard
    , Character.valueOf('z'), Item.stick });
    //Amathest Sword Recipe
    ModLoader.addRecipe(new ItemStack(m_AmathestSword, 1), new Object []{ " y " , " y " , " z " ,
    Character.valueOf('y'), m_Amathestshard
    , Character.valueOf('z'), Item.stick });
    //Zirconium Pickaxe Recipe
    ModLoader.addRecipe(new ItemStack(m_ZirconiumPickaxe, 1), new Object []{ "yyy" , " z " , " z " ,
    Character.valueOf('y'), m_Zirconiumingot
    , Character.valueOf('z'), Item.stick });
    //Zirconium Shovel Recipe
    ModLoader.addRecipe(new ItemStack(m_ZirconiumShovel, 1), new Object []{ " y " , " z " , " z " ,
    Character.valueOf('y'), m_Zirconiumingot
    , Character.valueOf('z'), Item.stick });
    //Zirconium Axe Recipe
    ModLoader.addRecipe(new ItemStack(m_ZirconiumAxe, 1), new Object []{ "yy " , "yz " , " z " ,
    Character.valueOf('y'), m_Zirconiumingot
    , Character.valueOf('z'), Item.stick });
    //Zirconium Hoe Recipe
    ModLoader.addRecipe(new ItemStack(m_ZirconiumHoe, 1), new Object []{ "yy " , " z " , " z " ,
    Character.valueOf('y'), m_Zirconiumingot
    , Character.valueOf('z'), Item.stick });
    //Zirconium Sword Recipe
    ModLoader.addRecipe(new ItemStack(m_ZirconiumSword, 1), new Object []{ " y " , " y " , " z " ,
    Character.valueOf('y'), m_Zirconiumingot
    , Character.valueOf('z'), Item.stick });
    //Lightonium Pickaxe Recipe
    ModLoader.addRecipe(new ItemStack(m_LightoniumPickaxe, 1), new Object []{ "yyy" , " z " , " z " ,
    Character.valueOf('y'), m_Lightoniumshard
    , Character.valueOf('z'), Item.stick });
    //Lightonium Shovel Recipe
    ModLoader.addRecipe(new ItemStack(m_LightoniumShovel, 1), new Object []{ " y " , " z " , " z " ,
    Character.valueOf('y'), m_Lightoniumshard
    , Character.valueOf('z'), Item.stick });
    //Lightonium Axe Recipe
    ModLoader.addRecipe(new ItemStack(m_LightoniumAxe, 1), new Object []{ "yy " , "yz " , " z " ,
    Character.valueOf('y'), m_Lightoniumshard
    , Character.valueOf('z'), Item.stick });
    //Lightonium Hoe Recipe
    ModLoader.addRecipe(new ItemStack(m_LightoniumHoe, 1), new Object []{ "yy " , " z " , " z " ,
    Character.valueOf('y'), m_Lightoniumshard
    , Character.valueOf('z'), Item.stick });
    //Lightonium Sword Recipe
    ModLoader.addRecipe(new ItemStack(m_LightoniumSword, 1), new Object []{ " y " , " y " , " z " ,
    Character.valueOf('y'), m_Lightoniumshard
    , Character.valueOf('z'), Item.stick });
    //BloodRock Pickaxe Recipe
    ModLoader.addRecipe(new ItemStack(m_BloodRockPickaxe, 1), new Object []{ "yyy" , " z " , " z " ,
    Character.valueOf('y'), m_Bloodshard
    , Character.valueOf('z'), Item.stick });
    //BloodRock Shovel Recipe
    ModLoader.addRecipe(new ItemStack(m_BloodRockShovel, 1), new Object []{ " y " , " z " , " z " ,
    Character.valueOf('y'), m_Bloodshard
    , Character.valueOf('z'), Item.stick });
    //BloodRock Axe Recipe
    ModLoader.addRecipe(new ItemStack(m_BloodRockAxe, 1), new Object []{ "yy " , "yz " , " z " ,
    Character.valueOf('y'), m_Bloodshard
    , Character.valueOf('z'), Item.stick });
    //BloodRock Hoe Recipe
    ModLoader.addRecipe(new ItemStack(m_BloodRockHoe, 1), new Object []{ "yy " , " z " , " z " ,
    Character.valueOf('y'), m_Bloodshard
    , Character.valueOf('z'), Item.stick });
    //BloodRock Sword Recipe
    ModLoader.addRecipe(new ItemStack(m_BloodRockSword, 1), new Object []{ " y " , " y " , " z " ,
    Character.valueOf('y'), m_Bloodshard
    , Character.valueOf('z'), Item.stick });
    //Onyx Pickaxe Recipe
    ModLoader.addRecipe(new ItemStack(m_OnyxPickaxe, 1), new Object []{ "yyy" , " z " , " z " ,
    Character.valueOf('y'), m_Onyxgem
    , Character.valueOf('z'), Item.stick });
    //Onyx Shovel Recipe
    ModLoader.addRecipe(new ItemStack(m_OnyxShovel, 1), new Object []{ " y " , " z " , " z " ,
    Character.valueOf('y'), m_Onyxgem
    , Character.valueOf('z'), Item.stick });
    //Onyx Axe Recipe
    ModLoader.addRecipe(new ItemStack(m_OnyxAxe, 1), new Object []{ "yy " , "yz " , " z " ,
    Character.valueOf('y'), m_Onyxgem
    , Character.valueOf('z'), Item.stick });
    //Onyx Hoe Recipe
    ModLoader.addRecipe(new ItemStack(m_OnyxHoe, 1), new Object []{ "yy " , " z " , " z " ,
    Character.valueOf('y'), m_Onyxgem
    , Character.valueOf('z'), Item.stick });
    //Onyx Sword Recipe
    ModLoader.addRecipe(new ItemStack(m_OnyxSword, 1), new Object []{ " y " , " y " , " z " ,
    Character.valueOf('y'), m_Onyxgem
    , Character.valueOf('z'), Item.stick });

    //Furnace Recipes
    //Zirconiumore Smelting Recipe
    ModLoader.addSmelting
    (m_Zirconiumore.blockID, new ItemStack(m_Zirconiumingot, 1) );

    }

    public void GenerateSurface(World worldMod, Random rand, int i, int j)
    {
    for(int eexeop = 0; eexeop < 1; eexeop++)
    {
    int j6 = i + rand.nextInt(2);
    int k9 = rand.nextInt(16);
    int j12 = j + rand.nextInt(2);
    new WorldGenMinable(m_Zirconiumore.blockID, 50).generate(worldMod, rand, j6, k9, j12);
    }
    for(int uewg = 0; uewg < 1; uewg++)
    {
    int j6 = i + rand.nextInt(2);
    int k9 = rand.nextInt(16);
    int j12 = j + rand.nextInt(2);
    new WorldGenMinable(m_Bloodrockore.blockID, 50).generate(worldMod, rand, j6, k9, j12);
    }
    for(int vrxegsw = 0; vrxegsw < 1; vrxegsw++)
    {
    int j6 = i + rand.nextInt(16);
    int k9 = rand.nextInt(128);
    int j12 = j + rand.nextInt(16);
    new WorldGenMinable(m_Onyxore.blockID, 50).generate(worldMod, rand, j6, k9, j12);
    }
    for(int whrg = 0; whrg < 10; whrg++)
    {
    int j6 = i + rand.nextInt(16);
    int k9 = rand.nextInt(128);
    int j12 = j + rand.nextInt(16);
    new WorldGenMinable(m_Amathestore.blockID, 50).generate(worldMod, rand, j6, k9, j12);
    }
    for(int dsah = 0; dsah < 10; dsah++)
    {
    int j6 = i + rand.nextInt(16);
    int k9 = rand.nextInt(128);
    int j12 = j + rand.nextInt(16);
    new WorldGenMinable(m_Lightoniumore.blockID, 50).generate(worldMod, rand, j6, k9, j12);
    }
    }
    }
    </spoiler>

    and here is the error
    <spoiler>

    == MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
    # found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
    ram csvs, astyle, astyle config
    == Recompiling client ==
    > Cleaning bin
    > Recompiling
    '"C:\Program Files\Java\jdk1.6.0_24\bin\javac" -Xlint:-options -deprecation -g -
    source 1.6 -target 1....' failed : 1

    == ERRORS FOUND ==

    src\minecraft\net\minecraft\src\mod_motools.java:161: <identifier> expected
    ModLoader.setInGameHook(this, true, false);
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:161: illegal start of type
    ModLoader.setInGameHook(this, true, false);
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:161: illegal start of type
    ModLoader.setInGameHook(this, true, false);
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:161: illegal start of type
    ModLoader.setInGameHook(this, true, false);
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:162: <identifier> expected
    ModLoader.setInGUIHook(this, true, false);
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:162: illegal start of type
    ModLoader.setInGUIHook(this, true, false);
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:162: illegal start of type
    ModLoader.setInGUIHook(this, true, false);
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:162: illegal start of type
    ModLoader.setInGUIHook(this, true, false);
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:166: illegal start of expressio
    n
    public boolean onTickInGame(float f, Minecraft minecraft)
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:166: ';' expected
    public boolean onTickInGame(float f, Minecraft minecraft)
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:166: ';' expected
    public boolean onTickInGame(float f, Minecraft minecraft)
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:166: not a statement
    public boolean onTickInGame(float f, Minecraft minecraft)
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:166: ';' expected
    public boolean onTickInGame(float f, Minecraft minecraft)
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:174: illegal start of expressio
    n
    public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen
    )
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:174: ';' expected
    public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen
    )
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:174: ';' expected
    public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen
    )
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:174: not a statement
    public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen
    )
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:174: ';' expected
    public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen
    )
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:174: ';' expected
    public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen
    )

    ^

    src\minecraft\net\minecraft\src\mod_motools.java:190: illegal start of expressio
    n
    private static GuiScreen creativeInventory;
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:190: illegal start of expressio
    n
    private static GuiScreen creativeInventory;
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:190: ';' expected
    private static GuiScreen creativeInventory;
    ^

    src\minecraft\net\minecraft\src\mod_motools.java:190: not a statement
    private static GuiScreen creativeInventory;


    please help :(
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [SSP/SMP][1.3.2]Fossil / Archeology [v6.9 P-4]
    hey I love this mod I first got it in 1.7.3 and its awesome. So I was wondering whether I could borrow some of your egg code in my own mod please? :)
    Posted in: Minecraft Mods
  • 0

    posted a message on TechGuy's Modding Tutorials
    Quote from MinecraftTheGuys

    Why does my Minecraft crash when I make a stair block?

    Here is my code:

    The mod_MoreBlocks
    package net.minecraft.src;
    
    public class mod_Blocks extends BaseMod
    {
    public static final Block DiamondStairs = new BlockDiamondStairs(125, 0).setBlockName("DiamondStairs").setHardness(5F).setResistance(10F).setStepSound(Block.soundMetalFootstep);
    
    public void load()
    {
    DiamondStairs.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/moreblocks/diamondblock.png");
    ModLoader.registerBlock(DiamondStairs);
    ModLoader.addName(DiamondStairs, "Diamond Stairs");
    ModLoader.addRecipe(new ItemStack(DiamondStairs, 1), new Object [] {"# ", "## ", "###", Character.valueOf('#'), Item.diamond});
    }
    public String getVersion()
    {
    return "More Blocks, by MinecraftTheGuys [1.2.5]";
    }
    }


    The Block:
    package net.minecraft.src;
    
    import java.util.ArrayList;
    public class BlockDiamondStairs extends Block
    {
    public BlockDiamondStairs(int i, int j)
    {
    super(i, j, Material.rock);
    }
    public void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist)
    {
    int l = world.getBlockMetadata(i, j, k);
    if (l == 0)
    {
    setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    } else if (l == 1)
    {
    setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    } else if (l == 2)
    {
    setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    } else if (l == 3)
    {
    setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    }
    setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    }
    public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
    {
    int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
    if (l == 0)
    {
    world.setBlockMetadataWithNotify(i, j, k, 2);
    } if (l == 1)
    {
    world.setBlockMetadataWithNotify(i, j, k, 1);
    } if (l == 2)
    {
    world.setBlockMetadataWithNotify(i, j, k, 3);
    } if (l == 3)
    {
    world.setBlockMetadataWithNotify(i, j, k, 0);
    }
    }
    public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k)
    { setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    } public boolean isOpaqueCube()
    { return false;
    } public boolean renderAsNormalBlock()
    { return false;
    } public int getRenderType()
    {
    return 10;
    }
    }


    The error:
    Why does my Minecraft crash when I make a stair block?

    Here is my code:

    The mod_MoreBlocks
    package net.minecraft.src;
    
    public class mod_Blocks extends BaseMod
    {
    public static final Block DiamondStairs = new BlockDiamondStairs(125, 0).setBlockName("DiamondStairs").setHardness(5F).setResistance(10F).setStepSound(Block.soundMetalFootstep);
    
    public void load()
    {
    DiamondStairs.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/moreblocks/diamondblock.png");
    ModLoader.registerBlock(DiamondStairs);
    ModLoader.addName(DiamondStairs, "Diamond Stairs");
    ModLoader.addRecipe(new ItemStack(DiamondStairs, 1), new Object [] {"# ", "## ", "###", Character.valueOf('#'), Item.diamond});
    }
    public String getVersion()
    {
    return "More Blocks, by MinecraftTheGuys [1.2.5]";
    }
    }


    The Block:
    package net.minecraft.src;
    
    import java.util.ArrayList;
    public class BlockDiamondStairs extends Block
    {
    public BlockDiamondStairs(int i, int j)
    {
    super(i, j, Material.rock);
    }
    public void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist)
    {
    int l = world.getBlockMetadata(i, j, k);
    if (l == 0)
    {
    setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    } else if (l == 1)
    {
    setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    } else if (l == 2)
    {
    setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    } else if (l == 3)
    {
    setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
    super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
    }
    setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    }
    public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
    {
    int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
    if (l == 0)
    {
    world.setBlockMetadataWithNotify(i, j, k, 2);
    } if (l == 1)
    {
    world.setBlockMetadataWithNotify(i, j, k, 1);
    } if (l == 2)
    {
    world.setBlockMetadataWithNotify(i, j, k, 3);
    } if (l == 3)
    {
    world.setBlockMetadataWithNotify(i, j, k, 0);
    }
    }
    public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k)
    { setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    } public boolean isOpaqueCube()
    { return false;
    } public boolean renderAsNormalBlock()
    { return false;
    } public int getRenderType()
    {
    return 10;
    }
    }


    The error:

    java.lang.StringIndexOutOfBoundsException: String index out of range: 8
    at java.lang.String.charAt(Unknown Source)
    at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:394)
    at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:412)
    at net.minecraft.src.mod_Blocks.load(mod_Blocks.java:12)
    at net.minecraft.src.ModLoader.init(ModLoader.java:856)
    at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
    at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
    at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
    at net.minecraft.client.Minecraft.run(Minecraft.java:786)
    at java.lang.Thread.run(Unknown Source)

    Please help!

    The hole thing is wired because I edited it. :/


    does it recompile properly?
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on TechGuy's Modding Tutorials
    Quote from Asyncronous

    lol i think you would have to remove all instances of the AI also, try that and get back to me


    how do I do this? :huh:
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on TechGuy's Modding Tutorials
    hey techguy just wondering can you do a tutorial on making a vehicle like a boat or a minecart that would realy help me thanks :)
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1, Aug, 2012] FullMetalScripting *NEW Entity Extensions!*
    hi your bow tutorial didn't work for me, so I was wondering what version of minecraft it was for
    Quote from Tusason

    Something is wrong with
    entityarrow.func_46023_b(k);


    that happened with me too
    Posted in: Tutorials
  • 0

    posted a message on [ModLoader][1.2.4]Spaces Tutorials *New Biome Tutorial*
    Quote from Spaces

    [size=large]Dimension[/size]
    For this tutorial you need Puddlehund's Dimension API which can be found here.

    Your mod_ file

    package net.minecraft.src;
    
    public class mod_Tutorial extends BaseMod{
    
    	public static final Item tutorial = new ItemTutorial(250, 0).setItemName("Derp");
    	
    	public mod_Tutorial() {
    		DimensionAPI.registerDimension(new WorldProviderTutorial());
    	}
    	
    	public String getVersion() {
    		return "Spaces Tutorials!";
    	}
    
    	public void load() {
    		ModLoader.addName(tutorial,"Tutorial Portal");
    	 ModLoader.addRecipe(new ItemStack(tutorial, 1), new Object[] {"#", Character.valueOf('#'), Block.dirt});
    	 }
    }


    Your WorldProvider file

    package net.minecraft.src;
    
    public class WorldProviderTutorial extends WorldProviderBase
    {
    	public int getDimensionID()
    	{
    		return 3;
    	}
    	
    	public boolean renderClouds()
    	{
    			return true;
    	}
    
    	public boolean renderVoidFog()
    	{
    			return false;
    	}
    
    	public float setSunSize()
    	{
    			return 0.5F;
    	}
    
    	public float setMoonSize()
    	{
    			return 0.5F;
    	}
    
    	public boolean renderStars()
    	{
    			return true;
    	}
    
    	public boolean darkenSkyDuringRain()
    	{
    			return false;
    	}
    
    	public String getRespawnMessage()
    	{
    			return "Your a derp.";
    	}
    
    	public void registerWorldChunkManager()
    	{
    			worldChunkMgr = new WorldChunkManagerTutorial(worldObj);
    	}
    	
    	public IChunkProvider getChunkProvider()
    	{
    			return new ChunkProviderTutorial(worldObj, worldObj.getSeed(), hasNoSky);
    	}
    }



    Your ChunkManager file

    package net.minecraft.src;
    
    import java.util.List;
    import java.util.Random;
    
    public class ChunkProviderTutorial implements IChunkProvider
    {
    	private World worldObj;
    	private Random random;
    	private final boolean useStructures;
    	private MapGenVillage villageGen;
    
    	public ChunkProviderTutorial(World par1World, long par2, boolean par4)
    	{
    		villageGen = new MapGenVillage(1);
    		worldObj = par1World;
    		useStructures = par4;
    		random = new Random(par2);
    	}
    
    	private void generate(byte par1ArrayOfByte[])
    	{
    		int i = par1ArrayOfByte.length / 256;
    
    		for (int j = 0; j < 16; j++)
    		{
    			for (int k = 0; k < 16; k++)
    			{
    				for (int l = 0; l < i; l++)
    				{
    					int i1 = 0;
    
    					if (l == 0)
    					{
    						i1 = Block.bedrock.blockID;
    					}
    					else if (l <= 2)
    					{
    						i1 = Block.dirt.blockID;
    					}
    					else if (l == 3)
    					{
    						i1 = Block.grass.blockID;
    					}
    
    					par1ArrayOfByte[j << 11 | k << 7 | l] = (byte)i1;
    				}
    			}
    		}
    	}
    
    	/**
    	 * Creates an empty chunk ready to put data from the server in
    	 */
    	public Chunk loadChunk(int par1, int par2)
    	{
    		return provideChunk(par1, par2);
    	}
    
    	/**
    	 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
    	 * specified chunk from the map seed and chunk seed
    	 */
    	public Chunk provideChunk(int par1, int par2)
    	{
    		byte abyte0[] = new byte[32768];
    		generate(abyte0);
    		Chunk chunk = new Chunk(worldObj, abyte0, par1, par2);
    
    		if (useStructures)
    		{
    			villageGen.generate(this, worldObj, par1, par2, abyte0);
    		}
    
    		chunk.generateSkylightMap();
    		return chunk;
    	}
    
    	/**
    	 * Checks to see if a chunk exists at x, y
    	 */
    	public boolean chunkExists(int par1, int par2)
    	{
    		return true;
    	}
    
    	/**
    	 * Populates chunk with ores etc etc
    	 */
    	public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
    	{
    		random.setSeed(worldObj.getSeed());
    		long l = (random.nextLong() / 2L) * 2L + 1L;
    		long l1 = (random.nextLong() / 2L) * 2L + 1L;
    		random.setSeed((long)par2 * l + (long)par3 * l1 ^ worldObj.getSeed());
    
    		if (useStructures)
    		{
    			villageGen.generateStructuresInChunk(worldObj, random, par2, par3);
    		}
    	}
    
    	/**
    	 * Two modes of operation: if passed true, save all Chunks in one go. If passed false, save up to two chunks.
    	 * Return true if all chunks have been saved.
    	 */
    	public boolean saveChunks(boolean par1, IProgressUpdate par2IProgressUpdate)
    	{
    		return true;
    	}
    
    	/**
    	 * Unloads the 100 oldest chunks from memory, due to a bug with chunkSet.add() never being called it thinks the list
    	 * is always empty and will not remove any chunks.
    	 */
    	public boolean unload100OldestChunks()
    	{
    		return false;
    	}
    
    	/**
    	 * Returns if the IChunkProvider supports saving.
    	 */
    	public boolean canSave()
    	{
    		return true;
    	}
    
    	/**
    	 * Converts the instance data to a readable string.
    	 */
    	public String makeString()
    	{
    		return "FlatLevelSource";
    	}
    
    	/**
    	 * Returns a list of creatures of the specified type that can spawn at the given location.
    	 */
    	public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4)
    	{
    		BiomeGenBase biomegenbase = worldObj.func_48454_a(par2, par4);
    
    		if (biomegenbase == null)
    		{
    			return null;
    		}
    		else
    		{
    			return biomegenbase.getSpawnableList(par1EnumCreatureType);
    		}
    	}
    
    	/**
    	 * Returns the location of the closest structure of the specified type. If not found returns null.
    	 */
    	public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int i, int j)
    	{
    		return null;
    	}
    }



    Your WorldChunkManager file

    package net.minecraft.src;
    
    import java.util.*;
    
    public class WorldChunkManagerTutorial extends WorldChunkManager
    {
    	private GenLayer genBiomes;
    
    	/** A GenLayer containing the indices into BiomeGenBase.biomeList[] */
    	private GenLayer biomeIndexLayer;
    
    	/** The BiomeCache object for this world. */
    	private BiomeCache biomeCache;
    
    	/** A list of biomes that the player can spawn in. */
    	private List biomesToSpawnIn;
    
    	protected WorldChunkManagerTutorial()
    	{
    		biomeCache = new BiomeCache(this);
    		biomesToSpawnIn = new ArrayList();
    		biomesToSpawnIn.add(BiomeGenBase.forest);
    		biomesToSpawnIn.add(BiomeGenBase.plains);
    		biomesToSpawnIn.add(BiomeGenBase.taiga);
    		biomesToSpawnIn.add(BiomeGenBase.taigaHills);
    		biomesToSpawnIn.add(BiomeGenBase.forestHills);
    		biomesToSpawnIn.add(BiomeGenBase.field_48416_w);
    		biomesToSpawnIn.add(BiomeGenBase.field_48417_x);
    		biomesToSpawnIn.add(BiomeGenBase.virus);
    	}
    
    	public WorldChunkManagerTutorial(long par1, WorldType par3WorldType)
    	{
    		this();
    		GenLayer agenlayer[] = GenLayer.func_48425_a(par1, par3WorldType);
    		genBiomes = agenlayer[0];
    		biomeIndexLayer = agenlayer[1];
    	}
    
    	public WorldChunkManagerTutorial(World par1World)
    	{
    		this(par1World.getSeed(), par1World.getWorldInfo().getTerrainType());
    	}
    
    	/**
    	 * Gets the list of valid biomes for the player to spawn in.
    	 */
    	public List getBiomesToSpawnIn()
    	{
    		return biomesToSpawnIn;
    	}
    
    	/**
    	 * Returns the BiomeGenBase related to the x, z position on the world.
    	 */
    	public BiomeGenBase getBiomeGenAt(int par1, int par2)
    	{
    		return biomeCache.getBiomeGenAt(par1, par2);
    	}
    
    	/**
    	 * Returns a list of rainfall values for the specified blocks. Args: listToReuse, x, z, width, length.
    	 */
    	public float[] getRainfall(float par1ArrayOfFloat[], int par2, int par3, int par4, int par5)
    	{
    		IntCache.resetIntCache();
    
    		if (par1ArrayOfFloat == null || par1ArrayOfFloat.length < par4 * par5)
    		{
    			par1ArrayOfFloat = new float[par4 * par5];
    		}
    
    		int ai[] = biomeIndexLayer.getInts(par2, par3, par4, par5);
    
    		for (int i = 0; i < par4 * par5; i++)
    		{
    			float f = (float)BiomeGenBase.biomeList[ai[i]].getIntRainfall() / 65536F;
    
    			if (f > 1.0F)
    			{
    				f = 1.0F;
    			}
    
    			par1ArrayOfFloat[i] = f;
    		}
    
    		return par1ArrayOfFloat;
    	}
    
    	/**
    	 * Return an adjusted version of a given temperature based on the y height
    	 */
    	public float getTemperatureAtHeight(float par1, int par2)
    	{
    		return par1;
    	}
    
    	/**
    	 * Returns a list of temperatures to use for the specified blocks. Args: listToReuse, x, y, width, length
    	 */
    	public float[] getTemperatures(float par1ArrayOfFloat[], int par2, int par3, int par4, int par5)
    	{
    		IntCache.resetIntCache();
    
    		if (par1ArrayOfFloat == null || par1ArrayOfFloat.length < par4 * par5)
    		{
    			par1ArrayOfFloat = new float[par4 * par5];
    		}
    
    		int ai[] = biomeIndexLayer.getInts(par2, par3, par4, par5);
    
    		for (int i = 0; i < par4 * par5; i++)
    		{
    			float f = (float)BiomeGenBase.biomeList[ai[i]].getIntTemperature() / 65536F;
    
    			if (f > 1.0F)
    			{
    				f = 1.0F;
    			}
    
    			par1ArrayOfFloat[i] = f;
    		}
    
    		return par1ArrayOfFloat;
    	}
    
    	/**
    	 * Returns an array of biomes for the location input.
    	 */
    	public BiomeGenBase[] getBiomesForGeneration(BiomeGenBase par1ArrayOfBiomeGenBase[], int par2, int par3, int par4, int par5)
    	{
    		IntCache.resetIntCache();
    
    		if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
    		{
    			par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
    		}
    
    		int ai[] = genBiomes.getInts(par2, par3, par4, par5);
    
    		for (int i = 0; i < par4 * par5; i++)
    		{
    			par1ArrayOfBiomeGenBase[i] = BiomeGenBase.biomeList[ai[i]];
    		}
    
    		return par1ArrayOfBiomeGenBase;
    	}
    
    	/**
    	 * Returns biomes to use for the blocks and loads the other data like temperature and humidity onto the
    	 * WorldChunkManager Args: oldBiomeList, x, z, width, depth
    	 */
    	public BiomeGenBase[] loadBlockGeneratorData(BiomeGenBase par1ArrayOfBiomeGenBase[], int par2, int par3, int par4, int par5)
    	{
    		return getBiomeGenAt(par1ArrayOfBiomeGenBase, par2, par3, par4, par5, true);
    	}
    
    	/**
    	 * Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length, cacheFlag (if false,
    	 * don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
    	 */
    	public BiomeGenBase[] getBiomeGenAt(BiomeGenBase par1ArrayOfBiomeGenBase[], int par2, int par3, int par4, int par5, boolean par6)
    	{
    		IntCache.resetIntCache();
    
    		if (par1ArrayOfBiomeGenBase == null || par1ArrayOfBiomeGenBase.length < par4 * par5)
    		{
    			par1ArrayOfBiomeGenBase = new BiomeGenBase[par4 * par5];
    		}
    
    		if (par6 && par4 == 16 && par5 == 16 && (par2 & 0xf) == 0 && (par3 & 0xf) == 0)
    		{
    			BiomeGenBase abiomegenbase[] = biomeCache.getCachedBiomes(par2, par3);
    			System.arraycopy(abiomegenbase, 0, par1ArrayOfBiomeGenBase, 0, par4 * par5);
    			return par1ArrayOfBiomeGenBase;
    		}
    
    		int ai[] = biomeIndexLayer.getInts(par2, par3, par4, par5);
    
    		for (int i = 0; i < par4 * par5; i++)
    		{
    			par1ArrayOfBiomeGenBase[i] = BiomeGenBase.biomeList[ai[i]];
    		}
    
    		return par1ArrayOfBiomeGenBase;
    	}
    
    	/**
    	 * checks given Chunk's Biomes against List of allowed ones
    	 */
    	public boolean areBiomesViable(int par1, int par2, int par3, List par4List)
    	{
    		int i = par1 - par3 >> 2;
    		int j = par2 - par3 >> 2;
    		int k = par1 + par3 >> 2;
    		int l = par2 + par3 >> 2;
    		int i1 = (k - i) + 1;
    		int j1 = (l - j) + 1;
    		int ai[] = genBiomes.getInts(i, j, i1, j1);
    
    		for (int k1 = 0; k1 < i1 * j1; k1++)
    		{
    			BiomeGenBase biomegenbase = BiomeGenBase.biomeList[ai[k1]];
    
    			if (!par4List.contains(biomegenbase))
    			{
    				return false;
    			}
    		}
    
    		return true;
    	}
    
    	/**
    	 * Finds a valid position within a range, that is once of the listed biomes.
    	 */
    	public ChunkPosition findBiomePosition(int par1, int par2, int par3, List par4List, Random par5Random)
    	{
    		int i = par1 - par3 >> 2;
    		int j = par2 - par3 >> 2;
    		int k = par1 + par3 >> 2;
    		int l = par2 + par3 >> 2;
    		int i1 = (k - i) + 1;
    		int j1 = (l - j) + 1;
    		int ai[] = genBiomes.getInts(i, j, i1, j1);
    		ChunkPosition chunkposition = null;
    		int k1 = 0;
    
    		for (int l1 = 0; l1 < ai.length; l1++)
    		{
    			int i2 = i + l1 % i1 << 2;
    			int j2 = j + l1 / i1 << 2;
    			BiomeGenBase biomegenbase = BiomeGenBase.biomeList[ai[l1]];
    
    			if (par4List.contains(biomegenbase) && (chunkposition == null || par5Random.nextInt(k1 + 1) == 0))
    			{
    				chunkposition = new ChunkPosition(i2, 0, j2);
    				k1++;
    			}
    		}
    
    		return chunkposition;
    	}
    
    	/**
    	 * Calls the WorldChunkManager's biomeCache.cleanupCache()
    	 */
    	public void cleanupCache()
    	{
    		biomeCache.cleanupCache();
    	}
    }



    Your Teleporter file

    package net.minecraft.src;
    
    public class TeleporterTutorial extends Teleporter{}



    Your Item file

    package net.minecraft.src;
    
    import java.util.ArrayList;
    import java.util.List;
    
    public class ItemTutorial extends ItemTeleporterBase
    {
    		public ItemTutorial(int i, int j)
    		{
    				super(i);
    		}
    		
    		public WorldProviderBase getDimension()
    		{
    				return new WorldProviderTutorial();
    		}
    
    		public TeleporterTutorial getTeleporter()
    		{
    				return new TeleporterTutorial();
    		}
    
    		public String getEnteringMessage()
    		{
    				return "Entering the Tutorial Dimension";
    		}
    
    		public String getLeavingMessage()
    		{
    				return "Leaving the Tutorial Dimension";
    		}
    
    		public boolean isPortalImmediate()
    		{
    				return true;
    		}
    
    		public boolean displayPortalAnimation()
    		{
    				return true;
    		}
    
    		public int returnsPlayerToDimension()
    		{
    				return 0;
    		}
    
    		public double getDistanceRatio()
    		{
    				return 0.2D;
    		}
    
    		public int getPortalDelay()
    		{
    				return 150;
    		}
    }




    I edited Puddlehund's ItemTeleporterBase to make this work so here it is

    package net.minecraft.src;
    
    import java.util.ArrayList;
    import java.util.List;
    
    public abstract class ItemTeleporterBase extends Item
    	implements ISpecialTeleportation
    {
    	public ItemTeleporterBase(int i)
    	{
    		super(i);
    	}
    
    	public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
    	{
    		if (!world.isRemote)
    		{
    			DimensionAPI.setInPortal(getDimension(), ModLoader.getMinecraftInstance(), (EntityPlayerSP)entityplayer, this, null);
    		}
    		if (displayPortalOverlay())
    		{
    			GuiIngame.currentPortal = this;
    			entityplayer.setInPortal();
    			if(entityplayer.timeInPortal >= 0.9F)
    			{
    				entityplayer.timeInPortal = 0.0F;
    				GuiIngame.currentPortal = null;
    			}
    		}
    		return itemstack;
    	}
    	
    	public abstract WorldProviderBase getDimension();
    
    	public abstract TeleporterTutorial getTeleporter();
    
    	public abstract String getEnteringMessage();
    
    	public abstract String getLeavingMessage();
    
    	public boolean isPortalImmediate()
    	{
    		return true;
    	}
    	
    	public boolean displayPortalOverlay()
    	{
    		return false;
    	}
    
    	public int getOverlayTexture()
    	{
    		return Block.portal.blockIndexInTexture;
    	}
    
    	public List canTeleportFromDimension()
    	{
    		ArrayList arraylist = new ArrayList();
    		arraylist.add(Integer.valueOf(0));
    		return arraylist;
    	}
    
    	public int returnsPlayerToDimension()
    	{
    		return 0;
    	}
    
    	public double getDistanceRatio()
    	{
    		return 1.0D;
    	}
    
    	public int getPortalDelay()
    	{
    		return 0;
    	}
    
    	public Achievement triggerAchievement()
    	{
    		return null;
    	}
    }


    [size=large]Explanation[/size]
    [size=medium]
    [/size]
    Im not really going to explain anything because this is some advanced stuff and Puddlehund's Dimension API makes it alot more easier.





    this did not work for me what are you meant to decompile the minecraft.jar with?

    like what mods as in do you use modloadermp as well?
    Posted in: Tutorials
  • 0

    posted a message on TechGuy's Modding Tutorials
    is it possible to make an Entity not move at all so it doesn't turn around either because I want to make an egg as a mob but I made so it can't move but it can stil turn around please help :(
    Posted in: Mapping and Modding Tutorials
  • 1

    posted a message on TechGuy's Modding Tutorials
    Quote from Bluestone12

    I decided to make a simple gems mod, but every time I tested minecraft, it says
    Mods loaded: 2
    ModLoader 1.2.5
    mod_Gems 1.2.5

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

    Minecraft has stopped running because it encountered a problem.




    --- BEGIN ERROR REPORT eca9b7ce --------
    Generated 7/20/12 12:33 PM

    Minecraft: Minecraft 1.2.5
    OS: Windows Vista (x86) version 6.0
    Java: 1.7.0_05, Oracle Corporation
    VM: Java HotSpotâ„¢ Client VM (mixed mode), Oracle Corporation
    LWJGL: 2.4.2
    OpenGL: GeForce 7150M / nForce 630M/PCI/SSE2/3DNOW! version 2.1.1, NVIDIA Corporation

    java.lang.RuntimeException: java.lang.Exception: Image not found: /items/SapphireOre
    at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
    at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
    at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
    at net.minecraft.client.Minecraft.run(Minecraft.java:801)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.Exception: Image not found: /items/SapphireOre
    at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
    at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
    ... 5 more
    --- END ERROR REPORT 4fa10203 ----------
    Please help this happens every time I try to get an image to work. :(
    Never mind, I derped badly, just didn't put the .png extension. :D Sorry for wasting your time.


    you need to put .png at the end of SapphireOre so it would look like this /items/SapphireOre.png hope I helped :)
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on TechGuy's Modding Tutorials
    nvm I'll figure it out for myself
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on TechGuy's Modding Tutorials
    Hey tech guy I went to those tutorials you told me to try out for making a block with a custom model and I got errors and he wouldn't help me so I was wondering whether you would be able to understand any of it please help :(


    == MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
    # found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
    ram csvs, astyle, astyle config
    == Recompiling client ==
    > Cleaning bin
    > Recompiling
    '"C:\Program Files\Java\jdk1.6.0_24\bin\javac" -Xlint:-options -deprecation -g -
    source 1.6 -target 1....' failed : 1

    == ERRORS FOUND ==

    src\minecraft\net\minecraft\src\mod_PygmyEgg.java:21: <identifier> expected
    ModLoader.registerBlock(blockPygmyEgg);
    ^

    src\minecraft\net\minecraft\src\mod_PygmyEgg.java:21: <identifier> expected
    ModLoader.registerBlock(blockPygmyEgg);
    ^

    src\minecraft\net\minecraft\src\mod_PygmyEgg.java:23: <identifier> expected
    ModLoader.registerTileEntity(TileEntityPygmyEgg.class, "PygmyEgg
    ", tileent1);
    ^

    src\minecraft\net\minecraft\src\mod_PygmyEgg.java:23: <identifier> expected
    ModLoader.registerTileEntity(TileEntityPygmyEgg.class, "PygmyEgg
    ", tileent1);
    ^

    src\minecraft\net\minecraft\src\mod_PygmyEgg.java:23: illegal start of type
    ModLoader.registerTileEntity(TileEntityPygmyEgg.class, "PygmyEgg
    ", tileent1);
    ^

    src\minecraft\net\minecraft\src\mod_PygmyEgg.java:23: <identifier> expected
    ModLoader.registerTileEntity(TileEntityPygmyEgg.class, "PygmyEgg
    ", tileent1);

    ^

    src\minecraft\net\minecraft\src\mod_PygmyEgg.java:26: class, interface, or enum
    expected
    public String getVersion()
    ^

    src\minecraft\net\minecraft\src\mod_PygmyEgg.java:29: class, interface, or enum
    expected
    }
    ^

    src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:50: illegal star
    t of expression
    [left]i = tile.getBlockMetadata();[left];
    ^

    src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:50: not a statem
    ent
    [left]i = tile.getBlockMetadata();[left];
    ^

    src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:50: ';' expected

    [left]i = tile.getBlockMetadata();[left];
    ^

    src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:50: illegal star
    t of expression
    [left]i = tile.getBlockMetadata();[left];
    ^

    src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:50: not a statem
    ent
    [left]i = tile.getBlockMetadata();[left];
    ^

    src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:50: ';' expected

    [left]i = tile.getBlockMetadata();[left];
    ^

    14 errors
    ==================

    !! Can not find server sources, try decompiling !!
    Press any key to continue . . .

    sorry I didn't put it in a spoiler but I don't know how :(

    nvm this I wittled it down to two errors so you fon't have to worry about most of this stuff :)
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1.4.7][Forge](19/2/13) Ducky's Modding Tutorials! Make Your Blocks NICE!
    Hey ducky love your tutorials but I got this error and I was wondering whether you could help?


    src\minecraft\net\minecraft\src\BlockPygmyEgg.java:12: package mod_PygmyEgg does
    not exist
    return mod_PygmyEgg.itemPygmyEgg.shiftedIndex;
    ^

    src\minecraft\net\minecraft\src\mod_PygmyMod.java:5: cannot find symbol
    symbol : constructor BlockPygmyEgg(int,int)
    location: class net.minecraft.src.BlockPygmyEgg
    public static final Block PygmyEgg = new BlockPygmyEgg(160, 0).setBlockName("any
    PygmyEgg").setHardness(3F).setResistance(4F).setLightValue(1F);
    ^

    src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:41: cannot find
    symbol
    symbol : method renderModel(float)
    location: class net.minecraft.src.ModelPygmyEgg
    model.renderModel(0.0625F); //renders and yes 0.0625 is a random
    number
    ^

    nvm first error I fixed that :P

    nvm third error either I fixed that too :P

    nvm I fixed all of them :P
    Posted in: Tutorials
  • 0

    posted a message on [1.5.1/1.5.2] "Simply Horses!" Mod - Alpha 0.6.2 (Bugfixes and Textures!)
    Quote from Lil Avii

    @mynamedotorgdotcom, no, you may not use any of my code in your mod. Stop decompiling my mod!!

    I wasn't decompiling it it's just that its hard to make it so when you ride a mob you can control sorry if it made you angry :(

    @MusicFox, Hmm.. Could you screen cap all these herds?
    Posted in: WIP Mods
  • 0

    posted a message on [1.5.1/1.5.2] "Simply Horses!" Mod - Alpha 0.6.2 (Bugfixes and Textures!)
    hey could I use your tamed horses class in my own mod so I can control the mounted mobs movement?
    Posted in: WIP Mods
  • 0

    posted a message on TechGuy's Modding Tutorials
    Do you know how to make a mob fly? And also is it possible to make a mob peaceful at day time and then at night change it's model to a ferocious beast that attacks any and all? And is it possible to generate a structure form the resources file like with fossil archaeology mod and there are schematics for the structures in the resources file which generate?also how do you open the example gui?

    (sorry if it makes no sense with the second to last question :( )

    It would be greatly appreciated :Diamond:
    Posted in: Mapping and Modding Tutorials
  • To post a comment, please .