1
Jarfile Troubles
Ive Been Trying To Create A Mod To Put Up On Minecraft Curseforge And On Here
Ive Been Trying To Create A Mod That Adds Emerald Armor, Except When I Click On It It Says It Either Corrupt Or
Invaild, Someone Please Help Me. (mind this is my first mod)
Source Code
package net.minecraft.src;
public class EmeraldArmorMod extends BaseMod
{
public static final Item Helmet = new ItemArmor(1340, EnumArmorMaterial.EMERALD, ModLoader.addArmor("Emerald"), 0).setItemName("Helmet");
public static final Item Body = new ItemArmor(1341, EnumArmorMaterial.EMERALD, ModLoader.addArmor("Emerald"), 1).setItemName("Body");
public static final Item Legs = new ItemArmor(1342, EnumArmorMaterial.EMERALD, ModLoader.addArmor("Emerald"), 2).setItemName("Legs");
public static final Item Boots = new ItemArmor(1344, EnumArmorMaterial.EMERALD, ModLoader.addArmor("Emerald"), 3).setItemName("Boots");
public EmeraldArmorMod()
{
ModLoader.addName(Helmet, "Emerald Helmet");
ModLoader.addName(Body, "Emerald ChestPlate");
ModLoader.addName(Legs, "Emerald Leggings");
ModLoader.addName(Boots, "Emerald Boots");
ModLoader.addRecipe(new ItemStack(Helmet, 1), new Object[] {
"Emerald", "Emerald", Character.valueOf('Emerald'), Block.sand
});
ModLoader.addRecipe(new ItemStack(Body, 1), new Object[] {
"Emerald", "Emerald", "Emerald", Character.valueOf('Emerald'), Block.sand
});
ModLoader.addRecipe(new ItemStack(Legs, 1), new Object[] {
"Emerald", "Emerald", "Emerald", Character.valueOf('Emerald'), Block.sand
});
ModLoader.addRecipe(new ItemStack(Boots, 1), new Object[] {
"Emerald", "Emerald", Character.valueOf('Emerald'), Block.sand
});
Helmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Helmet.png");
Body.iconIndex = ModLoader.addOverride("/gui/items.png", "/Body.png");
Legs.iconIndex = ModLoader.addOverride("/gui/items.png", "/Legs.png");
Boots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Boots.png");
}
public String getVersion()
{
return "v.1.7";
}
public void load() {}
Ive Tryed It In Java And JavaScript
Ive Been Trying To Create A Mod That Adds Emerald Armor, Except When I Click On It It Says It Either Corrupt Or
Invaild, Someone Please Help Me. (mind this is my first mod)
Source Code
package net.minecraft.src;
public class EmeraldArmorMod extends BaseMod
{
public static final Item Helmet = new ItemArmor(1340, EnumArmorMaterial.EMERALD, ModLoader.addArmor("Emerald"), 0).setItemName("Helmet");
public static final Item Body = new ItemArmor(1341, EnumArmorMaterial.EMERALD, ModLoader.addArmor("Emerald"), 1).setItemName("Body");
public static final Item Legs = new ItemArmor(1342, EnumArmorMaterial.EMERALD, ModLoader.addArmor("Emerald"), 2).setItemName("Legs");
public static final Item Boots = new ItemArmor(1344, EnumArmorMaterial.EMERALD, ModLoader.addArmor("Emerald"), 3).setItemName("Boots");
public EmeraldArmorMod()
{
ModLoader.addName(Helmet, "Emerald Helmet");
ModLoader.addName(Body, "Emerald ChestPlate");
ModLoader.addName(Legs, "Emerald Leggings");
ModLoader.addName(Boots, "Emerald Boots");
ModLoader.addRecipe(new ItemStack(Helmet, 1), new Object[] {
"Emerald", "Emerald", Character.valueOf('Emerald'), Block.sand
});
ModLoader.addRecipe(new ItemStack(Body, 1), new Object[] {
"Emerald", "Emerald", "Emerald", Character.valueOf('Emerald'), Block.sand
});
ModLoader.addRecipe(new ItemStack(Legs, 1), new Object[] {
"Emerald", "Emerald", "Emerald", Character.valueOf('Emerald'), Block.sand
});
ModLoader.addRecipe(new ItemStack(Boots, 1), new Object[] {
"Emerald", "Emerald", Character.valueOf('Emerald'), Block.sand
});
Helmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/Helmet.png");
Body.iconIndex = ModLoader.addOverride("/gui/items.png", "/Body.png");
Legs.iconIndex = ModLoader.addOverride("/gui/items.png", "/Legs.png");
Boots.iconIndex = ModLoader.addOverride("/gui/items.png", "/Boots.png");
}
public String getVersion()
{
return "v.1.7";
}
public void load() {}
Ive Tryed It In Java And JavaScript
Create an account or sign in to comment.
3
1
You're not giving us anything useful to go on."when you click on it", when you click on what exactly?
To be honest I don't even understand what your problem actually is.
(edit) What's in your plugin.yml btw?
To be honest I don't even understand what your problem actually is.
(edit) What's in your plugin.yml btw?
1
for starters, you dont run mods
and you compiled it the right way and not just renamed a text file to .jar?
and you compiled it the right way and not just renamed a text file to .jar?
1
I Know Thats Not Supposed To Happen, For I Clicked On Another Mod And that Popup Message Didnt come up