[Answered] Armor code gives error
3 posters
MC Modding :: Help :: Help
Page 1 of 1
[Answered] Armor code gives error
I coded armor into my mod according to youtube.com/watch?v=Qv0u-7bQ6_Q this video and when I try to recompile I get an error!
Last edited by mastereric on Thu Nov 03, 2011 4:22 pm; edited 1 time in total
mastereric- Member
- Posts : 30
Join date : 2011-10-26
Re: [Answered] Armor code gives error
here use this code instead in the code he gave the variables are diffrent so it may not function I had the same problem
- Code:
package net.minecraft.src;
import net.minecraft.client.Minecraft;
public class mod_earmour extends BaseMod
{
public mod_earmour()
{
eHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/emeraldHelmet.png");
ModLoader.AddName(eHelmet, "eHelmet");
ModLoader.AddRecipe(new ItemStack(eHelmet, 1), new Object[] {
"rrr", "r r", Character.valueOf('r'), mod_emeraldgem.emeraldgem
});
eBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/emeraldBody.png");
ModLoader.AddName(eBody, "eChestplate");
ModLoader.AddRecipe(new ItemStack(eBody, 1), new Object[] {
"r r", "rrr", "rrr", Character.valueOf('r'), mod_emeraldgem.emeraldgem
});
eLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/emeraldLegs.png");
ModLoader.AddName(eLegs, "eLeggings");
ModLoader.AddRecipe(new ItemStack(eLegs, 1), new Object[] {
"rrr", "r r", "r r", Character.valueOf('r'), mod_emeraldgem.emeraldgem
});
eBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/emeraldBoots.png");
ModLoader.AddName(eBoots, "eBoots");
ModLoader.AddRecipe(new ItemStack(eBoots, 1), new Object[] {
"r r", "r r", Character.valueOf('r'), mod_emeraldgem.emeraldgem
});
RBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/rubyBoots.png");
ModLoader.AddName(RBoots, "RBoots");
ModLoader.AddRecipe(new ItemStack(RBoots, 1), new Object[] {
"rrr", "r r", "r r", Character.valueOf('r'), mod_ruby.ruby
});
RLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/rubyLegs.png");
ModLoader.AddName(RLegs, "RLegs");
ModLoader.AddRecipe(new ItemStack(RLegs, 1), new Object[] {
"r r", "r r", Character.valueOf('r'), mod_ruby.ruby
});
RBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/rubyBody.png");
ModLoader.AddName(RBody, "RChestplate");
ModLoader.AddRecipe(new ItemStack(RBody, 1), new Object[] {
"r r", "rrr", "rrr", Character.valueOf('r'), mod_ruby.ruby
});
RHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/rubyHelmet.png");
ModLoader.AddName(RHelmet, "RHelmet");
ModLoader.AddRecipe(new ItemStack(RHelmet, 1), new Object[] {
"rrr", "r r", Character.valueOf('r'), mod_ruby.ruby
});
}
public String Version()
{
return "1.8.1";
}
public static Item eHelmet = (new ItemArmor(2612, 3,5 , 0)).setItemName("eHelmet");
public static Item eBody = (new ItemArmor(2623, 3, 5, 1)).setItemName("eBody");
public static Item eLegs = (new ItemArmor(2634, 3, 5, 2)).setItemName("eLegs");
public static Item eBoots = (new ItemArmor(2645, 3, 5, 3)).setItemName("eBoots");
public static Item RHelmet = (new ItemArmor(2616, 3,5 , 0)).setItemName("RHelmet");
public static Item RBody = (new ItemArmor(2627, 3, 5, 1)).setItemName("RBody");
public static Item RLegs = (new ItemArmor(2638, 3, 5, 2)).setItemName("RLegs");
public static Item RBoots = (new ItemArmor(2649, 3, 5, 3)).setItemName("RBoots");
Re: [Answered] Armor code gives error
I don't understand this code. Where do I put it?lcass wrote:here use this code instead in the code he gave the variables are diffrent so it may not function I had the same problem
- Code:
package net.minecraft.src;
import net.minecraft.client.Minecraft;
public class mod_earmour extends BaseMod
{
public mod_earmour()
{
eHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/emeraldHelmet.png");
ModLoader.AddName(eHelmet, "eHelmet");
ModLoader.AddRecipe(new ItemStack(eHelmet, 1), new Object[] {
"rrr", "r r", Character.valueOf('r'), mod_emeraldgem.emeraldgem
});
eBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/emeraldBody.png");
ModLoader.AddName(eBody, "eChestplate");
ModLoader.AddRecipe(new ItemStack(eBody, 1), new Object[] {
"r r", "rrr", "rrr", Character.valueOf('r'), mod_emeraldgem.emeraldgem
});
eLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/emeraldLegs.png");
ModLoader.AddName(eLegs, "eLeggings");
ModLoader.AddRecipe(new ItemStack(eLegs, 1), new Object[] {
"rrr", "r r", "r r", Character.valueOf('r'), mod_emeraldgem.emeraldgem
});
eBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/emeraldBoots.png");
ModLoader.AddName(eBoots, "eBoots");
ModLoader.AddRecipe(new ItemStack(eBoots, 1), new Object[] {
"r r", "r r", Character.valueOf('r'), mod_emeraldgem.emeraldgem
});
RBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/rubyBoots.png");
ModLoader.AddName(RBoots, "RBoots");
ModLoader.AddRecipe(new ItemStack(RBoots, 1), new Object[] {
"rrr", "r r", "r r", Character.valueOf('r'), mod_ruby.ruby
});
RLegs.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/rubyLegs.png");
ModLoader.AddName(RLegs, "RLegs");
ModLoader.AddRecipe(new ItemStack(RLegs, 1), new Object[] {
"r r", "r r", Character.valueOf('r'), mod_ruby.ruby
});
RBody.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/rubyBody.png");
ModLoader.AddName(RBody, "RChestplate");
ModLoader.AddRecipe(new ItemStack(RBody, 1), new Object[] {
"r r", "rrr", "rrr", Character.valueOf('r'), mod_ruby.ruby
});
RHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystal/rubyHelmet.png");
ModLoader.AddName(RHelmet, "RHelmet");
ModLoader.AddRecipe(new ItemStack(RHelmet, 1), new Object[] {
"rrr", "r r", Character.valueOf('r'), mod_ruby.ruby
});
}
public String Version()
{
return "1.8.1";
}
public static Item eHelmet = (new ItemArmor(2612, 3,5 , 0)).setItemName("eHelmet");
public static Item eBody = (new ItemArmor(2623, 3, 5, 1)).setItemName("eBody");
public static Item eLegs = (new ItemArmor(2634, 3, 5, 2)).setItemName("eLegs");
public static Item eBoots = (new ItemArmor(2645, 3, 5, 3)).setItemName("eBoots");
public static Item RHelmet = (new ItemArmor(2616, 3,5 , 0)).setItemName("RHelmet");
public static Item RBody = (new ItemArmor(2627, 3, 5, 1)).setItemName("RBody");
public static Item RLegs = (new ItemArmor(2638, 3, 5, 2)).setItemName("RLegs");
public static Item RBoots = (new ItemArmor(2649, 3, 5, 3)).setItemName("RBoots");
It doesn't make sense to put it in my mod_ class file. The error is with RenderPlayer, Eclipse gives the error
The method func_35865_n() is undefined for the type ItemStack RenderPlayer.java /Client/src/net/minecraft/src line 230
mastereric- Member
- Posts : 30
Join date : 2011-10-26
Re: [Answered] Armor code gives error
you replace the code you put in your mod_ .java replace the entire code I got that same error and the reason is people always use the func. but they forget its a code they modified
Re: [Answered] Armor code gives error
Use the tutorial made by Strengthowns
Gardentiver- Member
- Posts : 3
Join date : 2011-10-15
Location : Nunya! :)
Re: [Answered] Armor code gives error
nvm i found this and it is what i'm using now.
mastereric- Member
- Posts : 30
Join date : 2011-10-26
Similar topics
» [Answered] Variable Error/import error
» [Answered]Ore Generation Error
» [Unanswered] Code error upon startclient
» [Answered] Opening decompile.bat gives an error
» [answered]What is wrong with my code?
» [Answered]Ore Generation Error
» [Unanswered] Code error upon startclient
» [Answered] Opening decompile.bat gives an error
» [answered]What is wrong with my code?
MC Modding :: Help :: Help
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum