Add job for farming trees and object physics
This commit is contained in:
		@@ -334,9 +334,9 @@ class SpawnLivingEntityPacket(Packet):
 | 
			
		||||
        {'yaw': Angle},
 | 
			
		||||
        {'pitch': Angle},
 | 
			
		||||
        {'head_pitch': Angle},
 | 
			
		||||
        {'x_velocity': Short},
 | 
			
		||||
        {'y_velocity': Short},
 | 
			
		||||
        {'z_velocity': Short},
 | 
			
		||||
        {'velocity_x': Short},
 | 
			
		||||
        {'velocity_y': Short},
 | 
			
		||||
        {'velocity_z': Short},
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
class EntityPositionPacket(Packet):
 | 
			
		||||
@@ -370,3 +370,32 @@ class EntityPositionRotationPacket(Packet):
 | 
			
		||||
        {'pitch': Angle},
 | 
			
		||||
        {'on_ground': Boolean},
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
class DestroyEntitiesPacket(Packet):
 | 
			
		||||
    # Sent by the server when a list of entities is to be destroyed on the client
 | 
			
		||||
    # https://wiki.vg/Protocol#Destroy_Entities
 | 
			
		||||
 | 
			
		||||
    id = 0x36
 | 
			
		||||
    packet_name = 'destroy entities'
 | 
			
		||||
    fields = 'count', 'entity_ids'
 | 
			
		||||
 | 
			
		||||
    def read(self, file_object):
 | 
			
		||||
        self.count = VarInt.read(file_object)
 | 
			
		||||
        self.entity_ids = []
 | 
			
		||||
        for _ in range(self.count):
 | 
			
		||||
            eid = VarInt.read(file_object)
 | 
			
		||||
            self.entity_ids.append(eid)
 | 
			
		||||
 | 
			
		||||
class EntityVelocityPacket(Packet):
 | 
			
		||||
    # Sent to update entity's velocity
 | 
			
		||||
    # https://wiki.vg/Protocol#Entity_Velocity
 | 
			
		||||
 | 
			
		||||
    id = 0x46
 | 
			
		||||
    packet_name = 'entity velocity'
 | 
			
		||||
 | 
			
		||||
    definition = [
 | 
			
		||||
        {'entity_id': VarInt},
 | 
			
		||||
        {'velocity_x': Short},
 | 
			
		||||
        {'velocity_y': Short},
 | 
			
		||||
        {'velocity_z': Short},
 | 
			
		||||
    ]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user