feedback: pass x, y, z as arguments since types classes are supposed to abstract away the python types and sending them over the network and calling an encode method before sending breaks that a little.

This commit is contained in:
TheSnoozer 2017-08-05 14:04:27 +02:00 committed by joo
parent 9ab2e1ae69
commit d8fc742862
1 changed files with 2 additions and 5 deletions

View File

@ -245,9 +245,6 @@ class Position(Type):
return {'x': x, 'y': y, 'z': z}
@staticmethod
def send(value, socket):
def send(x, y, z, socket):
value = ((x & 0x3FFFFFF) << 38) | ((y & 0xFFF) << 26) | (z & 0x3FFFFFF)
UnsignedLong.send(value, socket)
@staticmethod
def encode(x, y, z):
return ((x & 0x3FFFFFF) << 38) | ((y & 0xFFF) << 26) | (z & 0x3FFFFFF)