1

Modders help !!!

Eatme4dinner's Avatar Eatme4dinner9/12/12 7:23 pm
9/12/2012 8:57 pm
modwizcode's Avatar modwizcode
What is wrong with my code it says different pictures are not found when they are right in the right place ! Here is the source code:
package net.minecraft.src;
public class mod_lavaarmor extends BaseMod
{
public static final Item LavaHelmet = new ItemArmor(5001, EnumArmorMaterial.LAVAARMOR, ModLoader.addArmor("lavaarmor"), 0).setItemName("Lava Helmet");
public static final Item LavaChestplate = new ItemArmor(5002, EnumArmorMaterial.LAVAARMOR, ModLoader.addArmor("lavaarmor"), 1).setItemName("Lava Chestplate");
public static final Item LavaLeggings = new ItemArmor(5003, EnumArmorMaterial.LAVAARMOR, ModLoader.addArmor("lavaarmor"), 2).setItemName("Lava Leggings");
public static final Item LavaBoots = new ItemArmor(5004, EnumArmorMaterial.LAVAARMOR, ModLoader.addArmor("lavaarmor"), 3).setItemName("Lava Boots");

public void load()
{
LavaHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/Lavahelmet.png");
LavaChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/chestplate/Lavachestplate.png");
LavaLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/armor/Lavaleggings.png");
LavaBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Lavaboots.png");

ModLoader.addRecipe(new ItemStack(LavaHelmet, 1), new Object [] {"###", "# #", Character.valueOf('#'), Item.bucketLava});
ModLoader.addRecipe(new ItemStack(LavaChestplate, 1), new Object [] {"# #", "###", "###", Character.valueOf('#'), Item.bucketLava});
ModLoader.addRecipe(new ItemStack(LavaLeggings, 1), new Object [] {"###", "# #", "# #", Character.valueOf('#'), Item.bucketLava});
ModLoader.addRecipe(new ItemStack(LavaBoots, 1), new Object [] {"# #", "# #", Character.valueOf('#'), Item.bucketLava});
ModLoader.addName(LavaHelmet, "Helmet");
ModLoader.addName(LavaChestplate, "Chestplate");
ModLoader.addName(LavaLeggings, "Leggings");
ModLoader.addName(LavaBoots, "Boots");
}

public String getVersion()
{
return "1.3.2";
}
}
Posted by Eatme4dinner's Avatar
Eatme4dinner
Level 37 : Artisan Modder
22

Create an account or sign in to comment.

14

info Note: You're viewing a single reply. View all replies
1
09/12/2012 8:10 pm
Level 66 : High Grandmaster Hero
sed11
sed11's Avatar
I know, and the way you make items still uses the iconIndex thing when using ModLoader to add the texture.That tutorial is outdated too, because when you see the version in the code, its 1.6.6



Try using the method before saying it does not work/is wrong :/

That code could still work, but probably not because it is in 1.6.6, like what was said.

He's also trying to make Armor, not a simple item.

CephrusBelieve there is another method missing O.o
ModLoader.addArmor(armorname);


He has that in his code already somewhere at the top, kind-of.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome