I don't know. Try using metadata like you would with dyes. The item is monsterPlacer though.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Ok so i was able to make tools! But now that i added a new block and a new ingot i got this error when i ran 'startclient'
java.lang.ArrayIndexOutOfBoundsException: 500
at net.minecraft.src.ModLoader.initStats(ModLoader.java:905)
at net.minecraft.src.ModLoader.init(ModLoader.java:878)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 1e5f8c2a ----------
I dont understand what i did wrong because i did everything the same and i changed the names and the ID's.
Ok so i was able to make tools! But now that i added a new block and a new ingot i got this error when i ran 'startclient'
java.lang.ArrayIndexOutOfBoundsException: 500
at net.minecraft.src.ModLoader.initStats(ModLoader.java:905)
at net.minecraft.src.ModLoader.init(ModLoader.java:878)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 1e5f8c2a ----------
I dont understand what i did wrong because i did everything the same and i changed the names and the ID's.
package net.minecraft.src;
import java.util.Random;
public class mod_tutorials extends BaseMod{
public static final Block Lead = new BlockLead(200, 0).setBlockName("Lead Ore").setHardness(1F).setResistance(2F).setLightValue(0F);
public static final Item LeadIngot = new ItemLeadIngot(401).setItemName("LeadIngot");
public static final Block Marble = new BlockMarble(201, 0).setBlockName("Marble Ore").setHardness(1F).setResistance(2F).setLightValue(0F);
public static final Item MarbleIngot = new ItemMarbleIngot(601).setItemName("MarbleIngot");
//tools
public static final Item PbPickaxe = new ItemPickaxe(402, EnumToolMaterial.LEAD).setItemName("PbPickaxe");
public static final Item PbSpade = new ItemSpade(403, EnumToolMaterial.LEAD).setItemName("PbSpade");
public static final Item PbAxe = new ItemAxe(404, EnumToolMaterial.LEAD).setItemName("PbAxe");
public static final Item PbHoe = new ItemHoe(405, EnumToolMaterial.LEAD).setItemName("PbHoe");
public static final Item PbSword = new ItemSword(406, EnumToolMaterial.LEAD).setItemName("PbSword");
public void load(){
//Block Marble
Marble.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MarbleOre.png");
ModLoader.registerBlock(Marble);
ModLoader.addName(Marble, "Marble Ore");
//Item MarbleIngot
MarbleIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/MarbleIngot.png");
ModLoader.addName(MarbleIngot, "Marble Ingot");
ModLoader.addSmelting(Marble.blockID, new ItemStack(MarbleIngot, 1));
//Block Lead
Lead.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/LeadOre.png");
ModLoader.registerBlock(Lead);
ModLoader.addName(Lead, "Lead Ore");
//Item LeadIngot
LeadIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/LeadIngot.png");
ModLoader.addName(LeadIngot, "Lead Ingot");
ModLoader.addSmelting(Lead.blockID, new ItemStack(LeadIngot, 1));
//tools
PbPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbPickaxe.png");
ModLoader.addName(PbPickaxe, "Lead Pick");
ModLoader.addRecipe(new ItemStack(PbPickaxe, 1), new Object[]{
"###", " @ ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick
});
PbSpade.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbSpade.png");
ModLoader.addName(PbSpade, "Lead Spade");
ModLoader.addRecipe(new ItemStack(PbSpade, 1), new Object[]{
" # ", " @ ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick
});
PbAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbAxe.png");
ModLoader.addName(PbAxe, "Lead Axe");
ModLoader.addRecipe(new ItemStack(PbAxe, 1), new Object[]{
"## ", "#@ ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick
});
PbHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbHoe.png");
ModLoader.addName(PbHoe, "Lead Hoe");
ModLoader.addRecipe(new ItemStack(PbHoe, 1), new Object[]{
"## ", " @ ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick
});
PbSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbSword.png");
ModLoader.addName(PbSword, "Lead Sword");
ModLoader.addRecipe(new ItemStack(PbSword, 1), new Object[]{
" # ", " # ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick
});
}
public void generateSurface(World world, Random random, int i, int j){
for(int rarity = 0; rarity < 6; rarity++){
int X = i + random.nextInt(16);
int Y = random.nextInt(64);
int Z = j + random.nextInt(16);
(new WorldGenMinable(Lead.blockID, 12)).generate(world, random, X, Y, Z);
(new WorldGenMinable(Marble.blockID, 12)).generate(world, random, X, Y, Z);
}
}
public String getVersion(){
return "this is an awesome mod v1.1";
}
}
All of your code is referencing EnumToolMaterial. If you've added the LEAD material there, it means that you've edited a base class. The tutorial here is to teach people how to make a new ToolMaterial class for the new tools to reference. (More specifically, how NOT to edit a base class) Which means you'll need to create a few new classes. About 7 new classes, in fact. Each class needing to be created is in the tools tutorial right under the main tutorials post. Here's a link directly to the post: More Tutorials - Tools
The only things you'll need to change are the names of each class to what you want, and a few instances of that name in each of the classes.
So i HAVE to create all the classes to make different tools?
To create your tools, yes. Because they have special properties. But not for every single item or block you'll ever add with your mod. Such as your ingots. They don't have special properties, so they won't have their own personal class file. If you declared a sword the same way as your ingots though, you might as well be smacking a creeper with an egg. lol
To create your tools, yes. Because they have special properties. But not for every single item or block you'll ever add with your mod. Such as your ingots. They don't have special properties, so they won't have their own personal class file. If you declared a sword the same way as your ingots though, you might as well be smacking a creeper with an egg. lol
See what I'm saying? o.O
Stronghold, you can't honestly believe you're the first to think of adding (or actually implementing) lead in minecraft... Do you? :\
Plus this is just my first time so im just practicing and learning. Im not actually gonna use it in a real mod.
Its gonna be a pain to make tools for every mineral i add lol.
It's an annoyance we all have to deal with. The only thing we can really strive for is doing it better than the other guy. I wasn't at all trying to offend or anything. I highly doubt anything I do in my early modding days will be completely original. In fact, I know they're not. I'm sure every body and their brother has thought about adding something like rubies to their game... Or sapphires. Or precious gems besides diamond in general. X] But thank you kindly for not freaking out on me. I meant to say what I said a little less... How I said it. >.> (if that makes sense)
Plus this is just my first time so im just practicing and learning. Im not actually gonna use it in a real mod.
Its gonna be a pain to make tools for every mineral i add lol.
Also, for the classes you make, you can link multiple new sets of tools to them. You won't have to make 7 new classes every time you make a new set of tools.
Rollback Post to RevisionRollBack
I used to maintain the Minecraft Forums Mod List. However, life has stepped in the way of that. Perhaps later...
It's an annoyance we all have to deal with. The only thing we can really strive for is doing it better than the other guy. I wasn't at all trying to offend or anything. I highly doubt anything I do in my early modding days will be completely original. In fact, I know they're not. I'm sure every body and their brother has thought about adding something like rubies to their game... Or sapphires. Or precious gems besides diamond in general. X] But thank you kindly for not freaking out on me. I meant to say what I said a little less... How I said it. >.> (if that makes sense)
It makes sense. I guess it was partly (mostly) because I had thought of the idea last year and coded it last year
Ok so leave out the 'EnumToolMaterialNameHere' class and make all the others?
No, you'll need to make that one as well. At current, you've modified the one the game already provided. You need to go back, and undo those changes if you can. You'll want to add your LEAD to the new one instead, so that your mod has maximum compatibility.
Rollback Post to RevisionRollBack
I used to maintain the Minecraft Forums Mod List. However, life has stepped in the way of that. Perhaps later...
Also visit my youtube please! Youtube.com/legitzdestroy
I have tried to find a way to do it but can't. I am just using a custom model of the mob that makes it look like armour.
Probably not.
I don't know. Try using metadata like you would with dyes. The item is monsterPlacer though.
together they are powerful beyond imagination."
Also visit my youtube please! Youtube.com/legitzdestroy
java.lang.ArrayIndexOutOfBoundsException: 500
at net.minecraft.src.ModLoader.initStats(ModLoader.java:905)
at net.minecraft.src.ModLoader.init(ModLoader.java:878)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 1e5f8c2a ----------
I dont understand what i did wrong because i did everything the same and i changed the names and the ID's.
Please post code with the error.
package net.minecraft.src; import java.util.Random; public class mod_tutorials extends BaseMod{ public static final Block Lead = new BlockLead(200, 0).setBlockName("Lead Ore").setHardness(1F).setResistance(2F).setLightValue(0F); public static final Item LeadIngot = new ItemLeadIngot(401).setItemName("LeadIngot"); public static final Block Marble = new BlockMarble(201, 0).setBlockName("Marble Ore").setHardness(1F).setResistance(2F).setLightValue(0F); public static final Item MarbleIngot = new ItemMarbleIngot(601).setItemName("MarbleIngot"); //tools public static final Item PbPickaxe = new ItemPickaxe(402, EnumToolMaterial.LEAD).setItemName("PbPickaxe"); public static final Item PbSpade = new ItemSpade(403, EnumToolMaterial.LEAD).setItemName("PbSpade"); public static final Item PbAxe = new ItemAxe(404, EnumToolMaterial.LEAD).setItemName("PbAxe"); public static final Item PbHoe = new ItemHoe(405, EnumToolMaterial.LEAD).setItemName("PbHoe"); public static final Item PbSword = new ItemSword(406, EnumToolMaterial.LEAD).setItemName("PbSword"); public void load(){ //Block Marble Marble.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/MarbleOre.png"); ModLoader.registerBlock(Marble); ModLoader.addName(Marble, "Marble Ore"); //Item MarbleIngot MarbleIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/MarbleIngot.png"); ModLoader.addName(MarbleIngot, "Marble Ingot"); ModLoader.addSmelting(Marble.blockID, new ItemStack(MarbleIngot, 1)); //Block Lead Lead.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/LeadOre.png"); ModLoader.registerBlock(Lead); ModLoader.addName(Lead, "Lead Ore"); //Item LeadIngot LeadIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/LeadIngot.png"); ModLoader.addName(LeadIngot, "Lead Ingot"); ModLoader.addSmelting(Lead.blockID, new ItemStack(LeadIngot, 1)); //tools PbPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbPickaxe.png"); ModLoader.addName(PbPickaxe, "Lead Pick"); ModLoader.addRecipe(new ItemStack(PbPickaxe, 1), new Object[]{ "###", " @ ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick }); PbSpade.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbSpade.png"); ModLoader.addName(PbSpade, "Lead Spade"); ModLoader.addRecipe(new ItemStack(PbSpade, 1), new Object[]{ " # ", " @ ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick }); PbAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbAxe.png"); ModLoader.addName(PbAxe, "Lead Axe"); ModLoader.addRecipe(new ItemStack(PbAxe, 1), new Object[]{ "## ", "#@ ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick }); PbHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbHoe.png"); ModLoader.addName(PbHoe, "Lead Hoe"); ModLoader.addRecipe(new ItemStack(PbHoe, 1), new Object[]{ "## ", " @ ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick }); PbSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/PbSword.png"); ModLoader.addName(PbSword, "Lead Sword"); ModLoader.addRecipe(new ItemStack(PbSword, 1), new Object[]{ " # ", " # ", " @ ", Character.valueOf('#'), LeadIngot, Character.valueOf('@'), Item.stick }); } public void generateSurface(World world, Random random, int i, int j){ for(int rarity = 0; rarity < 6; rarity++){ int X = i + random.nextInt(16); int Y = random.nextInt(64); int Z = j + random.nextInt(16); (new WorldGenMinable(Lead.blockID, 12)).generate(world, random, X, Y, Z); (new WorldGenMinable(Marble.blockID, 12)).generate(world, random, X, Y, Z); } } public String getVersion(){ return "this is an awesome mod v1.1"; } }-
View User Profile
-
View Posts
-
Send Message
Retired StaffAll of your code is referencing EnumToolMaterial. If you've added the LEAD material there, it means that you've edited a base class. The tutorial here is to teach people how to make a new ToolMaterial class for the new tools to reference. (More specifically, how NOT to edit a base class) Which means you'll need to create a few new classes. About 7 new classes, in fact. Each class needing to be created is in the tools tutorial right under the main tutorials post. Here's a link directly to the post: More Tutorials - Tools
The only things you'll need to change are the names of each class to what you want, and a few instances of that name in each of the classes.
Seriously, your stealing my idea.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffTo create your tools, yes. Because they have special properties. But not for every single item or block you'll ever add with your mod. Such as your ingots. They don't have special properties, so they won't have their own personal class file. If you declared a sword the same way as your ingots though, you might as well be smacking a creeper with an egg. lol
See what I'm saying? o.O
Stronghold, you can't honestly believe you're the first to think of adding (or actually implementing) lead in minecraft... Do you? :\
Point. Never mind me, then.
Its gonna be a pain to make tools for every mineral i add lol.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffIt's an annoyance we all have to deal with. The only thing we can really strive for is doing it better than the other guy.
Also, for the classes you make, you can link multiple new sets of tools to them. You won't have to make 7 new classes every time you make a new set of tools.
It makes sense. I guess it was partly (mostly) because I had thought of the idea last year and coded it last year
-
View User Profile
-
View Posts
-
Send Message
Retired StaffYou've got a leg up on the competition then, so to speak. You've been doing it a whole year longer than either of us.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffNo, you'll need to make that one as well. At current, you've modified the one the game already provided. You need to go back, and undo those changes if you can. You'll want to add your LEAD to the new one instead, so that your mod has maximum compatibility.
Wait im confused you said i only need 7 but theres 8...which one do i not include?
-
View User Profile
-
View Posts
-
Send Message
Retired StaffThe first one, as you already have a mod_* class.