20 lines
457 B
Python
20 lines
457 B
Python
from .base import Packet
|
|
|
|
class Packet51MapChunk(Packet, packet_id=51):
|
|
__slots__ = ('x', 'y', 'z', 'xs', 'ys', 'zs', 'size', 'data')
|
|
FIELDS = [
|
|
('x', 'int'),
|
|
('y', 'short'),
|
|
('z', 'int'),
|
|
('xs', 'ubyte'),
|
|
('ys', 'ubyte'),
|
|
('zs', 'ubyte'),
|
|
('size', 'int'),
|
|
('data', ('bytes', 'size')),
|
|
]
|
|
|
|
def post_creation(self):
|
|
self.xs += 1
|
|
self.ys += 1
|
|
self.zs += 1
|