public void displayGUIMerchant(IMerchant p_71030_1_, String p_71030_2_) { this.getNextWindowId(); this.openContainer = new ContainerMerchant(this.inventory, p_71030_1_, this.worldObj); this.openContainer.windowId = this.currentWindowId; this.openContainer.onCraftGuiOpened(this); InventoryMerchant inventorymerchant = ((ContainerMerchant) this.openContainer).getMerchantInventory(); this.playerNetServerHandler.sendPacket( new S2DPacketOpenWindow( this.currentWindowId, 6, p_71030_2_ == null ? "" : p_71030_2_, inventorymerchant.getSizeInventory(), p_71030_2_ != null)); MerchantRecipeList merchantrecipelist = p_71030_1_.getRecipes(this); if (merchantrecipelist != null) { PacketBuffer packetbuffer = new PacketBuffer(Unpooled.buffer()); try { packetbuffer.writeInt(this.currentWindowId); merchantrecipelist.func_151391_a(packetbuffer); this.playerNetServerHandler.sendPacket( new S3FPacketCustomPayload("MC|TrList", packetbuffer)); } catch (IOException ioexception) { logger.error("Couldn\'t send trade list", ioexception); } finally { packetbuffer.release(); } } }