Fix support for Minecraft 20w06a to 1.16.2 (protocols 701 to 751)
This commit is contained in:
1 parent
b79f8b30eb
commit
4c35517157
20 files changed
+654
-256
No files matched your search
@@ -5,7 +5,7 @@ from minecraft.networking.packets import (
|
||||
from minecraft.networking.types import (
|
||||
Double, Float, Boolean, VarInt, String, Byte, Position, Enum,
|
||||
RelativeHand, BlockFace, Vector, Direction, PositionAndLook,
|
||||
multi_attribute_alias, Short
|
||||
multi_attribute_alias,
|
||||
)
|
||||
|
||||
from .client_settings_packet import ClientSettingsPacket
|
||||
@@ -126,7 +126,8 @@ class TeleportConfirmPacket(Packet):
|
||||
class AnimationPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x2B if context.protocol_version >= 719 else \
|
||||
return 0x2C if context.protocol_version >= 738 else \
|
||||
0x2B if context.protocol_version >= 712 else \
|
||||
0x2A if context.protocol_version >= 468 else \
|
||||
0x29 if context.protocol_version >= 464 else \
|
||||
0x27 if context.protocol_version >= 389 else \
|
||||
@@ -200,7 +201,8 @@ class PlayerBlockPlacementPacket(Packet):
|
||||
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x2D if context.protocol_version >= 712 else \
|
||||
return 0x2E if context.protocol_version >= 738 else \
|
||||
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 \
|
||||
@@ -238,7 +240,8 @@ class PlayerBlockPlacementPacket(Packet):
|
||||
class UseItemPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x2E if context.protocol_version >= 719 else \
|
||||
return 0x2F if context.protocol_version >= 738 else \
|
||||
0x2E if context.protocol_version >= 712 else \
|
||||
0x2D if context.protocol_version >= 468 else \
|
||||
0x2C if context.protocol_version >= 464 else \
|
||||
0x2A if context.protocol_version >= 389 else \
|
||||
|
||||
Reference in new issue
Block a user