Posted November 28, 201410 yr When I put on my custom armor, the helmet, chestplate, and boots (everything from layer1) load correctly, but the leggings don't. It shows up as the chest part of the chestplate and the boots. Does anyone know why this may be? Here is my code: public class bloodstoneArmor extends ItemArmor{ public bloodstoneArmor(ArmorMaterial material, int id, int placement) { super(material, id, placement); if (placement == 0){ this.setTextureName(MainClass.modid + ":helmetBloodstone"); } else if (placement == 1){ this.setTextureName(MainClass.modid + ":chestplateBloodstone"); } else if (placement == 2){ this.setTextureName(MainClass.modid + ":leggingsBloodstone"); } else if (placement == 3){ this.setTextureName(MainClass.modid + ":bootsBloodstone"); } } public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if (stack.getItem() == MainClass.bloodstoneHelmet || stack.getItem() == MainClass.bloodstoneChestplate || stack.getItem() == MainClass.bloodstoneLeggings || stack.getItem() == MainClass.bloodstoneBoots) { return MainClass.modid + ":textures/models/armor/bloodstone_layer_1.png"; } if (stack.getItem() == MainClass.bloodstoneLeggings) { return MainClass.modid + ":textures/models/armor/bloodstone_layer_2.png"; } else { return null; } } } If you know how to fix this, please tell! Thanks
November 28, 201410 yr Author How should I change it? A case statement? I though 2 ifs could both apply
November 29, 201410 yr Author to do that, would you do two if statements? one checking for layer 1 armor pieces and one checking for the second?
November 29, 201410 yr Author i tried that and the same thing happened. remember, when wearing all pieces, it doesn't show legs because when wearing leggings it shows you wearing half the chestplate and the boots.
November 29, 201410 yr Author Just fixed it. In the first line of the if, if ,else statement, i took out the checking for leggings and it fixed. Thx for the help!
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.