Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.row.item;
- import net.minecraft.client.model.ModelBiped;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.EnumAction;
- import net.minecraft.item.ItemArmor;
- import net.minecraft.item.ItemStack;
- import net.row.registry.RoWItems;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- public class ItemEngineersSuit extends ItemArmor{
- public ItemEngineersSuit(int par1){
- super(ItemArmor.ArmorMaterial.CLOTH, 0, par1);
- maxStackSize = 1;
- }
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){
- if(stack.getItem() == RoWItems.itemSuitRusEngPants){
- return "row:textures/armour/rus_eng_pants.png";
- }else if(stack.getItem() == RoWItems.itemSuitRusEngShirt){
- return "row:textures/armour/rus_eng_shirt.png";
- }else if(stack.getItem() == RoWItems.itemSuitRusEngCoat){
- return "row:textures/armour/rus_eng_coat.png";
- }else if(stack.getItem() == RoWItems.itemSuitRusEngBoots){
- return "row:textures/armour/rus_eng_boots.png";
- }else
- return "row:textures/armour/rus_eng_cap.png";
- }
- @Override
- @SideOnly(Side.CLIENT)
- public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemstack, int armorSlot){
- ModelBiped armourModel = null;
- if(itemstack != null){
- if(itemstack.getItem() instanceof ItemEngineersSuit){
- float f = 0.125F;
- if(itemstack.getItem() == RoWItems.itemSuitRusEngPants)
- f = 0.12F;
- if(itemstack.getItem() == RoWItems.itemSuitRusEngShirt)
- f = 0.115F;
- if(itemstack.getItem() == RoWItems.itemSuitRusEngBoots)
- f = 0.115F;
- armourModel = new ModelBiped(f);
- ItemStack itemstack2 = ((EntityPlayer)entityLiving).inventory.getCurrentItem();
- armourModel.heldItemRight = itemstack2 != null ? 1 : 0;
- armourModel.isSneak = entityLiving.isSneaking();
- if(itemstack2 != null && ((EntityPlayer)entityLiving).getItemInUseCount() > 0){
- EnumAction enumaction = itemstack2.getItemUseAction();
- if(enumaction == EnumAction.block){
- armourModel.heldItemRight = 3;
- }else if(enumaction == EnumAction.bow){
- armourModel.aimedBow = true;
- }
- }
- }
- }
- return armourModel;
- }
- @Override
- public int getColor(ItemStack par1ItemStack){
- return 0xFFFFFF;
- }
- @Override
- public int getColorFromItemStack(ItemStack par1ItemStack, int par2){
- return 0xFFFFFF;
- }
- @SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses(){
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement