/** Callback for when the crafting gui is closed. */ public void onCraftGuiClosed(EntityPlayer par1EntityPlayer) { super.onCraftGuiClosed(par1EntityPlayer); this.theMerchant.setCustomer((EntityPlayer) null); super.onCraftGuiClosed(par1EntityPlayer); if (!this.theWorld.isRemote) { ItemStack var2 = this.merchantInventory.getStackInSlotOnClosing(0); if (var2 != null) { par1EntityPlayer.dropPlayerItem(var2); } var2 = this.merchantInventory.getStackInSlotOnClosing(1); if (var2 != null) { par1EntityPlayer.dropPlayerItem(var2); } } }
@Override public void onCraftGuiClosed(EntityPlayer entityplayer) { super.onCraftGuiClosed(entityplayer); if (isBlock) { tileEntity.closeChest(); tileEntity.playersUsing.remove(entityplayer); } else { itemInventory.closeChest(); } }
@Override public void onCraftGuiClosed(EntityPlayer entityPlayer) { super.onCraftGuiClosed(entityPlayer); if (!this.world.isRemote) { List<ItemStack> dropItemList = new ArrayList<ItemStack>(); for (int i = 0; i < this.inventoryEnchanter.getSizeInventory(); ++i) { dropItemList.add(this.inventoryEnchanter.getStackInSlotOnClosing(i)); } for (ItemStack dropItem : dropItemList) { if (dropItem != null) { entityPlayer.dropPlayerItem(dropItem); } } } }
@Override public void onCraftGuiClosed(EntityPlayer entityplayer) { super.onCraftGuiClosed(entityplayer); this.tileEntity.closeChest(); }