// Implementing IInventorySubscriber - relays inventory changes to the viewer // of the window. func (iv *inventoryView) SlotUpdate(slot *gamerules.Slot, slotId SlotId) { buf := new(bytes.Buffer) slot.SendUpdate(buf, iv.window.windowId, iv.startSlot+slotId) iv.window.viewer.TransmitPacket(buf.Bytes()) }