mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-25 11:46:54 +01:00
updated all other packets that needed updating
This commit is contained in:
parent
dd5c77545b
commit
0169e0aa75
@ -355,7 +355,7 @@ class PlayerListHeaderAndFooterPacket(Packet):
|
||||
class EntityLookPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x3E if context.protocol_later_eq(755) else \
|
||||
return 0x2B if context.protocol_later_eq(755) else \
|
||||
0x29 if context.protocol_later_eq(741) else \
|
||||
0x2A if context.protocol_later_eq(721) else \
|
||||
0x2B if context.protocol_later_eq(550) else \
|
||||
|
@ -9,7 +9,8 @@ from minecraft.networking.types import (
|
||||
class BlockChangePacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x0B if context.protocol_later_eq(721) else \
|
||||
return 0x0C if context.protocol_later_eq(755) else \
|
||||
0x0B if context.protocol_later_eq(721) else \
|
||||
0x0C if context.protocol_later_eq(550) else \
|
||||
0x0B if context.protocol_later_eq(332) else \
|
||||
0x0C if context.protocol_later_eq(318) else \
|
||||
|
@ -7,7 +7,8 @@ from minecraft.networking.packets import Packet
|
||||
class ExplosionPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x1B if context.protocol_later_eq(741) else \
|
||||
return 0x1C if context.protocol_later_eq(755) else \
|
||||
0x1B if context.protocol_later_eq(741) else \
|
||||
0x1C if context.protocol_later_eq(721) else \
|
||||
0x1D if context.protocol_later_eq(550) else \
|
||||
0x1C if context.protocol_later_eq(471) else \
|
||||
|
@ -8,7 +8,8 @@ from minecraft.networking.packets import Packet
|
||||
class FacePlayerPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x33 if context.protocol_later_eq(741) else \
|
||||
return 0x37 if context.protocol_later_eq(755) else \
|
||||
0x33 if context.protocol_later_eq(741) else \
|
||||
0x34 if context.protocol_later_eq(721) else \
|
||||
0x35 if context.protocol_later_eq(550) else \
|
||||
0x34 if context.protocol_later_eq(471) else \
|
||||
|
@ -58,7 +58,8 @@ class AbstractDimensionPacket(Packet):
|
||||
class JoinGamePacket(AbstractDimensionPacket):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x24 if context.protocol_later_eq(741) else \
|
||||
return 0x26 if context.protocol_later_eq(755) else \
|
||||
0x24 if context.protocol_later_eq(741) else \
|
||||
0x25 if context.protocol_later_eq(721) else \
|
||||
0x26 if context.protocol_later_eq(550) else \
|
||||
0x25 if context.protocol_later_eq(389) else \
|
||||
|
@ -8,7 +8,8 @@ from minecraft.networking.types import (
|
||||
class MapPacket(Packet):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x25 if context.protocol_later_eq(741) else \
|
||||
return 0x27 if context.protocol_later_eq(755) else \
|
||||
0x25 if context.protocol_later_eq(741) else \
|
||||
0x26 if context.protocol_later_eq(721) else \
|
||||
0x27 if context.protocol_later_eq(550) else \
|
||||
0x26 if context.protocol_later_eq(389) else \
|
||||
|
@ -1,3 +1,4 @@
|
||||
from minecraft.networking.types.basic import Boolean
|
||||
from minecraft.networking.packets import Packet
|
||||
|
||||
from minecraft.networking.types import (
|
||||
@ -9,7 +10,8 @@ from minecraft.networking.types import (
|
||||
class PlayerPositionAndLookPacket(Packet, BitFieldEnum):
|
||||
@staticmethod
|
||||
def get_id(context):
|
||||
return 0x34 if context.protocol_later_eq(741) else \
|
||||
return 0x38 if context.protocol_later_eq(755) else \
|
||||
0x34 if context.protocol_later_eq(741) else \
|
||||
0x35 if context.protocol_later_eq(721) else \
|
||||
0x36 if context.protocol_later_eq(550) else \
|
||||
0x35 if context.protocol_later_eq(471) else \
|
||||
@ -32,6 +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 {},
|
||||
])
|
||||
|
||||
# Access the 'x', 'y', 'z' fields as a Vector tuple.
|
||||
|
Loading…
Reference in New Issue
Block a user