Guest User

Tier2ArmorItem

a guest
Jul 7th, 2020
112
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.chaoticsoul.evolate.objects.armor;
  2.  
  3. import javax.annotation.Nullable;
  4.  
  5. import com.chaoticsoul.evolate.Evolate;
  6. import com.chaoticsoul.evolate.init.EvolateArmorMaterials;
  7.  
  8. import net.minecraft.client.renderer.entity.layers.BipedArmorLayer;
  9. import net.minecraft.client.renderer.entity.model.BipedModel;
  10. import net.minecraft.entity.Entity;
  11. import net.minecraft.entity.LivingEntity;
  12. import net.minecraft.entity.player.PlayerEntity;
  13. import net.minecraft.inventory.EquipmentSlotType;
  14. import net.minecraft.item.ArmorItem;
  15. import net.minecraft.item.IArmorMaterial;
  16. import net.minecraft.item.ItemStack;
  17.  
  18. public class Tier2ArmorItem extends ArmorItem {
  19.  
  20.     public Tier2ArmorItem(IArmorMaterial materialIn, EquipmentSlotType slot, Properties p_i48534_3_) {
  21.         super(materialIn, slot, p_i48534_3_);
  22.  
  23.     }
  24.    
  25. @SuppressWarnings("unchecked")
  26.     @Nullable
  27.     @Override
  28.     public <A extends BipedModel<?>> A getArmorModel(LivingEntity entityLiving, ItemStack itemStack,
  29.             EquipmentSlotType armorSlot, A _default) {
  30.         Tier2OnyxArmorModel model = new Tier2OnyxArmorModel(1.0F);
  31.        
  32.             model.Helmet.showModel = armorSlot == EquipmentSlotType.HEAD;
  33.             model.Chestplate.showModel = armorSlot == EquipmentSlotType.CHEST;
  34.             model.RightSleeve.showModel = armorSlot == EquipmentSlotType.CHEST;
  35.             model.LeftSleeve.showModel = armorSlot == EquipmentSlotType.CHEST;
  36.             model.RightLegging.showModel = armorSlot == EquipmentSlotType.LEGS;
  37.             model.LeftLegging.showModel = armorSlot == EquipmentSlotType.LEGS;
  38.             model.RightBoot.showModel = armorSlot == EquipmentSlotType.FEET;
  39.             model.LeftBoot.showModel = armorSlot == EquipmentSlotType.FEET;
  40.            
  41.             model.isChild = _default.isChild;
  42.             model.isSitting = _default.isSitting;
  43.             model.isSneak = _default.isSneak;
  44.             model.rightArmPose = _default.rightArmPose;
  45.             model.leftArmPose = _default.leftArmPose;
  46.            
  47.             return (A) model;
  48.  
  49.            
  50.        
  51.        
  52.     }
  53.     @Nullable
  54.     @Override
  55.     public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) {
  56.         return "evolate:textures/models/armor/onyx_armor2.png";
  57.     }
  58.    
  59.    
  60. }
RAW Paste Data