So I am working on just implementing simple item like a pickaxe. When applying a texture to the object, it appears as if the iconIndex is missing. Below is the code. I'm guessing its probably something extremely simple, and I just need a second pair of eyes. Any help/suggestions is appreciated. Thanks.
package mods.resources.common;
import mods.resources.tool.ItemSteelPickaxe;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = "resources", name = "resources",version = "1.0")
public class resources {
//public static Item ingotSteel;
public static Item SteelPickaxe;
public static Item SteelShovel;
public static Item SteelSword;
public static Item SteelAxe;
public static Item SteelHoe;
public static EnumToolMaterial materialSteel = EnumHelper.addToolMaterial("STEEL", 2, 250, 8.0F, 2, 6);
public resources (){
SteelPickaxe = new ItemSteelPickaxe(1001,materialSteel).setUnlocalizedName("SteelPickaxe").setCreativeTab(CreativeTabs.tabTools);
LanguageRegistry.addName(SteelPickaxe,"Steel Pickaxe");
}
}
and also
package mods.resources.tool;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemPickaxe;
public class ItemSteelPickaxe extends ItemPickaxe {
public ItemSteelPickaxe(int par1, EnumToolMaterial par2EnumToolMaterial) {
super(par1, par2EnumToolMaterial);
}
public void updateIcons(IconRegister iconRegister)
{
iconIndex = iconRegister.registerIcon("resources:SteelPickaxe");
}
}
I am getting the error "iconIndex could not be resolved to a variable". I looked over plenty of how to's and I think I understand for the most part the major change with the update. If there is anything you want me to provide please let me know.
Images are located inside : src\minecraft\mods\resources\textures\items
Thanks again for the help!