public void sendAllWindowProperties(Container containerIn, IInventory inventory) { for (int i = 0; i < inventory.getFieldCount(); ++i) { this.connection.sendPacket(new SPacketWindowProperty(containerIn.windowId, i, inventory.getField(i))); } }
/** * Sets the progressbar of the opened window to the specified value */ public void handleWindowProperty(SPacketWindowProperty packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); EntityPlayer entityplayer = this.gameController.player; if (entityplayer.openContainer != null && entityplayer.openContainer.windowId == packetIn.getWindowId()) { entityplayer.openContainer.updateProgressBar(packetIn.getProperty(), packetIn.getValue()); } }
/** * Sets the progressbar of the opened window to the specified value */ public void handleWindowProperty(SPacketWindowProperty packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); EntityPlayer entityplayer = this.gameController.thePlayer; if (entityplayer.openContainer != null && entityplayer.openContainer.windowId == packetIn.getWindowId()) { entityplayer.openContainer.updateProgressBar(packetIn.getProperty(), packetIn.getValue()); } }
/** * Sends two ints to the client-side Container. Used for furnace burning time, smelting progress, brewing progress, * and enchanting level. Normally the first int identifies which variable to update, and the second contains the new * value. Both are truncated to shorts in non-local SMP. */ public void sendProgressBarUpdate(Container containerIn, int varToUpdate, int newValue) { this.connection.sendPacket(new SPacketWindowProperty(containerIn.windowId, varToUpdate, newValue)); }
/** * Sets the progressbar of the opened window to the specified value */ void handleWindowProperty(SPacketWindowProperty packetIn);