Added support for snapshots 20w20a and 20w20b

This commit is contained in:
Tristan Gosselin-Hane committed 2020-05-14 21:37:25 -04:00
1 parent d26aacec28
commit 9c08c6c9f5
2 files changed
+8 -2

No files matched your search

+2
View File
@@ -240,6 +240,8 @@ SUPPORTED_MINECRAFT_VERSIONS = {
'20w17a': 713, '20w17a': 713,
'20w18a': 714, '20w18a': 714,
'20w19a': 715, '20w19a': 715,
'20w20a': 716,
'20w20b': 717,
} }
# Those Minecraft versions supported by pyCraft which are "release" versions, # Those Minecraft versions supported by pyCraft which are "release" versions,
@@ -91,10 +91,12 @@ class JoinGamePacket(Packet):
{'hashed_seed': Long} if context.protocol_version >= 552 else {}, {'hashed_seed': Long} if context.protocol_version >= 552 else {},
{'difficulty': UnsignedByte} if context.protocol_version < 464 else {}, {'difficulty': UnsignedByte} if context.protocol_version < 464 else {},
{'max_players': UnsignedByte}, {'max_players': UnsignedByte},
{'level_type': String}, {'level_type': String} if context.protocol_version < 716 else {},
{'render_distance': VarInt} if context.protocol_version >= 468 else {}, {'render_distance': VarInt} if context.protocol_version >= 468 else {},
{'reduced_debug_info': Boolean}, {'reduced_debug_info': Boolean},
{'respawn_screen': Boolean} if context.protocol_version >= 571 else {}, {'respawn_screen': Boolean} if context.protocol_version >= 571 else {},
{'is_debug': String} if context.protocol_version >= 716 else {},
{'is_flat': String} if context.protocol_version >= 716 else {},
]) ])
# These aliases declare the Enum type corresponding to each field: # These aliases declare the Enum type corresponding to each field:
@@ -278,7 +280,9 @@ class RespawnPacket(Packet):
{'difficulty': UnsignedByte} if context.protocol_version < 464 else {}, {'difficulty': UnsignedByte} if context.protocol_version < 464 else {},
{'hashed_seed': Long} if context.protocol_version >= 552 else {}, {'hashed_seed': Long} if context.protocol_version >= 552 else {},
{'game_mode': UnsignedByte}, {'game_mode': UnsignedByte},
{'level_type': String}, {'level_type': String} if context.protocol_version < 716 else {},
{'is_debug': String} if context.protocol_version >= 716 else {},
{'is_flat': String} if context.protocol_version >= 716 else {},
{'copy_metadata': Boolean}, {'copy_metadata': Boolean},
]) ])