Add pre-release versions between 1.14.4 and 1.15.1; update test config
This commit is contained in:
1 parent
51c618aeb5
commit
b38adc1aa1
13 files changed
+67
-39
No files matched your search
@@ -62,7 +62,7 @@ def get_packets(context):
|
||||
class KeepAlivePacket(AbstractKeepAlivePacket):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x21 if context.protocol_version >= 573 else \
|
||||
return 0x21 if context.protocol_version >= 550 else \
|
||||
0x20 if context.protocol_version >= 471 else \
|
||||
0x21 if context.protocol_version >= 389 else \
|
||||
0x20 if context.protocol_version >= 345 else \
|
||||
@@ -75,7 +75,7 @@ class KeepAlivePacket(AbstractKeepAlivePacket):
|
||||
class JoinGamePacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x26 if context.protocol_version >= 573 else \
|
||||
return 0x26 if context.protocol_version >= 550 else \
|
||||
0x25 if context.protocol_version >= 389 else \
|
||||
0x24 if context.protocol_version >= 345 else \
|
||||
0x23 if context.protocol_version >= 332 else \
|
||||
@@ -88,13 +88,13 @@ class JoinGamePacket(Packet):
|
||||
{'entity_id': Integer},
|
||||
{'game_mode': UnsignedByte},
|
||||
{'dimension': Integer if context.protocol_version >= 108 else Byte},
|
||||
{'hashed_seed': Long} if context.protocol_version >= 573 else {},
|
||||
{'hashed_seed': Long} if context.protocol_version >= 552 else {},
|
||||
{'difficulty': UnsignedByte} if context.protocol_version < 464 else {},
|
||||
{'max_players': UnsignedByte},
|
||||
{'level_type': String},
|
||||
{'render_distance': VarInt} if context.protocol_version >= 468 else {},
|
||||
{'reduced_debug_info': Boolean},
|
||||
{'respawn_screen': Boolean} if context.protocol_version >= 573 else {},
|
||||
{'respawn_screen': Boolean} if context.protocol_version >= 571 else {},
|
||||
])
|
||||
|
||||
# These aliases declare the Enum type corresponding to each field:
|
||||
@@ -106,7 +106,7 @@ class JoinGamePacket(Packet):
|
||||
class ServerDifficultyPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x0E if context.protocol_version >= 573 else \
|
||||
return 0x0E if context.protocol_version >= 550 else \
|
||||
0x0D if context.protocol_version >= 332 else \
|
||||
0x0E if context.protocol_version >= 318 else \
|
||||
0x0D if context.protocol_version >= 70 else \
|
||||
@@ -125,7 +125,7 @@ class ServerDifficultyPacket(Packet):
|
||||
class ChatMessagePacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x0F if context.protocol_version >= 573 else \
|
||||
return 0x0F if context.protocol_version >= 550 else \
|
||||
0x0E if context.protocol_version >= 343 else \
|
||||
0x0F if context.protocol_version >= 332 else \
|
||||
0x10 if context.protocol_version >= 317 else \
|
||||
@@ -146,7 +146,7 @@ class ChatMessagePacket(Packet):
|
||||
class DisconnectPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x1B if context.protocol_version >= 573 else \
|
||||
return 0x1B if context.protocol_version >= 550 else \
|
||||
0x1A if context.protocol_version >= 471 else \
|
||||
0x1B if context.protocol_version >= 345 else \
|
||||
0x1A if context.protocol_version >= 332 else \
|
||||
@@ -187,7 +187,7 @@ class SpawnPlayerPacket(Packet):
|
||||
{'yaw': Angle},
|
||||
{'pitch': Angle},
|
||||
{'current_item': Short} if context.protocol_version <= 49 else {},
|
||||
# TODO: read entity metadata
|
||||
# TODO: read entity metadata (protocol < 550)
|
||||
])
|
||||
|
||||
# Access the 'x', 'y', 'z' fields as a Vector tuple.
|
||||
@@ -206,7 +206,7 @@ class SpawnPlayerPacket(Packet):
|
||||
class EntityVelocityPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x46 if context.protocol_version >= 573 else \
|
||||
return 0x46 if context.protocol_version >= 550 else \
|
||||
0x45 if context.protocol_version >= 471 else \
|
||||
0x41 if context.protocol_version >= 461 else \
|
||||
0x42 if context.protocol_version >= 451 else \
|
||||
@@ -232,7 +232,7 @@ class EntityVelocityPacket(Packet):
|
||||
class UpdateHealthPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x49 if context.protocol_version >= 573 else \
|
||||
return 0x49 if context.protocol_version >= 550 else \
|
||||
0x48 if context.protocol_version >= 471 else \
|
||||
0x44 if context.protocol_version >= 461 else \
|
||||
0x45 if context.protocol_version >= 451 else \
|
||||
@@ -257,7 +257,7 @@ class UpdateHealthPacket(Packet):
|
||||
class RespawnPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x3B if context.protocol_version >= 573 else \
|
||||
return 0x3B if context.protocol_version >= 550 else \
|
||||
0x3A if context.protocol_version >= 471 else \
|
||||
0x38 if context.protocol_version >= 461 else \
|
||||
0x39 if context.protocol_version >= 451 else \
|
||||
@@ -274,6 +274,7 @@ class RespawnPacket(Packet):
|
||||
get_definition = staticmethod(lambda context: [
|
||||
{'dimension': Integer},
|
||||
{'difficulty': UnsignedByte} if context.protocol_version < 464 else {},
|
||||
{'hashed_seed': Long} if context.protocol_version >= 552 else {},
|
||||
{'game_mode': UnsignedByte},
|
||||
{'level_type': String},
|
||||
])
|
||||
@@ -287,7 +288,7 @@ class RespawnPacket(Packet):
|
||||
class PluginMessagePacket(AbstractPluginMessagePacket):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x19 if context.protocol_version >= 573 else \
|
||||
return 0x19 if context.protocol_version >= 550 else \
|
||||
0x18 if context.protocol_version >= 471 else \
|
||||
0x19 if context.protocol_version >= 345 else \
|
||||
0x18 if context.protocol_version >= 332 else \
|
||||
@@ -299,7 +300,7 @@ class PluginMessagePacket(AbstractPluginMessagePacket):
|
||||
class PlayerListHeaderAndFooterPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x54 if context.protocol_version >= 573 else \
|
||||
return 0x54 if context.protocol_version >= 550 else \
|
||||
0x53 if context.protocol_version >= 471 else \
|
||||
0x5F if context.protocol_version >= 461 else \
|
||||
0x50 if context.protocol_version >= 451 else \
|
||||
@@ -320,7 +321,7 @@ class PlayerListHeaderAndFooterPacket(Packet):
|
||||
class EntityLookPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x2B if context.protocol_version >= 573 else \
|
||||
return 0x2B if context.protocol_version >= 550 else \
|
||||
0x2A if context.protocol_version >= 389 else \
|
||||
0x29 if context.protocol_version >= 345 else \
|
||||
0x28 if context.protocol_version >= 318 else \
|
||||
|
||||
@@ -8,7 +8,7 @@ from minecraft.networking.types import (
|
||||
class BlockChangePacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x0C if context.protocol_version >= 573 else \
|
||||
return 0x0C if context.protocol_version >= 550 else \
|
||||
0x0B if context.protocol_version >= 332 else \
|
||||
0x0C if context.protocol_version >= 318 else \
|
||||
0x0B if context.protocol_version >= 67 else \
|
||||
@@ -46,7 +46,7 @@ class BlockChangePacket(Packet):
|
||||
class MultiBlockChangePacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x10 if context.protocol_version >= 573 else \
|
||||
return 0x10 if context.protocol_version >= 550 else \
|
||||
0x0F if context.protocol_version >= 343 else \
|
||||
0x10 if context.protocol_version >= 332 else \
|
||||
0x11 if context.protocol_version >= 318 else \
|
||||
|
||||
@@ -8,7 +8,7 @@ from minecraft.networking.types import (
|
||||
class CombatEventPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x33 if context.protocol_version >= 573 else \
|
||||
return 0x33 if context.protocol_version >= 550 else \
|
||||
0x32 if context.protocol_version >= 471 else \
|
||||
0x30 if context.protocol_version >= 451 else \
|
||||
0x2F if context.protocol_version >= 389 else \
|
||||
|
||||
@@ -7,7 +7,7 @@ from minecraft.networking.packets import Packet
|
||||
class ExplosionPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x1D if context.protocol_version >= 573 else \
|
||||
return 0x1D if context.protocol_version >= 550 else \
|
||||
0x1C if context.protocol_version >= 471 else \
|
||||
0x1E if context.protocol_version >= 389 else \
|
||||
0x1D if context.protocol_version >= 345 else \
|
||||
|
||||
@@ -8,7 +8,7 @@ from minecraft.networking.packets import Packet
|
||||
class FacePlayerPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x35 if context.protocol_version >= 573 else \
|
||||
return 0x35 if context.protocol_version >= 550 else \
|
||||
0x34 if context.protocol_version >= 471 else \
|
||||
0x32 if context.protocol_version >= 451 else \
|
||||
0x31 if context.protocol_version >= 389 else \
|
||||
|
||||
@@ -8,7 +8,7 @@ from minecraft.networking.types import (
|
||||
class MapPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x27 if context.protocol_version >= 573 else \
|
||||
return 0x27 if context.protocol_version >= 550 else \
|
||||
0x26 if context.protocol_version >= 389 else \
|
||||
0x25 if context.protocol_version >= 345 else \
|
||||
0x24 if context.protocol_version >= 334 else \
|
||||
|
||||
@@ -9,7 +9,7 @@ from minecraft.networking.types import (
|
||||
class PlayerListItemPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x34 if context.protocol_version >= 573 else \
|
||||
return 0x34 if context.protocol_version >= 550 else \
|
||||
0x33 if context.protocol_version >= 471 else \
|
||||
0x31 if context.protocol_version >= 451 else \
|
||||
0x30 if context.protocol_version >= 389 else \
|
||||
|
||||
@@ -9,7 +9,7 @@ from minecraft.networking.types import (
|
||||
class PlayerPositionAndLookPacket(Packet, BitFieldEnum):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x36 if context.protocol_version >= 573 else \
|
||||
return 0x36 if context.protocol_version >= 550 else \
|
||||
0x35 if context.protocol_version >= 471 else \
|
||||
0x33 if context.protocol_version >= 451 else \
|
||||
0x32 if context.protocol_version >= 389 else \
|
||||
|
||||
@@ -9,7 +9,7 @@ __all__ = 'SoundEffectPacket',
|
||||
class SoundEffectPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x52 if context.protocol_version >= 573 else \
|
||||
return 0x52 if context.protocol_version >= 550 else \
|
||||
0x51 if context.protocol_version >= 471 else \
|
||||
0x4D if context.protocol_version >= 461 else \
|
||||
0x4E if context.protocol_version >= 451 else \
|
||||
|
||||
Reference in new issue
Block a user