Handle player teleport packet
This commit is contained in:
		@@ -330,6 +330,23 @@ class SpawnLivingEntityPacket(Packet):
 | 
			
		||||
        {'velocity_z': Short},
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
class EntityTeleport(Packet):
 | 
			
		||||
    # Sent by the server when an entity moves more than 8 blocks
 | 
			
		||||
    # https://wiki.vg/Protocol#Entity_Teleport
 | 
			
		||||
 | 
			
		||||
    id = 0x56
 | 
			
		||||
    packet_name = 'entity teleport'
 | 
			
		||||
 | 
			
		||||
    definition = [
 | 
			
		||||
        {'entity_id': VarInt},
 | 
			
		||||
        {'x': Double},
 | 
			
		||||
        {'y': Double},
 | 
			
		||||
        {'z': Double},
 | 
			
		||||
        {'yaw': Angle},
 | 
			
		||||
        {'pitch': Angle},
 | 
			
		||||
        {'on_ground': Boolean},
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
class EntityPositionRotationPacket(Packet):
 | 
			
		||||
    # Sent by the server when an entity rotates and moves
 | 
			
		||||
    # https://wiki.vg/Protocol#Entity_Position_and_Rotation
 | 
			
		||||
@@ -374,19 +391,3 @@ class EntityActionPacket(Packet):
 | 
			
		||||
        {'action_id': VarInt},
 | 
			
		||||
        {'jump_boost': VarInt},
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
class SpawnPlayerPacket(Packet):
 | 
			
		||||
    # https://wiki.vg/Protocol#Spawn_Player
 | 
			
		||||
 | 
			
		||||
    id = 0x04
 | 
			
		||||
    packet_name = 'spawn player'
 | 
			
		||||
 | 
			
		||||
    definition = [
 | 
			
		||||
        {'entity_id': VarInt},
 | 
			
		||||
        {'player_uuid': UUID},
 | 
			
		||||
        {'x': Double},
 | 
			
		||||
        {'y': Double},
 | 
			
		||||
        {'z': Double},
 | 
			
		||||
        {'yaw': Angle},
 | 
			
		||||
        {'pitch': Angle},
 | 
			
		||||
    ]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user