feedback: add write method
This commit is contained in:
1 parent
5349ff2730
commit
6137436d03
1 file changed
+8
-1
@@ -983,7 +983,14 @@ class ClientBlockChange(Packet):
|
|||||||
self.blockMeta = (blockData & 0xF)
|
self.blockMeta = (blockData & 0xF)
|
||||||
|
|
||||||
def write(self, socket, compression_threshold=None):
|
def write(self, socket, compression_threshold=None):
|
||||||
raise NotImplementedError
|
packet_buffer = PacketBuffer()
|
||||||
|
x = self.location['x']
|
||||||
|
y = self.location['y']
|
||||||
|
z = self.location['z']
|
||||||
|
Position.send(x, y, z, packet_buffer)
|
||||||
|
blockData = ((self.blockId << 4) | (self.blockMeta & 0xF))
|
||||||
|
VarInt.send(blockData)
|
||||||
|
self._write_buffer(socket, packet_buffer, compression_threshold)
|
||||||
|
|
||||||
|
|
||||||
class ClientMultiBlockChange(Packet):
|
class ClientMultiBlockChange(Packet):
|
||||||
|
|||||||
Reference in new issue
Block a user