diff --git a/minecraft/__init__.py b/minecraft/__init__.py index dcfa743..b63749e 100644 --- a/minecraft/__init__.py +++ b/minecraft/__init__.py @@ -461,6 +461,7 @@ KNOWN_MINECRAFT_VERSION_RECORDS = [ Version('20w46a', PRE | 6, True), Version('20w48a', PRE | 7, True), Version('1.17', 755, True), + Version('1.17.1', 756, True), ] # An OrderedDict mapping the id string of each known Minecraft version to its diff --git a/minecraft/networking/packets/clientbound/play/__init__.py b/minecraft/networking/packets/clientbound/play/__init__.py index ce8d740..1a7b8c0 100644 --- a/minecraft/networking/packets/clientbound/play/__init__.py +++ b/minecraft/networking/packets/clientbound/play/__init__.py @@ -150,7 +150,7 @@ class SetCompressionPacket(Packet): def get_id(context): return 0x03 if context.protocol_later_eq(755) else \ 0x46 - + packet_name = "set compression" definition = [ {'threshold': VarInt}] @@ -374,7 +374,6 @@ class EntityLookPacket(Packet): {'on_ground': Boolean} ] - class ResourcePackSendPacket(Packet): @staticmethod def get_id(context): @@ -384,5 +383,7 @@ class ResourcePackSendPacket(Packet): packet_name = "resource pack send" definition = [ {"url": String}, - {"hash": String} - ] + {"hash": String}, + {"forced": Boolean}, + {"forced_message": String} + ] \ No newline at end of file diff --git a/minecraft/networking/packets/clientbound/play/map_packet.py b/minecraft/networking/packets/clientbound/play/map_packet.py index 23457de..ddd47f0 100644 --- a/minecraft/networking/packets/clientbound/play/map_packet.py +++ b/minecraft/networking/packets/clientbound/play/map_packet.py @@ -101,7 +101,10 @@ class MapPacket(Packet): icon = MapPacket.MapIcon(type, direction, (x, z), display_name) self.icons.append(icon) - self.width = UnsignedByte.read(file_object) + try: + self.width = UnsignedByte.read(file_object) + except: + self.width = None if self.width: self.height = UnsignedByte.read(file_object) x = Byte.read(file_object) diff --git a/minecraft/networking/packets/clientbound/play/player_position_and_look_packet.py b/minecraft/networking/packets/clientbound/play/player_position_and_look_packet.py index c7c04de..4e2ed00 100644 --- a/minecraft/networking/packets/clientbound/play/player_position_and_look_packet.py +++ b/minecraft/networking/packets/clientbound/play/player_position_and_look_packet.py @@ -34,7 +34,7 @@ class PlayerPositionAndLookPacket(Packet, BitFieldEnum): {'pitch': Float}, {'flags': Byte}, {'teleport_id': VarInt} if context.protocol_later_eq(107) else {}, - {'dismount_vehicle': Boolean} if context.protocol_later_eq(755) else {}, + {'dismount_vehicle':Boolean} if context.protocol_later_eq(755) else {}, ]) # Access the 'x', 'y', 'z' fields as a Vector tuple. diff --git a/minecraft/networking/packets/serverbound/play/__init__.py b/minecraft/networking/packets/serverbound/play/__init__.py index 10262e5..9dfaf44 100644 --- a/minecraft/networking/packets/serverbound/play/__init__.py +++ b/minecraft/networking/packets/serverbound/play/__init__.py @@ -268,7 +268,6 @@ class UseItemPacket(Packet): Hand = RelativeHand - class ResourcePackStatusPacket(Packet): @staticmethod def get_id(context): @@ -276,4 +275,4 @@ class ResourcePackStatusPacket(Packet): packet_name = "resource pask status" definition = [ {"result": VarInt} - ] + ] \ No newline at end of file