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 authored and joo committed 2017-08-09 16:33:41 +01:00
1 parent 9ab2e1ae69
commit d8fc742862
1 file changed
+2 -5
+2 -5
View File
@@ -245,9 +245,6 @@ class Position(Type):
return {'x': x, 'y': y, 'z': z} return {'x': x, 'y': y, 'z': z}
@staticmethod @staticmethod
def send(value, socket): def send(x, y, z, socket):
value = ((x & 0x3FFFFFF) << 38) | ((y & 0xFFF) << 26) | (z & 0x3FFFFFF)
UnsignedLong.send(value, socket) UnsignedLong.send(value, socket)
@staticmethod
def encode(x, y, z):
return ((x & 0x3FFFFFF) << 38) | ((y & 0xFFF) << 26) | (z & 0x3FFFFFF)