Jump to content

SlaughterFactory

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

SlaughterFactory's Achievements

Tree Puncher

Tree Puncher (2/8)

-1

Reputation

  1. Thanks for being an ass =D and again its not letting me override anything what so ever so thanks but i found the help i needed on another forum.
  2. Yup I have been overriding the method but its still coming up with errors in my armor class.
  3. Sorry, Im a bit new to coding this, I am unsure of where I would put something like that or what the code would actually look like. I've tried looking around and it seems like most everyone is doing it for mobs and not for armor so I am unsure what to do...
  4. Greetings fellow modders, I am working on a mod that is going to add a ton of armor into the game, currently its only for 1.7.10 but I'll update it to 1.8 once it is completely finished. So my question is I want to add health to the player when they equip a set of armor, I have the full set in one class(I can divy it up into multiple classes if I have to but I would rather not) I just don't know the code or what I need to do to add that on to my armor. Heres the code for the stone armor, and say i wanted to add an extra 2 hearts of health to the bar, how would i go about that? package slaughterfactory.kingsadventure.item; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import slaughterfactory.kingsadventure.KingsAdventure; public class ItemStoneArmor extends ItemArmor { public ItemStoneArmor(ArmorMaterial armorMaterial, int renderIndex, int armorType) { super(armorMaterial, renderIndex, armorType); } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { if(this.armorType == 2) { return "ka:textures/models/armor/stone_layer_2.png"; } return "ka:textures/models/armor/stone_layer_1.png"; } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.