Begin 1.16.2 chunk conversion
This commit is contained in:
		@@ -11,12 +11,13 @@ from ....types import nbt
 | 
			
		||||
class ChunkDataPacket(Packet):
 | 
			
		||||
    @staticmethod
 | 
			
		||||
    def get_id(context):
 | 
			
		||||
        return 0x22 # FIXME
 | 
			
		||||
        return 0x20 # FIXME
 | 
			
		||||
 | 
			
		||||
    packet_name = 'chunk data'
 | 
			
		||||
    fields = 'x', 'bit_mask_y', 'z', 'full_chunk'
 | 
			
		||||
 | 
			
		||||
    def read(self, file_object):
 | 
			
		||||
        print('reading chunk')
 | 
			
		||||
        self.x = Integer.read(file_object)
 | 
			
		||||
        self.z = Integer.read(file_object)
 | 
			
		||||
        self.full_chunk = Boolean.read(file_object)
 | 
			
		||||
@@ -24,7 +25,8 @@ class ChunkDataPacket(Packet):
 | 
			
		||||
        self.heightmaps = Nbt.read(file_object)
 | 
			
		||||
        self.biomes = []
 | 
			
		||||
        if self.full_chunk:
 | 
			
		||||
            for i in range(1024):
 | 
			
		||||
            biomes_length = VarInt.read(file_object)
 | 
			
		||||
            for i in range(biomes_length):
 | 
			
		||||
                self.biomes.append(Integer.read(file_object))
 | 
			
		||||
        size = VarInt.read(file_object)
 | 
			
		||||
        self.data = file_object.read(size)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user