Jump to content

Creeoer

Members
  • Posts

    1
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Creeoer's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello, for some reason my armour textures dont seem to be working right, but the texture for the leggings work jsut fine..any help as to why it wont work would be appreciated, heres my code: Armour Class: package Creeoer.NetherArmour.items; import Creeoer.NetherArmour.NetherArmour; import Creeoer.NetherArmour.NetherArmourInfo; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; public class AaronZiteArmor extends ItemArmor { public AaronZiteArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4, String string) { super(par1, par2EnumArmorMaterial, par3, par4); this.material = par2EnumArmorMaterial; par2EnumArmorMaterial.getDamageReductionAmount(par4); this.setMaxDamage(par2EnumArmorMaterial.getDurability(par4)); this.maxStackSize = 1; this.setCreativeTab(CreativeTabs.tabCombat); armorNamePrefix = armorNamePrefix; } public String armorNamePrefix; public EnumArmorMaterial material; public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) { if(stack.toString().contains("leggings")) { return "NetherArmour:" + armorNamePrefix + "AaronZiteLeggings" ; } if(stack.toString().contains("Leggings")) if(itemID == NetherArmour.AaronZiteLeggings.itemID){ return "NetherArmour:" + armorNamePrefix + "AaronZiteLeggings"; } return armorNamePrefix; } public String getArmorTexture1(ItemStack stack, Entity entity, int slot, int layer) { if(stack.toString().contains("helmet")) { return "NetherArmour:" + armorNamePrefix + "AaronZiteHelmet" ; } if(stack.toString().contains("Helmet")) if(itemID == NetherArmour.AaronZiteHelmet.itemID){ return "NetherArmour:" + armorNamePrefix + "AaronZiteHelmet"; } return "NetherArmour:" + armorNamePrefix + "AaronZiteLeggings"; } public void registerIcons(IconRegister par1iconRegister){ if(itemID == NetherArmour.AaronZiteHelmet.itemID) { itemIcon = par1iconRegister.registerIcon("NetherArmour:AaronZiteHelmet"); setTextureName(NetherArmourInfo.NAME.toLowerCase() + ":AaronZiteHelmet"); }if(itemID == NetherArmour.AaronZiteChestplate.itemID) { itemIcon = par1iconRegister.registerIcon("NetherArmour:AaronZiteChestplate"); setTextureName(NetherArmourInfo.NAME.toLowerCase() + ":AaronZiteChestplate"); }if(itemID == NetherArmour.AaronZiteLeggings.itemID) { itemIcon = par1iconRegister.registerIcon(NetherArmourInfo.NAME.toLowerCase() + ":AaronZiteLeggings"); setTextureName(NetherArmourInfo.NAME.toLowerCase() + ":AaronZiteLeggings"); }if(itemID == NetherArmour.AaronZiteBoots.itemID) { itemIcon = par1iconRegister.registerIcon("NetherArmour:AaronZiteBoots"); setTextureName(NetherArmourInfo.NAME.toLowerCase() + ":AaronZiteBoots"); } } } Main Class: package Creeoer.NetherArmour; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraftforge.common.EnumHelper; import net.minecraftforge.common.MinecraftForge; import Creeoer.NetherArmour.CommonProxy; import Creeoer.NetherArmour.blocks.AaronTreeLeaf; import Creeoer.NetherArmour.blocks.AaronTreeLog; import Creeoer.NetherArmour.blocks.AaronZiteBlock; import Creeoer.NetherArmour.blocks.AaronZiteOre; import Creeoer.NetherArmour.items.AaronZite; import Creeoer.NetherArmour.items.AaronZiteArmor; import Creeoer.NetherArmour.items.AaronZiteSword; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid=NetherArmourInfo.ID, name=NetherArmourInfo.NAME, version=NetherArmourInfo.VERS) @NetworkMod(clientSideRequired=true, serverSideRequired=false) public class NetherArmour { //EnumToolMaterial public static EnumArmorMaterial AaronZiteArmor = EnumHelper.addArmorMaterial("AaronZitearmor",55, new int[]{6,9,9,6}, 30); public static EnumToolMaterial AaronZiteTools = EnumHelper.addToolMaterial("AaronZitetools", 3, 1600, 12.5F, 8.0F, 22); //Tools public final Item aaronZiteSword = new AaronZiteSword(5005, AaronZiteTools).setCreativeTab(CreativeTabs.tabCombat).setUnlocalizedName("AaronZiteSword").setTextureName(NetherArmourInfo.NAME.toLowerCase() + ":AaronZiteSword"); //Other public final static Block AaronTreeLog = new AaronTreeLog(3999, Material.wood); public final static Block AaronZiteBlock = new AaronZiteBlock(3995, Material.ground). setHardness(4.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("AaronZiteBlock").setCreativeTab(CreativeTabs.tabBlock).setTextureName(NetherArmourInfo.NAME.toLowerCase() + ":AaronZiteBlock"); public final static Block AaronZiteOre = new AaronZiteOre(3996, Material.rock); public final static Item AaronZite = new AaronZite(3998); public final static Block AaronTreeLeaf = new AaronTreeLeaf(3997, Material.leaves); //Armor public static Item AaronZiteHelmet = new AaronZiteArmor(5006, AaronZiteArmor, 0, 0, "AaronZite").setUnlocalizedName("AaronZiteHelmet"); public static Item AaronZiteChestplate = new AaronZiteArmor(5007, AaronZiteArmor, 0, 1, "AaronZite").setUnlocalizedName("AaronZiteChestplate"); public static Item AaronZiteLeggings = new AaronZiteArmor(5008, AaronZiteArmor, 0, 2, "AaronZite").setUnlocalizedName("AaronZiteLeggings"); public static Item AaronZiteBoots = new AaronZiteArmor(5009, AaronZiteArmor, 0, 3, "AaronZite").setUnlocalizedName("AaronZiteBoots"); EventManager oreManager = new EventManager(); TreeManager treemangager = new TreeManager(); // The instance of your mod that Forge uses. @Instance("NetherArmour") public static NetherArmour instance; // Says where the client and server 'proxy' code is loaded. @SidedProxy(clientSide=NetherArmourInfo.CLIENTPROXY + "ClientProxy" , serverSide=NetherArmourInfo.COMMONPROXY + "CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { // Stub Method } @EventHandler public void load(FMLInitializationEvent event) { proxy.registerRenderers(); ItemStack dirtstack = new ItemStack(Block.dirt); ItemStack diamondstack = new ItemStack(Item.diamond, 64); ItemStack blackWoolStack = new ItemStack(Block.cloth, 10, 15); ItemStack stoneStack = new ItemStack(1, 32, 0); ItemStack gravelstack = new ItemStack(Block.gravel); //Registration for Blocks GameRegistry.registerBlock(AaronZiteBlock, "AaronZiteBlock"); LanguageRegistry.addName(AaronZiteBlock, "AaronZite Block"); MinecraftForge.setBlockHarvestLevel(AaronZiteBlock, "pickaxe", 3); GameRegistry.registerBlock(AaronTreeLeaf, "AaronTreeLeaf"); LanguageRegistry.addName(AaronTreeLeaf, "Aaron Tree Leaf"); GameRegistry.registerBlock(AaronTreeLog, "AaronTreeLog"); LanguageRegistry.addName(AaronTreeLog, "Aaron Tree Log"); GameRegistry.registerBlock(AaronZiteOre, "AaronZiteOre"); LanguageRegistry.addName(AaronZiteOre, "AaronZite Ore"); MinecraftForge.setBlockHarvestLevel(AaronZiteBlock, "picaxe", 3); //Registration for Items GameRegistry.registerItem(AaronZite, "AaronZite"); LanguageRegistry.addName(AaronZite, "AaronZite"); //Registration for ermm Managers GameRegistry.registerWorldGenerator(oreManager); GameRegistry.registerWorldGenerator(treemangager); //Registration for Tools GameRegistry.registerItem(aaronZiteSword, "AaronZiteSword"); LanguageRegistry.addName(aaronZiteSword, "AaronZite Sword"); //Registration for Armour LanguageRegistry.addName(AaronZiteHelmet, "AaronZite Helmet"); LanguageRegistry.addName(AaronZiteChestplate,"AaronZite ChestPlate"); LanguageRegistry.addName(AaronZiteLeggings,"AaronZite Leggings"); LanguageRegistry.addName(AaronZiteBoots,"AaronZite Boots"); //Crafting Item Stacks ItemStack aaronziteStack = new ItemStack(NetherArmour.AaronZite); ItemStack blazeRodStack = new ItemStack(Item.blazeRod); //Crafting for items GameRegistry.addRecipe(new ItemStack (aaronZiteSword), " x", " x"," y", 'x', aaronziteStack, 'y', blazeRodStack); //Crafting for Armour GameRegistry.addRecipe(new ItemStack (AaronZiteChestplate), "x x", "xxx","xxx", 'x', aaronziteStack); GameRegistry.addRecipe(new ItemStack (AaronZiteHelmet), "xxx", "x x", 'x', aaronziteStack); GameRegistry.addRecipe(new ItemStack (AaronZiteBoots), "x x", "x x", 'x', aaronziteStack); GameRegistry.addRecipe(new ItemStack (AaronZiteLeggings), "xxx", "x x","x x",'x', aaronziteStack); //Crafting for blocks GameRegistry.addRecipe(new ItemStack (AaronZiteBlock), " xxx", " xxx"," xxx", 'x', aaronziteStack); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.