Add 26.3 inventory component decoding

This commit is contained in:
Tanner committed 2026-11-03 23:33:05 +00:00
1 parent faff7a0bf5
commit 87669ed6ec
2 files changed
+714 -17

No files matched your search

+9
View File
@@ -340,6 +340,10 @@ class Connection(object):
print('[pyCraft/777] TX state={} id=0x{:02x} packet={}'.format(
type(self.reactor).__name__, packet.id,
packet.packet_name), flush=True)
if (self.context.protocol_version >= 777 and
packet.packet_name == 'move player position and rotation'):
self.player_position = (
packet.x, packet.y, packet.z, packet.yaw, packet.pitch)
if self.options.compression_enabled:
packet.write(self.socket, self.options.compression_threshold)
else:
@@ -349,6 +353,11 @@ class Connection(object):
listener.call_packet(packet)
except IgnorePacket:
pass
except OSError:
# An immediate disconnect can close the socket while the network
# thread is draining a packet queued just before shutdown.
if self.connected:
raise
def status(self, handle_status=None, handle_ping=False):
"""Issue a status request to the server and then disconnect.