/** 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); } } }
/** Callback for when the crafting gui is closed. */ public void onCraftGuiClosed(EntityPlayer par1EntityPlayer) { super.onCraftGuiClosed(par1EntityPlayer); this.lowerChestInventory.closeChest(); }