turt2live

Untitled

Dec 15th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1.     public ArmoredPet(LivingEntity entity, String name){
  2.         super(entity, name);
  3.         EntityEquipment equipment = entity.getEquipment();
  4.         if(equipment == null){
  5.             helmet = new ItemStack(Material.AIR);
  6.             chestplate = new ItemStack(Material.AIR);
  7.             pants = new ItemStack(Material.AIR);
  8.             boots = new ItemStack(Material.AIR);
  9.             weapon = new ItemStack(Material.AIR);
  10.             return;
  11.         }
  12.         /* Line 44 of ArmoredPet.java */ weapon = equipment.getItemInHand() != null ? equipment.getItemInHand() : new ItemStack(Material.AIR);
  13.         helmet = equipment.getHelmet() != null ? equipment.getHelmet() : new ItemStack(Material.AIR);
  14.         chestplate = equipment.getChestplate() != null ? equipment.getChestplate() : new ItemStack(Material.AIR);
  15.         boots = equipment.getBoots() != null ? equipment.getBoots() : new ItemStack(Material.AIR);
  16.         pants = equipment.getLeggings() != null ? equipment.getLeggings() : new ItemStack(Material.AIR);
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment