Merge branch 'master' into testing
This commit is contained in:
commit
88a5fdc637
3 files changed
+9
-4
No files matched your search
@@ -64,6 +64,9 @@ SUPPORTED_MINECRAFT_VERSIONS = {
|
||||
'17w31a': 336,
|
||||
'1.12.1-pre1': 337,
|
||||
'1.12.1': 338,
|
||||
'1.12.2-pre1': 339,
|
||||
'1.12.2-pre2': 339,
|
||||
'1.12.2': 340,
|
||||
}
|
||||
|
||||
SUPPORTED_PROTOCOL_VERSIONS = sorted(SUPPORTED_MINECRAFT_VERSIONS.values())
|
||||
@@ -1,14 +1,16 @@
|
||||
from .packet import Packet
|
||||
|
||||
from minecraft.networking.types import (
|
||||
VarInt
|
||||
VarInt, Long
|
||||
)
|
||||
|
||||
|
||||
class AbstractKeepAlivePacket(Packet):
|
||||
packet_name = "keep alive"
|
||||
definition = [
|
||||
{'keep_alive_id': VarInt}]
|
||||
get_definition = staticmethod(lambda context: [
|
||||
{'keep_alive_id': Long} if context.protocol_version >= 339
|
||||
else {'keep_alive_id': VarInt}
|
||||
])
|
||||
|
||||
|
||||
# This alias is retained for backward compatibility:
|
||||
|
||||
Reference in new issue
Block a user