Added support for snapshots 20w13b, 20w14a, 20w15a, 20w16a

This commit is contained in:
Tristan Gosselin-Hane 2020-04-16 20:52:48 -04:00
parent 428a599f40
commit 7380bc2c61
2 changed files with 10 additions and 3 deletions

View File

@ -233,6 +233,10 @@ SUPPORTED_MINECRAFT_VERSIONS = {
'20w11a': 706,
'20w12a': 707,
'20w13a': 708,
'20w13b': 709,
'20w14a': 710,
'20w15a': 711,
'20w16a': 712,
}
# Those Minecraft versions supported by pyCraft which are "release" versions,

View File

@ -37,7 +37,8 @@ def get_packets(context):
class KeepAlivePacket(AbstractKeepAlivePacket):
@staticmethod
def get_id(context):
return 0x0F if context.protocol_version >= 471 else \
return 0x10 if context.protocol_version >= 712 else \
0x0F if context.protocol_version >= 471 else \
0x10 if context.protocol_version >= 464 else \
0x0E if context.protocol_version >= 389 else \
0x0C if context.protocol_version >= 386 else \
@ -78,7 +79,8 @@ class ChatPacket(Packet):
class PositionAndLookPacket(Packet):
@staticmethod
def get_id(context):
return 0x12 if context.protocol_version >= 471 else \
return 0x13 if context.protocol_version >= 712 else \
0x12 if context.protocol_version >= 471 else \
0x13 if context.protocol_version >= 464 else \
0x11 if context.protocol_version >= 389 else \
0x0F if context.protocol_version >= 386 else \
@ -197,7 +199,8 @@ class PlayerBlockPlacementPacket(Packet):
@staticmethod
def get_id(context):
return 0x2C if context.protocol_version >= 468 else \
return 0x2D if context.protocol_version >= 712 else \
0x2C if context.protocol_version >= 468 else \
0x2B if context.protocol_version >= 464 else \
0x29 if context.protocol_version >= 389 else \
0x27 if context.protocol_version >= 386 else \