Posted June 22, 201213 yr I tried to use it but all I get is errors... These are the errors I have been getting... --- BEGIN ERROR REPORT cb82b14a -------- Generated 6/22/12 12:49 PM Minecraft: Minecraft 1.2.5 OS: Windows Vista (x86) version 6.0 Java: 1.7.0_04, Oracle Corporation VM: Java HotSpot(TM) Client VM (mixed mode, sharing), Oracle Corporation LWJGL: 2.4.2 OpenGL: ATI Radeon HD 2400 XT version 3.3.10317 Compatibility Profile Context, ATI Technologies Inc. java.lang.NullPointerException at net.minecraft.src.forge.ArmorProperties.ApplyArmor(ArmorProperties.java:61) at net.minecraft.src.EntityPlayer.damageEntity(EntityPlayer.java:1006) at net.minecraft.src.EntityLiving.attackEntityFrom(EntityLiving.java:874) at net.minecraft.src.EntityPlayer.attackEntityFrom(EntityPlayer.java:898) at net.minecraft.src.Entity.onEntityUpdate(Entity.java:445) at net.minecraft.src.EntityLiving.onEntityUpdate(EntityLiving.java:433) at net.minecraft.src.Entity.onUpdate(Entity.java:349) at net.minecraft.src.EntityLiving.onUpdate(EntityLiving.java:645) at net.minecraft.src.EntityPlayer.onUpdate(EntityPlayer.java:264) at net.minecraft.src.World.updateEntityWithOptionalForce(World.java:2194) at net.minecraft.src.World.updateEntity(World.java:2165) at net.minecraft.src.World.updateEntities(World.java:2047) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1867) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:822) at net.minecraft.client.Minecraft.run(Minecraft.java:750) at java.lang.Thread.run(Unknown Source) --- END ERROR REPORT 45c96326 ---------- This is my armor code... package net.minecraft.src; import java.util.ArrayList; import net.minecraft.client.Minecraft; import net.minecraft.src.forge.*; public class texasjake95_KingArmor extends ItemArmor implements ITextureProvider, IArmorTextureProvider, ISpecialArmor { public texasjake95_KingArmor(int i, EnumArmorMaterial enumarmormaterial, int j, int k) { super(i, enumarmormaterial, j, k); } public String getTextureFile() { return "/BetterOres/Items.png"; } public String getArmorTextureFile(ItemStack itemstack) { if(itemstack.itemID == mod_BetterOres.helmetKing.shiftedIndex || itemstack.itemID == mod_BetterOres.plateKing.shiftedIndex || itemstack.itemID == mod_BetterOres.bootsKing.shiftedIndex) { return "/BetterOres/Armor/king1.png"; } if(itemstack.itemID == mod_BetterOres.legsKing.shiftedIndex) { return "/BetterOres/Armor/king2.png"; } return "/BetterOres/Armor/king1.png"; } public void addCreativeItems(ArrayList itemList) { itemList.add(new ItemStack(this)); } public ArmorProperties getProperties(EntityLiving player, ItemStack armor, DamageSource source, double damage, int slot) { EntityLiving Player = mc.thePlayer; player = Player; armor = new ItemStack (this); source = DamageSource.inFire; damage = 0; slot = 1; return null; } @Override public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) { EntityPlayer Player = mc.thePlayer; player = Player; armor = new ItemStack (this); slot = 1; return 2; } @Override public void damageArmor(EntityLiving entity, ItemStack stack, DamageSource source, int damage, int slot) { EntityLiving Player = mc.thePlayer; entity = Player; stack = new ItemStack (this); source = DamageSource.inFire; damage = 0; slot = 1; }
June 23, 201213 yr So.. the interface asks for a return value And you give it null. And you expect it NOT to crash? Really... go read the code it's commented well enough. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
June 23, 201213 yr Author Everything else I put in doesn't want to work so I thought it was correct I'll go read the code again and see what needs to go there.
June 23, 201213 yr Author If I may ask what is suppose to go in place of null? I can't figure it out... I have probably seen it but its just not clicking...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.