@Override
 public InventoryType getType() {
   InventoryType type = viewing.getType();
   if (type == InventoryType.CRAFTING && player.getGameMode() == GameMode.CREATIVE) {
     return InventoryType.CREATIVE;
   }
   return type;
 }
 @Override
 public void setItem(int slot, ItemStack item) {
   net.minecraft.item.ItemStack stack = CraftItemStack.asNMSCopy(item);
   if (slot != -999) {
     container.getSlot(slot).putStack(stack);
   } else {
     player.getHandle().dropPlayerItemWithRandomChoice(stack, false);
   }
 }
Example #3
0
 public void setHandle(final net.minecraft.entity.player.EntityPlayerMP entity) {
   super.setHandle(entity);
 }
Example #4
0
 @Override
 public void resetMaxHealth() {
   super.resetMaxHealth();
   getHandle().func_71118_n();
 }
Example #5
0
 @Override
 public void setMaxHealth(double amount) {
   super.setMaxHealth(amount);
   this.health = Math.min(this.health, health);
   getHandle().func_71118_n();
 }
 @Override
 public Inventory getBottomInventory() {
   return player.getInventory();
 }
Example #7
0
 public void setHandle(final EntityPlayer entity) {
   super.setHandle((EntityHuman) entity);
   this.entity = entity;
 }