def encode(self) -> bytes: return Buffer.pack("h", len(self.slots)) + b"".join( [Buffer.pack_slot(s) for s in self.slots])
def encode(self) -> bytes: return (Buffer.pack("b", self.window_id) + Buffer.pack("h", self.slot) + Buffer.pack_slot(**self.slot_data))
def encode(self) -> bytes: return ( Buffer.pack_varint(self.entity_id) + Buffer.pack_varint(len(self.equipment)) + b"".join([Buffer.pack("b", e[0]) + Buffer.pack_slot(**e[1]) for e in self.equipment]) )