Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.josh.gomc.armor;
- import com.josh.gomc.Main;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.ItemStack;
- import net.minecraft.item.ItemArmor;
- import net.minecraft.item.ItemArmor.ArmorMaterial;
- import net.minecraft.potion.Potion;
- import net.minecraft.potion.PotionEffect;
- import net.minecraft.world.World;
- public class ItemOrderArmor extends ItemArmor{
- private String textureName;
- public ItemOrderArmor(ArmorMaterial material, int type, String textureName) {
- super(material, 0, type);
- this.textureName = textureName;
- }
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
- {
- return "gomc:textures/models/armor/" + this.textureName + "_" + (this.armorType == 2 ? "2" : "1") + ".png";
- }
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if (itemStack.getItem().equals(Main.itemOrderHelmet))
- player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 300));
- if (itemStack.getItem().equals(Main.itemOrderLeggings))
- player.addPotionEffect(new PotionEffect(Potion.jump.id, 40, 3));
- if (itemStack.getItem().equals(Main.itemOrderChestplate))
- player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 40, 4));
- if (itemStack.getItem().equals(Main.itemOrderBoots))
- player.addPotionEffect(new PotionEffect(Potion.resistance.id, 40, 3));
- }
- }
Add Comment
Please, Sign In to add comment