Remove debugging print statement and make send static

This commit is contained in:
Zachy committed 2019-05-15 13:59:23 +01:00
1 parent 0fc8c3bbfe
commit 3c594a1386
3 files changed
+2 -3

No files matched your search

@@ -316,4 +316,4 @@ class EntityLookPacket(Packet):
{'yaw': Angle},
{'pitch': Angle},
{'on_ground': Boolean}
]
]
+1 -1
View File
@@ -124,6 +124,7 @@ class Angle(Type):
# Linearly transform angle in steps of 1/256 into steps of 1/360
return 360 * UnsignedByte.read(file_object) / 255
@staticmethod
def send(value, socket):
# Normalize angle between 0 and 255 and convert to int.
UnsignedByte.send(int(255 * (value / 360)), socket)
@@ -323,4 +324,3 @@ class Position(Type, Vector):
if context.protocol_version >= 443 else
(x & 0x3FFFFFF) << 38 | (y & 0xFFF) << 26 | (z & 0x3FFFFFF))
UnsignedLong.send(value, socket)