Advertisement
TitanChase

Untitled

Mar 1st, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. public void setHeldItem(EntityEquipmentSlot slot, ItemStack item)
  2.     {
  3.         for (ItemStack itemStack : inventory)
  4.         {
  5.             if(itemStack.isItemEqual(item))
  6.             {
  7.                 aiEntity.setItemStackToSlot(slot, item);
  8.                 break;
  9.             }
  10.         }
  11.     }
  12.    
  13.     public void clearHeldItem(EntityEquipmentSlot slot)
  14.     {
  15.         aiEntity.setItemStackToSlot(slot, ItemStack.EMPTY);
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement