src\minecraft\net\minecraft\src\mod_motools.java:165: cannot find symbol
symbol : class Minecraft
location: class net.minecraft.src.mod_motools
public boolean onTickInGame(float f, Minecraft minecraft)
^
src\minecraft\net\minecraft\src\mod_motools.java:173: cannot find symbol
symbol : class Minecraft
location: class net.minecraft.src.mod_motools
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen)
^
src\minecraft\net\minecraft\src\mod_motools.java:178: cannot find symbol
symbol : class List
location: class net.minecraft.src.mod_motools
List list = ((ContainerCreative)container).itemList;
^
3 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
and here is my code
package net.minecraft.src;
import java.util.Random;
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(2267)
.setItemName("m_Amathestshard");
//Declare Zirconiumingot
public static final Item m_Zirconiumingot = new Zirconiumingot(2268)
.setItemName("m_Zirconiumingot");
//Declare Bloodshard
public static final Item m_Bloodshard = new Bloodshard(2269)
.setItemName("m_Bloodshard");
//Declare Lightoniumshard
public static final Item m_Lightoniumshard = new Lightoniumshard(2270)
.setItemName("m_Lightoniumshard");
//Declare Onyxgem
public static final Item m_Onyxgem = new Onyxgem(2271)
.setItemName("m_Onyxgem");
//Declare Amathest Pickaxe
public static final Item m_AmathestPickaxe = new ItemPickaxeAmathest(4748, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestPickaxe");
//Declare Amathest Shovel
public static final Item m_AmathestShovel = new ItemShovelAmathest(4749, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestShovel");
//Declare Amathest Axe
public static final Item m_AmathestAxe = new ItemAxeAmathest(4750, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestAxe");
//Declare Amathest Hoe
public static final Item m_AmathestHoe = new ItemHoeAmathest(4751, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestHoe");
//Declare Amathest Sword
public static final Item m_AmathestSword = new ItemSwordAmathest(4752, 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(2274, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumPickaxe");
//Declare Lightonium Shovel
public static final Item m_LightoniumShovel = new ItemShovelLightonium(2275, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumShovel");
//Declare Lightonium Axe
public static final Item m_LightoniumAxe = new ItemAxeLightonium(2276, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumAxe");
//Declare Lightonium Hoe
public static final Item m_LightoniumHoe = new ItemHoeLightonium(2277, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumHoe");
//Declare Lightonium Sword
public static final Item m_LightoniumSword = new ItemSwordLightonium(2278, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumSword");
//Declare BloodRock Pickaxe
public static final Item m_BloodRockPickaxe = new ItemPickaxeBloodRock(2275, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockPickaxe");
//Declare BloodRock Shovel
public static final Item m_BloodRockShovel = new ItemShovelBloodRock(2276, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockShovel");
//Declare BloodRock Axe
public static final Item m_BloodRockAxe = new ItemAxeBloodRock(2277, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockAxe");
//Declare BloodRock Hoe
public static final Item m_BloodRockHoe = new ItemHoeBloodRock(2278, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockHoe");
//Declare BloodRock Sword
public static final Item m_BloodRockSword = new ItemSwordBloodRock(2279, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockSword");
//Declare Onyx Pickaxe
public static final Item m_OnyxPickaxe = new ItemPickaxeOnyx(2276, EnumToolOnyx.ONYX)
.setItemName("m_OnyxPickaxe");
//Declare Onyx Shovel
public static final Item m_OnyxShovel = new ItemShovelOnyx(2277, EnumToolOnyx.ONYX)
.setItemName("m_OnyxShovel");
//Declare Onyx Axe
public static final Item m_OnyxAxe = new ItemAxeOnyx(2278, EnumToolOnyx.ONYX)
.setItemName("m_OnyxAxe");
//Declare Onyx Hoe
public static final Item m_OnyxHoe = new ItemHoeOnyx(2279, EnumToolOnyx.ONYX)
.setItemName("m_OnyxHoe");
//Declare Onyx Sword
public static final Item m_OnyxSword = new ItemSwordOnyx(2280, 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 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(m_Amathestore, 1, i));
list.add(new ItemStack(m_Zirconiumore, 1, i));
list.add(new ItemStack(m_Onyxore, 1, i));
}
creativeInventory = guiscreen;
return true;
}
private static GuiScreen creativeInventory;
public mod_motools()
{
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//motools/blocks/Amathestore.png");
m_Zirconiumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Zirconiumore.png");
m_Bloodrockore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/BloodRockore.png");
m_Lightoniumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Lightoniumore.png");
m_Onyxore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Onyxore.png");
//Items
m_Amathestshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestshard.png");
m_Zirconiumingot.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumingot.png");
m_Bloodshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodshard.png");
m_Lightoniumshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumshard.png");
m_Onyxgem.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxgem.png");
//ToolSets
m_AmathestPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestpickaxe.png");
m_AmathestShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestshovel.png");
m_AmathestAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestaxe.png");
m_AmathestHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathesthoe.png");
m_AmathestSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestsword.png");
m_ZirconiumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumpickaxe.png");
m_ZirconiumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumshovel.png");
m_ZirconiumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumaxe.png");
m_ZirconiumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumhoe.png");
m_ZirconiumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/mottools/items/Zirconiumsword.png");
m_LightoniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumpickaxe.png");
m_LightoniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumshovel.png");
m_LightoniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumaxe.png");
m_LightoniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumhoe.png");
m_LightoniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumsword.png");
m_BloodRockPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockpickaxe.png");
m_BloodRockShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockshovel.png");
m_BloodRockAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockaxe.png");
m_BloodRockHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockhoe.png");
m_BloodRockSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrocksword.png");
m_OnyxPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxpickaxe.png");
m_OnyxShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxshovel.png");
m_OnyxAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxaxe.png");
m_OnyxHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxhoe.png");
m_OnyxSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/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 < 16; eexeop++)
{
int j6 = i + rand.nextInt(2);
int k9 = rand.nextInt(16);
int j12 = j + rand.nextInt(2);
new WorldGenMinable(m_Zirconiumore.blockID, 2).generate(worldMod, rand, j6, k9, j12);
}
for(int uewg = 0; uewg < 16; uewg++)
{
int j6 = i + rand.nextInt(2);
int k9 = rand.nextInt(16);
int j12 = j + rand.nextInt(2);
new WorldGenMinable(m_Bloodrockore.blockID, 4).generate(worldMod, rand, j6, k9, j12);
}
for(int vrxegsw = 0; vrxegsw < 128; vrxegsw++)
{
int j6 = i + rand.nextInt(16);
int k9 = rand.nextInt(128);
int j12 = j + rand.nextInt(16);
new WorldGenMinable(m_Onyxore.blockID, 2).generate(worldMod, rand, j6, k9, j12);
}
}
}
please help
Edit: yay spoilers worked
I do not have 1.2.5 to test it out anymore, but from looking at the code you want to put everything that is in public mod_tools() (the image overrides, the recipies, and the add name) into public void load() as well... That should fix all of the errors unless I am missing something... most (but not all) of the ModLoader.stuff you want to put into the load method if you need it in your main mod class (the only exception is from what I believe is if you need a public static/void/boolean something in front of it for stuff like animation as an example)
For those wondering how to add your item/tool/whatever to the creative inventory, this can be achieved one of two ways (or both, it doesn't really have a different effect if used in tandem)
In your mod_whatever.java file, at an item declaration:
public static final Item Ingot/Item/Whatever = new Item(500).setItemName("Whatever").setTabToDisplayOn(CreativeTabs.tabMaterials);
And you'd change the CreativeTabs.whatever to the desired tab. This is slightly different for blocks, instead, it's:
.setCreativeTab(CreativeTabs.whatever);
The second way to do this is in your ItemWhatever.java file. It is as follows:
public ItemWhatever(int i, int j)
{
(other item stuff)
this.setTabToDisplayOn(CreativeTabs.whatever);
}
And for blocks, it's pretty much the same, just do this in the BlockWhatever.java file:
public BlockWhatever(int i, int j)
{
(other block stuff)
this.setCreativeTab(CreativeTabs.whatever);
}
The second one is more effective because whatever item/block is defined with that file is added to that tab unless told otherwise in your mod_Whatever file.
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
src\minecraft\net\minecraft\src\mod_motools.java:165: cannot find symbol
symbol : class Minecraft
location: class net.minecraft.src.mod_motools
public boolean onTickInGame(float f, Minecraft minecraft)
^
src\minecraft\net\minecraft\src\mod_motools.java:173: cannot find symbol
symbol : class Minecraft
location: class net.minecraft.src.mod_motools
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen)
^
src\minecraft\net\minecraft\src\mod_motools.java:178: cannot find symbol
symbol : class List
location: class net.minecraft.src.mod_motools
List list = ((ContainerCreative)container).itemList;
^
3 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
and here is my code
package net.minecraft.src;
import java.util.Random;
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(2267)
.setItemName("m_Amathestshard");
//Declare Zirconiumingot
public static final Item m_Zirconiumingot = new Zirconiumingot(2268)
.setItemName("m_Zirconiumingot");
//Declare Bloodshard
public static final Item m_Bloodshard = new Bloodshard(2269)
.setItemName("m_Bloodshard");
//Declare Lightoniumshard
public static final Item m_Lightoniumshard = new Lightoniumshard(2270)
.setItemName("m_Lightoniumshard");
//Declare Onyxgem
public static final Item m_Onyxgem = new Onyxgem(2271)
.setItemName("m_Onyxgem");
//Declare Amathest Pickaxe
public static final Item m_AmathestPickaxe = new ItemPickaxeAmathest(4748, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestPickaxe");
//Declare Amathest Shovel
public static final Item m_AmathestShovel = new ItemShovelAmathest(4749, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestShovel");
//Declare Amathest Axe
public static final Item m_AmathestAxe = new ItemAxeAmathest(4750, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestAxe");
//Declare Amathest Hoe
public static final Item m_AmathestHoe = new ItemHoeAmathest(4751, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestHoe");
//Declare Amathest Sword
public static final Item m_AmathestSword = new ItemSwordAmathest(4752, 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(2274, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumPickaxe");
//Declare Lightonium Shovel
public static final Item m_LightoniumShovel = new ItemShovelLightonium(2275, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumShovel");
//Declare Lightonium Axe
public static final Item m_LightoniumAxe = new ItemAxeLightonium(2276, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumAxe");
//Declare Lightonium Hoe
public static final Item m_LightoniumHoe = new ItemHoeLightonium(2277, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumHoe");
//Declare Lightonium Sword
public static final Item m_LightoniumSword = new ItemSwordLightonium(2278, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumSword");
//Declare BloodRock Pickaxe
public static final Item m_BloodRockPickaxe = new ItemPickaxeBloodRock(2275, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockPickaxe");
//Declare BloodRock Shovel
public static final Item m_BloodRockShovel = new ItemShovelBloodRock(2276, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockShovel");
//Declare BloodRock Axe
public static final Item m_BloodRockAxe = new ItemAxeBloodRock(2277, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockAxe");
//Declare BloodRock Hoe
public static final Item m_BloodRockHoe = new ItemHoeBloodRock(2278, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockHoe");
//Declare BloodRock Sword
public static final Item m_BloodRockSword = new ItemSwordBloodRock(2279, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockSword");
//Declare Onyx Pickaxe
public static final Item m_OnyxPickaxe = new ItemPickaxeOnyx(2276, EnumToolOnyx.ONYX)
.setItemName("m_OnyxPickaxe");
//Declare Onyx Shovel
public static final Item m_OnyxShovel = new ItemShovelOnyx(2277, EnumToolOnyx.ONYX)
.setItemName("m_OnyxShovel");
//Declare Onyx Axe
public static final Item m_OnyxAxe = new ItemAxeOnyx(2278, EnumToolOnyx.ONYX)
.setItemName("m_OnyxAxe");
//Declare Onyx Hoe
public static final Item m_OnyxHoe = new ItemHoeOnyx(2279, EnumToolOnyx.ONYX)
.setItemName("m_OnyxHoe");
//Declare Onyx Sword
public static final Item m_OnyxSword = new ItemSwordOnyx(2280, 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 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(m_Amathestore, 1, i));
list.add(new ItemStack(m_Zirconiumore, 1, i));
list.add(new ItemStack(m_Onyxore, 1, i));
}
creativeInventory = guiscreen;
return true;
}
private static GuiScreen creativeInventory;
public mod_motools()
{
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//motools/blocks/Amathestore.png");
m_Zirconiumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Zirconiumore.png");
m_Bloodrockore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/BloodRockore.png");
m_Lightoniumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Lightoniumore.png");
m_Onyxore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Onyxore.png");
//Items
m_Amathestshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestshard.png");
m_Zirconiumingot.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumingot.png");
m_Bloodshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodshard.png");
m_Lightoniumshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumshard.png");
m_Onyxgem.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxgem.png");
//ToolSets
m_AmathestPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestpickaxe.png");
m_AmathestShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestshovel.png");
m_AmathestAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestaxe.png");
m_AmathestHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathesthoe.png");
m_AmathestSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestsword.png");
m_ZirconiumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumpickaxe.png");
m_ZirconiumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumshovel.png");
m_ZirconiumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumaxe.png");
m_ZirconiumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumhoe.png");
m_ZirconiumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/mottools/items/Zirconiumsword.png");
m_LightoniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumpickaxe.png");
m_LightoniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumshovel.png");
m_LightoniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumaxe.png");
m_LightoniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumhoe.png");
m_LightoniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumsword.png");
m_BloodRockPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockpickaxe.png");
m_BloodRockShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockshovel.png");
m_BloodRockAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockaxe.png");
m_BloodRockHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockhoe.png");
m_BloodRockSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrocksword.png");
m_OnyxPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxpickaxe.png");
m_OnyxShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxshovel.png");
m_OnyxAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxaxe.png");
m_OnyxHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxhoe.png");
m_OnyxSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/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 < 16; eexeop++)
{
int j6 = i + rand.nextInt(2);
int k9 = rand.nextInt(16);
int j12 = j + rand.nextInt(2);
new WorldGenMinable(m_Zirconiumore.blockID, 2).generate(worldMod, rand, j6, k9, j12);
}
for(int uewg = 0; uewg < 16; uewg++)
{
int j6 = i + rand.nextInt(2);
int k9 = rand.nextInt(16);
int j12 = j + rand.nextInt(2);
new WorldGenMinable(m_Bloodrockore.blockID, 4).generate(worldMod, rand, j6, k9, j12);
}
for(int vrxegsw = 0; vrxegsw < 128; vrxegsw++)
{
int j6 = i + rand.nextInt(16);
int k9 = rand.nextInt(128);
int j12 = j + rand.nextInt(16);
new WorldGenMinable(m_Onyxore.blockID, 2).generate(worldMod, rand, j6, k9, j12);
}
}
}
package net.minecraft.src;
import java.util.ArrayList;
public class BlockironStairs extends Block
{
public BlockironStairs(int i, int j)
{
super(i, j, Material.iron);
}
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;
}
Error:
== MCP 7.0 (data: 7.0a, client: 1.3.1, server: 1.3.1) ==
# found jad, ff, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs
, param csvs, renumber csv, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files (x86)\Java\jdk1.6.0_30\bin\javac" -Xlint:-options -deprecatio
n -g -source 1.6 -tar...' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\BlockironStairs.java:19: cannot find symbol
symbol : method getCollidingBoundingBoxes(net.minecraft.src.World,int,int,int,n
et.minecraft.src.AxisAlignedBB,java.util.ArrayList)
location: class net.minecraft.src.Block
super.getCollidingBoundingBoxes(world, i, j, k, axisalig
nedbb, arraylist);
^
src\minecraft\net\minecraft\src\BlockironStairs.java:21: cannot find symbol
symbol : method getCollidingBoundingBoxes(net.minecraft.src.World,int,int,int,n
et.minecraft.src.AxisAlignedBB,java.util.ArrayList)
location: class net.minecraft.src.Block
super.getCollidingBoundingBoxes(world, i, j, k, axisalig
nedbb, arraylist);
^
src\minecraft\net\minecraft\src\BlockironStairs.java:26: cannot find symbol
symbol : method getCollidingBoundingBoxes(net.minecraft.src.World,int,int,int,n
et.minecraft.src.AxisAlignedBB,java.util.ArrayList)
location: class net.minecraft.src.Block
super.getCollidingBoundingBoxes(world, i, j, k, axisalig
nedbb, arraylist);
^
src\minecraft\net\minecraft\src\BlockironStairs.java:28: cannot find symbol
symbol : method getCollidingBoundingBoxes(net.minecraft.src.World,int,int,int,n
et.minecraft.src.AxisAlignedBB,java.util.ArrayList)
location: class net.minecraft.src.Block
super.getCollidingBoundingBoxes(world, i, j, k, axisalig
nedbb, arraylist);
^
src\minecraft\net\minecraft\src\BlockironStairs.java:33: cannot find symbol
symbol : method getCollidingBoundingBoxes(net.minecraft.src.World,int,int,int,n
et.minecraft.src.AxisAlignedBB,java.util.ArrayList)
location: class net.minecraft.src.Block
super.getCollidingBoundingBoxes(world, i, j, k, axisalig
nedbb, arraylist);
^
src\minecraft\net\minecraft\src\BlockironStairs.java:35: cannot find symbol
symbol : method getCollidingBoundingBoxes(net.minecraft.src.World,int,int,int,n
et.minecraft.src.AxisAlignedBB,java.util.ArrayList)
location: class net.minecraft.src.Block
super.getCollidingBoundingBoxes(world, i, j, k, axisalig
nedbb, arraylist);
^
src\minecraft\net\minecraft\src\BlockironStairs.java:40: cannot find symbol
symbol : method getCollidingBoundingBoxes(net.minecraft.src.World,int,int,int,n
et.minecraft.src.AxisAlignedBB,java.util.ArrayList)
location: class net.minecraft.src.Block
super.getCollidingBoundingBoxes(world, i, j, k, axisalig
nedbb, arraylist);
^
src\minecraft\net\minecraft\src\BlockironStairs.java:42: cannot find symbol
symbol : method getCollidingBoundingBoxes(net.minecraft.src.World,int,int,int,n
et.minecraft.src.AxisAlignedBB,java.util.ArrayList)
location: class net.minecraft.src.Block
super.getCollidingBoundingBoxes(world, i, j, k, axisalig
nedbb, arraylist);
^
8 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
I have looked in the Block file too, and there is no record of super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist); or anything similar.
At the bottom of BlockDirtCrop where it says "j = 0 return blockIndexInTexture;" replace that with "return mod_dirtcrop.cropStageOne;" but keep the j = 0. That work for me
Thank you verymuch
but wait does it mean that the crop has 2 stageOne
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
When i plant my crops, it remain in stageOne like forever but when I ''Save and Quit to the title'' and log back in some of them are fully grown . I think it has something to do with BlockDirtcrop right ?
Please help the crop is the main resource of my mod.
BlockDirtcrop
package net.minecraft.src;
import java.util.Random;
public class BlockDirtcrop extends BlockFlower
{
public BlockDirtcrop(int i, int j)
{
super(i, j);
blockIndexInTexture = j;
setTickRandomly(true);
float f = 0.5F;
setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
}
/**
* Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
* blockID passed in. Args: blockID.
* This basically checks to see if the block below is a tilled field/tilled dirt. If it is true then the crop can grow.
*/
protected boolean canThisPlantGrowOnThisBlockID(int par1)
{
return par1 == Block.tilledField.blockID;
}
/**
* Ticks the block if it's been scheduled. This method gets scheduled to run because of the setTickRandomly part in the constructor of the class.
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
super.updateTick(par1World, par2, par3, par4, par5Random);
if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9)
{
int i = par1World.getBlockMetadata(par2, par3, par4);
if (i < 8)
{
float f = getGrowthRate(par1World, par2, par3, par4);
if (par5Random.nextInt((int)(25F / f) + 1) == 0)
{
i++;
par1World.setBlockMetadataWithNotify(par2, par3, par4, i);
}
}
}
}
/**
* Gets the growth rate for the crop. Setup to encourage rows by halving growth rate if there is diagonals, crops on
* different sides that aren't opposing, and by adding growth for every crop next to this one (and for crop below
* this one). Args: x, y, z
*/
private float getGrowthRate(World par1World, int par2, int par3, int par4)
{
float f = 1.0F;
int i = par1World.getBlockId(par2, par3, par4 - 1);
int j = par1World.getBlockId(par2, par3, par4 + 1);
int k = par1World.getBlockId(par2 - 1, par3, par4);
int l = par1World.getBlockId(par2 + 1, par3, par4);
int i1 = par1World.getBlockId(par2 - 1, par3, par4 - 1);
int j1 = par1World.getBlockId(par2 + 1, par3, par4 - 1);
int k1 = par1World.getBlockId(par2 + 1, par3, par4 + 1);
int l1 = par1World.getBlockId(par2 - 1, par3, par4 + 1);
boolean flag = k == blockID || l == blockID;
boolean flag1 = i == blockID || j == blockID;
boolean flag2 = i1 == blockID || j1 == blockID || k1 == blockID || l1 == blockID;
for (int i2 = par2 - 1; i2 <= par2 + 1; i2++)
{
for (int j2 = par4 - 1; j2 <= par4 + 1; j2++)
{
int k2 = par1World.getBlockId(i2, par3 - 1, j2);
float f1 = 0.0F;
if (k2 == Block.tilledField.blockID)
{
f1 = 1.0F;
if (par1World.getBlockMetadata(i2, par3 - 1, j2) > 0)
{
f1 = 3F;
}
}
if (i2 != par2 || j2 != par4)
{
f1 /= 4F;
}
f += f1;
}
}
if (flag2 || flag && flag1)
{
f /= 2.0F;
}
return f;
}
/**
* The type of render function that is called for this block. The render type of 6 gets the texture and places it four times around the sides of the block and leaves nothing on the top or bottom.
*/
public int getRenderType()
{
return 6;
}
/**
* Drops the block items with a specified chance of dropping the specified items
*/
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0);
if (par1World.isRemote)
{
return;
}
int i = 3 + par7;
for (int j = 0; j < i; j++)
{
if (par1World.rand.nextInt(15) <= par5)
{
float f = 0.7F;
float f1 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
float f2 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
float f3 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
EntityItem entityitem = new EntityItem(par1World, (float)par2 + f1, (float)par3 + f2, (float)par4 + f3, new ItemStack(mod_dirtcrop.dirtseed));
entityitem.delayBeforeCanPickup = 10;
par1World.spawnEntityInWorld(entityitem);
}
}
}
/**
* Returns the ID of the items to drop on destruction. "i" is equal to the blocks metadata value(explained slightly more in the getBlockTextureFromSideAndMetadata method below). This means that it will check that that value is equal to 8(the final stage of growth) and if it is then it will drop wheat. It may be fairly obvious, but the 'else' statement means that if the growth state is not equal to 7 then drop nothing (-1 means nothing)
*/
public int idDropped(int i, Random random, int j)
{
int n = random.nextInt(2);
if (i == 8)
{
if ( n == 1)
{
return mod_dirtcrop2.dirtseed2.shiftedIndex;
}
else
{
return mod_Sean.hd1.blockID;
}
}
else
{
return -1;
}
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random random)
{
return 1;
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata.
* As you may have been able to tell from the line above, "j" is equal to the metadata value of the block. This checks if that value is equal to a certain number then sets the blocks texture to what you have defined.
* The things that are being returned are the ints in your mod_ class which you created and set to your texture for the specific stages of growth.
*/
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
if(j == 0)
{
return mod_dirtcrop.cropStageOne;
}
if(j == 1)
{
return mod_dirtcrop.cropStageOne;
}
if(j == 2)
{
return mod_dirtcrop.cropStageTwo;
}
if(j == 3)
{
return mod_dirtcrop.cropStageThree;
}
if(j == 4)
{
return mod_dirtcrop.cropStageFour;
}
if(j == 5)
{
return mod_dirtcrop.cropStageFive;
}
if(j == 6)
{
return mod_dirtcrop.cropStageSix;
}
if(j == 7)
{
return mod_dirtcrop.cropStageSeven;
}
if(j == 8)
{
return mod_dirtcrop.cropStageEight;
}
return j;
}
}
mod_dirtcrop
package net.minecraft.src;
public class mod_dirtcrop extends BaseMod
{
//Just a standard block.
public static final Block dirtcrop = new BlockDirtcrop(220, 0).setBlockName("dirtcrop");
//This is a fairly standard item but it has two new arguments. The first is the block it plants, in this case is our new crop "cropNameHere". The second is the block that is required to be right clicked on to plant the seeds.
//We are using tilled field/dirt for this crop but you can change it to whatever you like. Remember to change it in the block class as well.
public static final Item dirtseed = new ItemDirtseed(2500, dirtcrop.blockID, Block.tilledField.blockID).setItemName("dirtseed");
//These static ints are the textures of the crop in its various stages of growth.
public static int cropStageOne = ModLoader.addOverride("/terrain.png", "crop1.png");
public static int cropStageTwo = ModLoader.addOverride("/terrain.png", "crop2.png");
public static int cropStageThree = ModLoader.addOverride("/terrain.png", "crop3.png");
public static int cropStageFour = ModLoader.addOverride("/terrain.png", "crop4.png");
public static int cropStageFive = ModLoader.addOverride("/terrain.png", "crop5.png");
public static int cropStageSix = ModLoader.addOverride("/terrain.png", "crop6.png");
public static int cropStageSeven = ModLoader.addOverride("/terrain.png", "crop7.png");
public static int cropStageEight = ModLoader.addOverride("/terrain.png", "crop8.png");
public void load()
{
dirtcrop.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "crop.png");
ModLoader.registerBlock(dirtcrop);
ModLoader.addName(dirtcrop, "Nutrition Absorption");
dirtseed.iconIndex = ModLoader.addOverride("/gui/items.png", "seed.png");
ModLoader.addName(dirtseed, "Absorption Seeds");
ModLoader.addRecipe(new ItemStack(dirtseed), new Object [] {
"N", "S",
'N', mod_Sean.SeanFood,
'S', Item.seeds
});
}
public String getVersion()
{
return "1.3.1";
}
}
Hi Techguy,
I found the way to make items and blocks go into the creative inventory. In the BlockNAMEHERE under public BlockNAMEHERE(par1,par2) you put "this.setCreativeTab(CreativeTabs.creativetabnamehere) extremely easy
For items it's different. Same place but worded differently;
this.setTabToDisplayOn(CreativeTabs.creattivetabnamehere)
I know how to use the creative tabs. I just don't have the time to write a tutorial.
Hi, I used your tutorials to make a simple human mob. My mob spawns and can get hurt and stuff, but the i cant see it. I know its alive because i can hear it walking, and can kill them and they drop their item. I have went through the code many times, and cant find any errors, but here it is:
This is the EnityRana.java:
import java.util.Random;
import java.util.Map;
public class EntityRana extends EntityCreature {
public EntityRana(World world){
super(world);
texture = "/rena.png";
moveSpeed = 0.5F;
}
public int getMaxHealth(){
return 20;
}
protected String getLivingSound(){
return "mob.villager.default";
}
protected String getHurtSound(){
return "mob.villager.defaulthurt";
}
protected String getDeathSound(){
return "mob.villager.defaultdeath";
}
protected int getDropItemId(){
return 38;
}
protected boolean canDespawn(){
return false;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(BlockFlower.plantRed, 1);
}
private static final ItemStack defaultHeldItem;
}
This is the mod_Rena.java:
package net.minecraft.src;
import java.util.Map;
public class mod_Rana extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityRana.class, "Rana", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityRana.class, 112, 114, 118, EnumCreatureType.creature); /*high spawn rates for debugging*/
}
public void addRenderer(Map map){
map.put(EntityRana.class, new RenderBiped(new ModelBiped(), 15F));
}
public String getVersion()
{
return "1.3.1";
}
}
Also, when i launch minecraft in the console, i see this:
[13:02:40] Initializing LWJGL OpenAL
[13:02:40] (The LWJGL binding of OpenAL. For more information, see http://w
ww.lwjgl.org)
[13:02:40] OpenAL initialized.
[13:02:40]
[13:02:41] ########## GL ERROR ##########
[13:02:41] @ Pre render
[13:02:41] 1281: Invalid value
Hope someone can help
The name of the entity tutorials are not green. Therefore they are not updated. Therefore they will not work.
TechGuy...I don't think that you realized I put my error in code tags and spoiler. This is really important for my mod so please help!
Put a link to your post. I get 2 pages of post on this topic a day and countless personal messages. I don't have the time to go looking through pages for a single post.
I created a flower, but whenever I break it, it doesn't display the icon, it just shows like a grass texture. I used the advanced flower guide. Please help.
src\minecraft\net\minecraft\src\mod_motools.java:165: cannot find symbol
symbol : class Minecraft
location: class net.minecraft.src.mod_motools
public boolean onTickInGame(float f, Minecraft minecraft)
^
src\minecraft\net\minecraft\src\mod_motools.java:173: cannot find symbol
symbol : class Minecraft
location: class net.minecraft.src.mod_motools
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen)
^
src\minecraft\net\minecraft\src\mod_motools.java:178: cannot find symbol
symbol : class List
location: class net.minecraft.src.mod_motools
List list = ((ContainerCreative)container).itemList;
^
3 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
and here is my code
package net.minecraft.src;
import java.util.Random;
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(2267)
.setItemName("m_Amathestshard");
//Declare Zirconiumingot
public static final Item m_Zirconiumingot = new Zirconiumingot(2268)
.setItemName("m_Zirconiumingot");
//Declare Bloodshard
public static final Item m_Bloodshard = new Bloodshard(2269)
.setItemName("m_Bloodshard");
//Declare Lightoniumshard
public static final Item m_Lightoniumshard = new Lightoniumshard(2270)
.setItemName("m_Lightoniumshard");
//Declare Onyxgem
public static final Item m_Onyxgem = new Onyxgem(2271)
.setItemName("m_Onyxgem");
//Declare Amathest Pickaxe
public static final Item m_AmathestPickaxe = new ItemPickaxeAmathest(4748, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestPickaxe");
//Declare Amathest Shovel
public static final Item m_AmathestShovel = new ItemShovelAmathest(4749, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestShovel");
//Declare Amathest Axe
public static final Item m_AmathestAxe = new ItemAxeAmathest(4750, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestAxe");
//Declare Amathest Hoe
public static final Item m_AmathestHoe = new ItemHoeAmathest(4751, EnumToolAmathest.AMATHEST)
.setItemName("m_AmathestHoe");
//Declare Amathest Sword
public static final Item m_AmathestSword = new ItemSwordAmathest(4752, 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(2274, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumPickaxe");
//Declare Lightonium Shovel
public static final Item m_LightoniumShovel = new ItemShovelLightonium(2275, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumShovel");
//Declare Lightonium Axe
public static final Item m_LightoniumAxe = new ItemAxeLightonium(2276, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumAxe");
//Declare Lightonium Hoe
public static final Item m_LightoniumHoe = new ItemHoeLightonium(2277, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumHoe");
//Declare Lightonium Sword
public static final Item m_LightoniumSword = new ItemSwordLightonium(2278, EnumToolLightonium.LIGHTONIUM)
.setItemName("m_LightoniumSword");
//Declare BloodRock Pickaxe
public static final Item m_BloodRockPickaxe = new ItemPickaxeBloodRock(2275, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockPickaxe");
//Declare BloodRock Shovel
public static final Item m_BloodRockShovel = new ItemShovelBloodRock(2276, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockShovel");
//Declare BloodRock Axe
public static final Item m_BloodRockAxe = new ItemAxeBloodRock(2277, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockAxe");
//Declare BloodRock Hoe
public static final Item m_BloodRockHoe = new ItemHoeBloodRock(2278, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockHoe");
//Declare BloodRock Sword
public static final Item m_BloodRockSword = new ItemSwordBloodRock(2279, EnumToolBloodRock.BLOODROCK)
.setItemName("m_BloodRockSword");
//Declare Onyx Pickaxe
public static final Item m_OnyxPickaxe = new ItemPickaxeOnyx(2276, EnumToolOnyx.ONYX)
.setItemName("m_OnyxPickaxe");
//Declare Onyx Shovel
public static final Item m_OnyxShovel = new ItemShovelOnyx(2277, EnumToolOnyx.ONYX)
.setItemName("m_OnyxShovel");
//Declare Onyx Axe
public static final Item m_OnyxAxe = new ItemAxeOnyx(2278, EnumToolOnyx.ONYX)
.setItemName("m_OnyxAxe");
//Declare Onyx Hoe
public static final Item m_OnyxHoe = new ItemHoeOnyx(2279, EnumToolOnyx.ONYX)
.setItemName("m_OnyxHoe");
//Declare Onyx Sword
public static final Item m_OnyxSword = new ItemSwordOnyx(2280, 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 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(m_Amathestore, 1, i));
list.add(new ItemStack(m_Zirconiumore, 1, i));
list.add(new ItemStack(m_Onyxore, 1, i));
}
creativeInventory = guiscreen;
return true;
}
private static GuiScreen creativeInventory;
public mod_motools()
{
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//motools/blocks/Amathestore.png");
m_Zirconiumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Zirconiumore.png");
m_Bloodrockore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/BloodRockore.png");
m_Lightoniumore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Lightoniumore.png");
m_Onyxore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/motools/motools/blocks/Onyxore.png");
//Items
m_Amathestshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestshard.png");
m_Zirconiumingot.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumingot.png");
m_Bloodshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodshard.png");
m_Lightoniumshard.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumshard.png");
m_Onyxgem.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxgem.png");
//ToolSets
m_AmathestPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestpickaxe.png");
m_AmathestShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestshovel.png");
m_AmathestAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestaxe.png");
m_AmathestHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathesthoe.png");
m_AmathestSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Amathestsword.png");
m_ZirconiumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumpickaxe.png");
m_ZirconiumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumshovel.png");
m_ZirconiumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumaxe.png");
m_ZirconiumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Zirconiumhoe.png");
m_ZirconiumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/mottools/items/Zirconiumsword.png");
m_LightoniumPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumpickaxe.png");
m_LightoniumShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumshovel.png");
m_LightoniumAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumaxe.png");
m_LightoniumHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumhoe.png");
m_LightoniumSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Lightoniumsword.png");
m_BloodRockPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockpickaxe.png");
m_BloodRockShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockshovel.png");
m_BloodRockAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockaxe.png");
m_BloodRockHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrockhoe.png");
m_BloodRockSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Bloodrocksword.png");
m_OnyxPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxpickaxe.png");
m_OnyxShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxshovel.png");
m_OnyxAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxaxe.png");
m_OnyxHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/motools/items/Onyxhoe.png");
m_OnyxSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/motools/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 < 16; eexeop++)
{
int j6 = i + rand.nextInt(2);
int k9 = rand.nextInt(16);
int j12 = j + rand.nextInt(2);
new WorldGenMinable(m_Zirconiumore.blockID, 2).generate(worldMod, rand, j6, k9, j12);
}
for(int uewg = 0; uewg < 16; uewg++)
{
int j6 = i + rand.nextInt(2);
int k9 = rand.nextInt(16);
int j12 = j + rand.nextInt(2);
new WorldGenMinable(m_Bloodrockore.blockID, 4).generate(worldMod, rand, j6, k9, j12);
}
for(int vrxegsw = 0; vrxegsw < 128; vrxegsw++)
{
int j6 = i + rand.nextInt(16);
int k9 = rand.nextInt(128);
int j12 = j + rand.nextInt(16);
new WorldGenMinable(m_Onyxore.blockID, 2).generate(worldMod, rand, j6, k9, j12);
}
}
}
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
When i plant my crops, it remain in stageOne like forever but when I ''Save and Quit to the title'' and log back in some of them are fully grown . I think it has something to do with BlockDirtcrop right ?
Please help the crop is the main resource of my mod.
BlockDirtcrop
package net.minecraft.src;
import java.util.Random;
public class BlockDirtcrop extends BlockFlower
{
public BlockDirtcrop(int i, int j)
{
super(i, j);
blockIndexInTexture = j;
setTickRandomly(true);
float f = 0.5F;
setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
}
/**
* Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
* blockID passed in. Args: blockID.
* This basically checks to see if the block below is a tilled field/tilled dirt. If it is true then the crop can grow.
*/
protected boolean canThisPlantGrowOnThisBlockID(int par1)
{
return par1 == Block.tilledField.blockID;
}
/**
* Ticks the block if it's been scheduled. This method gets scheduled to run because of the setTickRandomly part in the constructor of the class.
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
super.updateTick(par1World, par2, par3, par4, par5Random);
if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9)
{
int i = par1World.getBlockMetadata(par2, par3, par4);
if (i < 8)
{
float f = getGrowthRate(par1World, par2, par3, par4);
if (par5Random.nextInt((int)(25F / f) + 1) == 0)
{
i++;
par1World.setBlockMetadataWithNotify(par2, par3, par4, i);
}
}
}
}
/**
* Gets the growth rate for the crop. Setup to encourage rows by halving growth rate if there is diagonals, crops on
* different sides that aren't opposing, and by adding growth for every crop next to this one (and for crop below
* this one). Args: x, y, z
*/
private float getGrowthRate(World par1World, int par2, int par3, int par4)
{
float f = 1.0F;
int i = par1World.getBlockId(par2, par3, par4 - 1);
int j = par1World.getBlockId(par2, par3, par4 + 1);
int k = par1World.getBlockId(par2 - 1, par3, par4);
int l = par1World.getBlockId(par2 + 1, par3, par4);
int i1 = par1World.getBlockId(par2 - 1, par3, par4 - 1);
int j1 = par1World.getBlockId(par2 + 1, par3, par4 - 1);
int k1 = par1World.getBlockId(par2 + 1, par3, par4 + 1);
int l1 = par1World.getBlockId(par2 - 1, par3, par4 + 1);
boolean flag = k == blockID || l == blockID;
boolean flag1 = i == blockID || j == blockID;
boolean flag2 = i1 == blockID || j1 == blockID || k1 == blockID || l1 == blockID;
for (int i2 = par2 - 1; i2 <= par2 + 1; i2++)
{
for (int j2 = par4 - 1; j2 <= par4 + 1; j2++)
{
int k2 = par1World.getBlockId(i2, par3 - 1, j2);
float f1 = 0.0F;
if (k2 == Block.tilledField.blockID)
{
f1 = 1.0F;
if (par1World.getBlockMetadata(i2, par3 - 1, j2) > 0)
{
f1 = 3F;
}
}
if (i2 != par2 || j2 != par4)
{
f1 /= 4F;
}
f += f1;
}
}
if (flag2 || flag && flag1)
{
f /= 2.0F;
}
return f;
}
/**
* The type of render function that is called for this block. The render type of 6 gets the texture and places it four times around the sides of the block and leaves nothing on the top or bottom.
*/
public int getRenderType()
{
return 6;
}
/**
* Drops the block items with a specified chance of dropping the specified items
*/
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{
super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0);
if (par1World.isRemote)
{
return;
}
int i = 3 + par7;
for (int j = 0; j < i; j++)
{
if (par1World.rand.nextInt(15) <= par5)
{
float f = 0.7F;
float f1 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
float f2 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
float f3 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
EntityItem entityitem = new EntityItem(par1World, (float)par2 + f1, (float)par3 + f2, (float)par4 + f3, new ItemStack(mod_dirtcrop.dirtseed));
entityitem.delayBeforeCanPickup = 10;
par1World.spawnEntityInWorld(entityitem);
}
}
}
/**
* Returns the ID of the items to drop on destruction. "i" is equal to the blocks metadata value(explained slightly more in the getBlockTextureFromSideAndMetadata method below). This means that it will check that that value is equal to 8(the final stage of growth) and if it is then it will drop wheat. It may be fairly obvious, but the 'else' statement means that if the growth state is not equal to 7 then drop nothing (-1 means nothing)
*/
public int idDropped(int i, Random random, int j)
{
int n = random.nextInt(2);
if (i == 8)
{
if ( n == 1)
{
return mod_dirtcrop2.dirtseed2.shiftedIndex;
}
else
{
return mod_Sean.hd1.blockID;
}
}
else
{
return -1;
}
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random random)
{
return 1;
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata.
* As you may have been able to tell from the line above, "j" is equal to the metadata value of the block. This checks if that value is equal to a certain number then sets the blocks texture to what you have defined.
* The things that are being returned are the ints in your mod_ class which you created and set to your texture for the specific stages of growth.
*/
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
if(j == 0)
{
return mod_dirtcrop.cropStageOne;
}
if(j == 1)
{
return mod_dirtcrop.cropStageOne;
}
if(j == 2)
{
return mod_dirtcrop.cropStageTwo;
}
if(j == 3)
{
return mod_dirtcrop.cropStageThree;
}
if(j == 4)
{
return mod_dirtcrop.cropStageFour;
}
if(j == 5)
{
return mod_dirtcrop.cropStageFive;
}
if(j == 6)
{
return mod_dirtcrop.cropStageSix;
}
if(j == 7)
{
return mod_dirtcrop.cropStageSeven;
}
if(j == 8)
{
return mod_dirtcrop.cropStageEight;
}
return j;
}
}
mod_dirtcrop
package net.minecraft.src;
public class mod_dirtcrop extends BaseMod
{
//Just a standard block.
public static final Block dirtcrop = new BlockDirtcrop(220, 0).setBlockName("dirtcrop");
//This is a fairly standard item but it has two new arguments. The first is the block it plants, in this case is our new crop "cropNameHere". The second is the block that is required to be right clicked on to plant the seeds.
//We are using tilled field/dirt for this crop but you can change it to whatever you like. Remember to change it in the block class as well.
public static final Item dirtseed = new ItemDirtseed(2500, dirtcrop.blockID, Block.tilledField.blockID).setItemName("dirtseed");
//These static ints are the textures of the crop in its various stages of growth.
public static int cropStageOne = ModLoader.addOverride("/terrain.png", "crop1.png");
public static int cropStageTwo = ModLoader.addOverride("/terrain.png", "crop2.png");
public static int cropStageThree = ModLoader.addOverride("/terrain.png", "crop3.png");
public static int cropStageFour = ModLoader.addOverride("/terrain.png", "crop4.png");
public static int cropStageFive = ModLoader.addOverride("/terrain.png", "crop5.png");
public static int cropStageSix = ModLoader.addOverride("/terrain.png", "crop6.png");
public static int cropStageSeven = ModLoader.addOverride("/terrain.png", "crop7.png");
public static int cropStageEight = ModLoader.addOverride("/terrain.png", "crop8.png");
public void load()
{
dirtcrop.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "crop.png");
ModLoader.registerBlock(dirtcrop);
ModLoader.addName(dirtcrop, "Nutrition Absorption");
dirtseed.iconIndex = ModLoader.addOverride("/gui/items.png", "seed.png");
ModLoader.addName(dirtseed, "Absorption Seeds");
ModLoader.addRecipe(new ItemStack(dirtseed), new Object [] {
"N", "S",
'N', mod_Sean.SeanFood,
'S', Item.seeds
});
}
public String getVersion()
{
return "1.3.1";
}
}
I don't have the same issue nor can I reproduce it. I don't know the problem.
I'm having a problem with crops. The method about fertilizing the crop with a bonemeal doesn't work. It says
the super class doesn't have a method called "blockActivated" but we are calling it at the end of this method. I looked through the blockflower class and couldn't find that method. What should I do?
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
ItemStack itemstack = entityplayer.inventory.getCurrentItem();
if(itemstack != null && itemstack.itemID == Item.dyePowder.shiftedIndex)
{
if(itemstack.getItemDamage() == 15)
{
world.setBlockMetadataWithNotify(i, j, k, 8);
itemstack.stackSize--;
world.notifyBlockChange(i, j, k, 0);
}
}
return super.blockActivated(world, i, j, k, entityplayer);
}
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
src\minecraft\net\minecraft\src\mod_litto.java:4: error: constructor BlockRubybl
ock in class BlockRubyblock cannot be applied to given types;
public static final Block rubyblockBlock = new BlockRubyblock(160, 0).setBlockNa
me("rubyblock").setHardness(3F).setResistance(4F).setLightValue(1F);
^
required: no arguments
found: int,int
reason: actual and formal argument lists differ in length
src\minecraft\net\minecraft\src\mod_litto.java:5: error: constructor BlockRubyor
e in class BlockRubyore cannot be applied to given types;
public static final Block rubyoreBlock = new BlockRubyore(161, 0).setBlockName("
rubyore").setHardness(3F).setResistance(4F).setLightValue(1F);
^
required: no arguments
found: int,int
reason: actual and formal argument lists differ in length
2 errors
==================
!! Can not find server sources, try decompiling !!
Для продолжения нажмите любую клавишу . . .
My Code
package net.minecraft.src;
public class mod_litto extends BaseMod
{
public static final Block rubyblockBlock = new BlockRubyblock(160, 0).setBlockName("rubyblock").setHardness(3F).setResistance(4F).setLightValue(1F);
public static final Block rubyoreBlock = new BlockRubyore(161, 0).setBlockName("rubyore").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
rubyblockBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/rubyblock.png");
ModLoader.registerBlock(rubyblockBlock);
ModLoader.addName(rubyblockBlock, "In-Game Name Here");
ModLoader.addRecipe(new ItemStack(rubyblockBlock, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
rubyoreBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/rubyore.png");
ModLoader.registerBlock(rubyoreBlock);
ModLoader.addName(rubyoreBlock, "In-Game Name Here");
ModLoader.addRecipe(new ItemStack(rubyoreBlock, 1), new Object [] {"##", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.3.1";
}
}
BlockRubyore.java
package net.minecraft.src;
import java.util.Random;
public class BlockRubyore extends Block
{
public BlockRubyore(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_litto.rubyoreBlock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}[/spoiler]
BlockRubyblock.java
[spoiler]package net.minecraft.src;
import java.util.Random;
public class BlockRubyblock extends Block
{
public BlockRubyblock(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_litto.rubyblockBlock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
In BlockRubyblock.java code is identical BlockRubyore.java
just create some .java files in the MCP directory (MCP/src/minecraft/net/minecraft/src/) using a simple Texteditor like the one from Windows or NotePad++. To create the you have to choose save as, then "NameOfFilehere.java" without quotation marks.
i know that but ive been watching a bunch of videos on eclipse and alls they do is press a button i cant keep up and i cant download eclipse on my laptop
just create some .java files in the MCP directory (MCP/src/minecraft/net/minecraft/src/) using a simple Texteditor like the one from Windows or NotePad++. To create the you have to choose save as, then "NameOfFilehere.java" without quotation marks.
i know but i cant download eclipse on my laptop and all there doing is pressing buttons i meen the least someone could do is make a video for those of us who use notepad
Well, now im stuck at setting the BlockBounds according to the metadata.
Everything is working fine , but when I'm standing on my Block, it's glitching me in ....
Here is the relevant part of my code
@Override
public void setBlockBoundsBasedOnState(IBlockAccess blockAccess, int x, int y, int z)
{
if (blockAccess.getBlockMetadata(x, y, z) < 3)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1F, 0.75F, 1F);
}
else
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1F, 1F, 1F);
}
}
I don't have a tutorial on block bounds therefore I'm not helping with this here.
src\minecraft\net\minecraft\src\mod_litto.java:4: error: constructor BlockRubybl
ock in class BlockRubyblock cannot be applied to given types;
public static final Block rubyblockBlock = new BlockRubyblock(160, 0).setBlockNa
me("rubyblock").setHardness(3F).setResistance(4F).setLightValue(1F);
^
required: no arguments
found: int,int
reason: actual and formal argument lists differ in length
src\minecraft\net\minecraft\src\mod_litto.java:5: error: constructor BlockRubyor
e in class BlockRubyore cannot be applied to given types;
public static final Block rubyoreBlock = new BlockRubyore(161, 0).setBlockName("
rubyore").setHardness(3F).setResistance(4F).setLightValue(1F);
^
required: no arguments
found: int,int
reason: actual and formal argument lists differ in length
2 errors
==================
!! Can not find server sources, try decompiling !!
Для продолжения нажмите любую клавишу . . .
My Code
package net.minecraft.src;
public class mod_litto extends BaseMod
{
public static final Block rubyblockBlock = new BlockRubyblock(160, 0).setBlockName("rubyblock").setHardness(3F).setResistance(4F).setLightValue(1F);
public static final Block rubyoreBlock = new BlockRubyore(161, 0).setBlockName("rubyore").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
rubyblockBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/rubyblock.png");
ModLoader.registerBlock(rubyblockBlock);
ModLoader.addName(rubyblockBlock, "In-Game Name Here");
ModLoader.addRecipe(new ItemStack(rubyblockBlock, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
rubyoreBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/rubyore.png");
ModLoader.registerBlock(rubyoreBlock);
ModLoader.addName(rubyoreBlock, "In-Game Name Here");
ModLoader.addRecipe(new ItemStack(rubyoreBlock, 1), new Object [] {"##", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.3.1";
}
}
BlockRubyore.java
package net.minecraft.src;
import java.util.Random;
public class BlockRubyore extends Block
{
public BlockRubyore(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_litto.rubyoreBlock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}[/spoiler]
BlockRubyblock.java
[spoiler]package net.minecraft.src;
import java.util.Random;
public class BlockRubyblock extends Block
{
public BlockRubyblock(int i, int j)
{
super(i, j, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_litto.rubyblockBlock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
In BlockRubyblock.java code is identical BlockRubyore.java
Tutorials will be updated when they're updated. Don't ask about them. That is really strange because it is asking for no arguments where your id and texture index are. I would suggest backing up your source, downloading Minecraft jars, MCP and ModLoader again and setting it up again.
When I try to make stairs in 1.3.1, I get the following error:
the method getCollidingBoundingBoxes(World, int, int, int, AxisAlignedBB, ArrayList) is undefined for the type block
If you bothered to read the red bold text on my post with about 10 replies on it near the top of page 185, you would see that I am working on a fix for it.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI do not have 1.2.5 to test it out anymore, but from looking at the code you want to put everything that is in public mod_tools() (the image overrides, the recipies, and the add name) into public void load() as well... That should fix all of the errors unless I am missing something... most (but not all) of the ModLoader.stuff you want to put into the load method if you need it in your main mod class (the only exception is from what I believe is if you need a public static/void/boolean something in front of it for stuff like animation as an example)
-
View User Profile
-
View Posts
-
Send Message
Retired StaffIn your mod_whatever.java file, at an item declaration:
public static final Item Ingot/Item/Whatever = new Item(500).setItemName("Whatever").setTabToDisplayOn(CreativeTabs.tabMaterials);And you'd change the CreativeTabs.whatever to the desired tab. This is slightly different for blocks, instead, it's:
The second way to do this is in your ItemWhatever.java file. It is as follows:
public ItemWhatever(int i, int j) { (other item stuff) this.setTabToDisplayOn(CreativeTabs.whatever); }And for blocks, it's pretty much the same, just do this in the BlockWhatever.java file:
public BlockWhatever(int i, int j) { (other block stuff) this.setCreativeTab(CreativeTabs.whatever); }The second one is more effective because whatever item/block is defined with that file is added to that tab unless told otherwise in your mod_Whatever file.
nvm I fixed it that was a fail on my part
package net.minecraft.src; import java.util.ArrayList; public class BlockironStairs extends Block { public BlockironStairs(int i, int j) { super(i, j, Material.iron); } 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; }Error:
I have looked in the Block file too, and there is no record of super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist); or anything similar.
Thank you verymuch
but wait does it mean that the crop has 2 stageOne
-
View User Profile
-
View Posts
-
Send Message
Retired Staffpublic int quantityDropped(Random random) { if(ModLoader.getMinecraftInstance().thePlayer.getHeldItem() == new ItemStack(Item.pickaxeDiamond)) { return 1; } else { return 0; } }Doesn't work. Instead of what I think it may do, it instead makes nothing return no matter what breaks the block. Any ideas? This worked in 1.2.5.
"How Do I Acess The mod_block/mod_item files?"
i really want to create a mod and i would very much enjoy if you guys could help me
-Wayvern12
When i plant my crops, it remain in stageOne like forever but when I ''Save and Quit to the title'' and log back in some of them are fully grown
Please help
BlockDirtcrop
package net.minecraft.src; import java.util.Random; public class BlockDirtcrop extends BlockFlower { public BlockDirtcrop(int i, int j) { super(i, j); blockIndexInTexture = j; setTickRandomly(true); float f = 0.5F; setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f); } /** * Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of * blockID passed in. Args: blockID. * This basically checks to see if the block below is a tilled field/tilled dirt. If it is true then the crop can grow. */ protected boolean canThisPlantGrowOnThisBlockID(int par1) { return par1 == Block.tilledField.blockID; } /** * Ticks the block if it's been scheduled. This method gets scheduled to run because of the setTickRandomly part in the constructor of the class. */ public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { super.updateTick(par1World, par2, par3, par4, par5Random); if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { int i = par1World.getBlockMetadata(par2, par3, par4); if (i < 8) { float f = getGrowthRate(par1World, par2, par3, par4); if (par5Random.nextInt((int)(25F / f) + 1) == 0) { i++; par1World.setBlockMetadataWithNotify(par2, par3, par4, i); } } } } /** * Gets the growth rate for the crop. Setup to encourage rows by halving growth rate if there is diagonals, crops on * different sides that aren't opposing, and by adding growth for every crop next to this one (and for crop below * this one). Args: x, y, z */ private float getGrowthRate(World par1World, int par2, int par3, int par4) { float f = 1.0F; int i = par1World.getBlockId(par2, par3, par4 - 1); int j = par1World.getBlockId(par2, par3, par4 + 1); int k = par1World.getBlockId(par2 - 1, par3, par4); int l = par1World.getBlockId(par2 + 1, par3, par4); int i1 = par1World.getBlockId(par2 - 1, par3, par4 - 1); int j1 = par1World.getBlockId(par2 + 1, par3, par4 - 1); int k1 = par1World.getBlockId(par2 + 1, par3, par4 + 1); int l1 = par1World.getBlockId(par2 - 1, par3, par4 + 1); boolean flag = k == blockID || l == blockID; boolean flag1 = i == blockID || j == blockID; boolean flag2 = i1 == blockID || j1 == blockID || k1 == blockID || l1 == blockID; for (int i2 = par2 - 1; i2 <= par2 + 1; i2++) { for (int j2 = par4 - 1; j2 <= par4 + 1; j2++) { int k2 = par1World.getBlockId(i2, par3 - 1, j2); float f1 = 0.0F; if (k2 == Block.tilledField.blockID) { f1 = 1.0F; if (par1World.getBlockMetadata(i2, par3 - 1, j2) > 0) { f1 = 3F; } } if (i2 != par2 || j2 != par4) { f1 /= 4F; } f += f1; } } if (flag2 || flag && flag1) { f /= 2.0F; } return f; } /** * The type of render function that is called for this block. The render type of 6 gets the texture and places it four times around the sides of the block and leaves nothing on the top or bottom. */ public int getRenderType() { return 6; } /** * Drops the block items with a specified chance of dropping the specified items */ public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) { super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0); if (par1World.isRemote) { return; } int i = 3 + par7; for (int j = 0; j < i; j++) { if (par1World.rand.nextInt(15) <= par5) { float f = 0.7F; float f1 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F; float f2 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F; float f3 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F; EntityItem entityitem = new EntityItem(par1World, (float)par2 + f1, (float)par3 + f2, (float)par4 + f3, new ItemStack(mod_dirtcrop.dirtseed)); entityitem.delayBeforeCanPickup = 10; par1World.spawnEntityInWorld(entityitem); } } } /** * Returns the ID of the items to drop on destruction. "i" is equal to the blocks metadata value(explained slightly more in the getBlockTextureFromSideAndMetadata method below). This means that it will check that that value is equal to 8(the final stage of growth) and if it is then it will drop wheat. It may be fairly obvious, but the 'else' statement means that if the growth state is not equal to 7 then drop nothing (-1 means nothing) */ public int idDropped(int i, Random random, int j) { int n = random.nextInt(2); if (i == 8) { if ( n == 1) { return mod_dirtcrop2.dirtseed2.shiftedIndex; } else { return mod_Sean.hd1.blockID; } } else { return -1; } } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random random) { return 1; } /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata. * As you may have been able to tell from the line above, "j" is equal to the metadata value of the block. This checks if that value is equal to a certain number then sets the blocks texture to what you have defined. * The things that are being returned are the ints in your mod_ class which you created and set to your texture for the specific stages of growth. */ public int getBlockTextureFromSideAndMetadata(int i, int j) { if(j == 0) { return mod_dirtcrop.cropStageOne; } if(j == 1) { return mod_dirtcrop.cropStageOne; } if(j == 2) { return mod_dirtcrop.cropStageTwo; } if(j == 3) { return mod_dirtcrop.cropStageThree; } if(j == 4) { return mod_dirtcrop.cropStageFour; } if(j == 5) { return mod_dirtcrop.cropStageFive; } if(j == 6) { return mod_dirtcrop.cropStageSix; } if(j == 7) { return mod_dirtcrop.cropStageSeven; } if(j == 8) { return mod_dirtcrop.cropStageEight; } return j; } }mod_dirtcrop
package net.minecraft.src; public class mod_dirtcrop extends BaseMod { //Just a standard block. public static final Block dirtcrop = new BlockDirtcrop(220, 0).setBlockName("dirtcrop"); //This is a fairly standard item but it has two new arguments. The first is the block it plants, in this case is our new crop "cropNameHere". The second is the block that is required to be right clicked on to plant the seeds. //We are using tilled field/dirt for this crop but you can change it to whatever you like. Remember to change it in the block class as well. public static final Item dirtseed = new ItemDirtseed(2500, dirtcrop.blockID, Block.tilledField.blockID).setItemName("dirtseed"); //These static ints are the textures of the crop in its various stages of growth. public static int cropStageOne = ModLoader.addOverride("/terrain.png", "crop1.png"); public static int cropStageTwo = ModLoader.addOverride("/terrain.png", "crop2.png"); public static int cropStageThree = ModLoader.addOverride("/terrain.png", "crop3.png"); public static int cropStageFour = ModLoader.addOverride("/terrain.png", "crop4.png"); public static int cropStageFive = ModLoader.addOverride("/terrain.png", "crop5.png"); public static int cropStageSix = ModLoader.addOverride("/terrain.png", "crop6.png"); public static int cropStageSeven = ModLoader.addOverride("/terrain.png", "crop7.png"); public static int cropStageEight = ModLoader.addOverride("/terrain.png", "crop8.png"); public void load() { dirtcrop.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "crop.png"); ModLoader.registerBlock(dirtcrop); ModLoader.addName(dirtcrop, "Nutrition Absorption"); dirtseed.iconIndex = ModLoader.addOverride("/gui/items.png", "seed.png"); ModLoader.addName(dirtseed, "Absorption Seeds"); ModLoader.addRecipe(new ItemStack(dirtseed), new Object [] { "N", "S", 'N', mod_Sean.SeanFood, 'S', Item.seeds }); } public String getVersion() { return "1.3.1"; } }I know how to use the creative tabs. I just don't have the time to write a tutorial.
The name of the entity tutorials are not green. Therefore they are not updated. Therefore they will not work.
Put a link to your post. I get 2 pages of post on this topic a day and countless personal messages. I don't have the time to go looking through pages for a single post.
Post your code. Even if it is the same.
Remove its code in BiomeDecorator. You should be able to see it fairly easily.
Why do you have mod_ prefixes on all or your class names. You only use a mod_ prefix on the main class of your mod which extends BaseMod.
Import Minecraft and List.
Just use
together they are powerful beyond imagination."
I don't have the same issue nor can I reproduce it. I don't know the problem.
Fixed the tutorial.
together they are powerful beyond imagination."
You create them.
together they are powerful beyond imagination."
Oh... I Must Be Stupid.
I have a MPC error please help
# found jad, ff, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs
, param csvs, renumber csv, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_05\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_litto.java:4: error: constructor BlockRubybl
ock in class BlockRubyblock cannot be applied to given types;
public static final Block rubyblockBlock = new BlockRubyblock(160, 0).setBlockNa
me("rubyblock").setHardness(3F).setResistance(4F).setLightValue(1F);
^
required: no arguments
found: int,int
reason: actual and formal argument lists differ in length
src\minecraft\net\minecraft\src\mod_litto.java:5: error: constructor BlockRubyor
e in class BlockRubyore cannot be applied to given types;
public static final Block rubyoreBlock = new BlockRubyore(161, 0).setBlockName("
rubyore").setHardness(3F).setResistance(4F).setLightValue(1F);
^
required: no arguments
found: int,int
reason: actual and formal argument lists differ in length
2 errors
==================
!! Can not find server sources, try decompiling !!
Для продолжения нажмите любую клавишу . . .
My Code
package net.minecraft.src; public class mod_litto extends BaseMod { public static final Block rubyblockBlock = new BlockRubyblock(160, 0).setBlockName("rubyblock").setHardness(3F).setResistance(4F).setLightValue(1F); public static final Block rubyoreBlock = new BlockRubyore(161, 0).setBlockName("rubyore").setHardness(3F).setResistance(4F).setLightValue(1F); public void load() { rubyblockBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/rubyblock.png"); ModLoader.registerBlock(rubyblockBlock); ModLoader.addName(rubyblockBlock, "In-Game Name Here"); ModLoader.addRecipe(new ItemStack(rubyblockBlock, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt}); rubyoreBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/rubyore.png"); ModLoader.registerBlock(rubyoreBlock); ModLoader.addName(rubyoreBlock, "In-Game Name Here"); ModLoader.addRecipe(new ItemStack(rubyoreBlock, 1), new Object [] {"##", Character.valueOf('#'), Block.dirt}); } public String getVersion() { return "1.3.1"; } }BlockRubyore.java
package net.minecraft.src; import java.util.Random; public class BlockRubyore extends Block { public BlockRubyore(int i, int j) { super(i, j, Material.wood); } public int idDropped(int i, Random random, int j) { return mod_litto.rubyoreBlock.blockID; } public int quantityDropped(Random random) { return 1; } }[/spoiler] BlockRubyblock.java [spoiler]package net.minecraft.src; import java.util.Random; public class BlockRubyblock extends Block { public BlockRubyblock(int i, int j) { super(i, j, Material.wood); } public int idDropped(int i, Random random, int j) { return mod_litto.rubyblockBlock.blockID; } public int quantityDropped(Random random) { return 1; } }In BlockRubyblock.java code is identical BlockRubyore.java
i think that MinecraftForge.setToolClass make it easier
I don't have a tutorial on block bounds therefore I'm not helping with this here.
Tutorials will be updated when they're updated. Don't ask about them. That is really strange because it is asking for no arguments where your id and texture index are. I would suggest backing up your source, downloading Minecraft jars, MCP and ModLoader again and setting it up again.
EDIT: See edit at top of this post.
Yes, Forge makes it easier. Your tools, etc. are enchantable if you use EnumHelper that Forge adds so your tool classes can extends the Vanilla ones.
If you bothered to read the red bold text on my post with about 10 replies on it near the top of page 185, you would see that I am working on a fix for it.
together they are powerful beyond imagination."