I'm fairly new to modding Minecraft, and I've been working on a mod to make tools from netherrack, so that I can stay in the Nether w/o need for non-Nether materials. I'm not very experienced w/ Java so my mistakes may be really stupid >.< This is what the recompiler is saying:
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\mod_NetherTools.java:12: error: cannot find symb
ol
netherstone = (new Block(375, 0, Material.rock)).setHardness(2.0F).setResistance
(10.3F).setStepSound(soundStoneFootstep).setBlockName("netherstone");
^
symbol: variable soundStoneFootstep
location: class mod_NetherTools
src\minecraft\net\minecraft\src\mod_NetherTools.java:13: error: cannot find symb
ol
nethermetal = (new Block(376, 1, Material.rock)).setHardness(3.0F).setResistance
(10.5F).setStepSound(soundStoneFootstep).setBlockName("nethermetal");
^
symbol: variable soundStoneFootstep
location: class mod_NetherTools
src\minecraft\net\minecraft\src\mod_NetherTools.java:23: error: cannot find symb
ol
nethermetal.iconIndex = ModLoader.addOverride("/gui/terrain.png", "gui/Nethermet
al_Texture.png");
^
symbol: variable iconIndex
location: variable nethermetal of type Block
src\minecraft\net\minecraft\src\mod_NetherTools.java:27: error: cannot find symb
ol
netherstone.iconIndex = ModLoader.addOverride("/gui/terrain.png", "gui/Nethersto
ne_Texture.png");
^
symbol: variable iconIndex
location: variable netherstone of type Block
src\minecraft\net\minecraft\src\mod_NetherTools.java:33: error: cannot find symb
ol
ModLoader.AddRecipe(new ItemStack(Block.netherstone, 1), new Object[]{
^
symbol: variable netherstone
location: class Block
src\minecraft\net\minecraft\src\mod_NetherTools.java:37: error: cannot find symb
ol
ModLoader.AddRecipe(new ItemStack (Item.netherstoneRod, 4), new Object[]{
^
symbol: variable netherstoneRod
location: class Item
src\minecraft\net\minecraft\src\mod_NetherTools.java:38: error: cannot find symb
ol
"X", "X", Character.valueOf('X'), Block.netherstone
^
symbol: variable netherstone
location: class Block
src\minecraft\net\minecraft\src\mod_NetherTools.java:40: error: cannot find symb
ol
ModLoader.AddSmelting(netherstone.blockID, new ItemStack(nethermetal.BlockID, 1)
);
^
symbol: variable BlockID
location: variable nethermetal of type Block
8 errors
1 warning
==================
This is my current Mod file:
package net.minecraft.src;
public class mod_NetherTools extends BaseMod
{
public static final Item netherstoneRod = new Item(374).setItemName("netherstoneRod");
public static final Block netherstone;
public static final Block nethermetal;
static
{
netherstone = (new Block(375, 0, Material.rock)).setHardness(2.0F).setResistance(10.3F).setStepSound(soundStoneFootstep).setBlockName("netherstone");
nethermetal = (new Block(376, 1, Material.rock)).setHardness(3.0F).setResistance(10.5F).setStepSound(soundStoneFootstep).setBlockName("nethermetal");
}
public mod_NetherTools()
{
ModLoader.RegisterBlock( netherstone );
ModLoader.RegisterBlock( nethermetal );
ModLoader.AddName(nethermetal, "Nether Metal");
nethermetal.iconIndex = ModLoader.addOverride("/gui/terrain.png", "gui/Nethermetal_Texture.png");
ModLoader.AddName(netherstone, "Netherstone");
netherstone.iconIndex = ModLoader.addOverride("/gui/terrain.png", "gui/Netherstone_Texture.png");
ModLoader.AddName(netherstoneRod, "Netherstone Rod");
netherstoneRod.iconIndex = ModLoader.addOverride("/gui/items.png", "/gui/NetherstoneRod_Texture.png");
ModLoader.AddRecipe(new ItemStack(Block.netherstone, 1), new Object[]{
"XX", "XX", Character.valueOf('X'), Block.netherrack
});
ModLoader.AddRecipe(new ItemStack (Item.netherstoneRod, 4), new Object[]{
"X", "X", Character.valueOf('X'), Block.netherstone
});
ModLoader.AddSmelting(netherstone.blockID, new ItemStack(nethermetal.BlockID, 1));
}
public String Version()
{
return "1.8.1";
}
}
Did I leave something out, mess up the format, or what? Sorry if my mistakes are extremely stupid I just started learning Java :\ Any help is greatly appreciated :biggrin.gif:
First, change your block and item files so that none of them have an ID over 255 and nothing below like 130 to be safe. THEN, make sure you are pathing your overrides the right way.
Thanks you two, I took your advice and got rid of some of the errors, I worked out a few more, and now I'm currently at 3, but I think I'll be able to find them. I can't thank you enough :smile.gif:
This is my current Mod file:
Did I leave something out, mess up the format, or what? Sorry if my mistakes are extremely stupid I just started learning Java :\ Any help is greatly appreciated :biggrin.gif:
Instead of:
Put this:
Your block texture should look like this:
Make sure your textures are in the the right place. This place:
mcp -> bin -> minecraft (put them in this minecraft folder)
And for safe measure, you should make a folder for your mod (in that folder) and change /Nether_Texture.png to /YourMod/Nether_Texture.png
This is all I can see off the top of my head. And I don't know **** about adding items. Good Luck!