mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2025-01-03 06:28:17 +01:00
support 1.12.2
This commit is contained in:
parent
9765e936c9
commit
61d9695226
@ -27,7 +27,7 @@ pyCraft is compatible with the following Minecraft releases:
|
|||||||
* 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
|
* 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4
|
||||||
* 1.10, 1.10.1, 1.10.2
|
* 1.10, 1.10.1, 1.10.2
|
||||||
* 1.11, 1.11.1, 1.11.2
|
* 1.11, 1.11.1, 1.11.2
|
||||||
* 1.12, 1.12.1
|
* 1.12, 1.12.1, 1.12.2
|
||||||
|
|
||||||
In addition, some development snapshots and pre-release versions are supported:
|
In addition, some development snapshots and pre-release versions are supported:
|
||||||
`<minecraft/__init__.py>`_ contains a full list of supported Minecraft versions
|
`<minecraft/__init__.py>`_ contains a full list of supported Minecraft versions
|
||||||
|
@ -64,6 +64,9 @@ SUPPORTED_MINECRAFT_VERSIONS = {
|
|||||||
'17w31a': 336,
|
'17w31a': 336,
|
||||||
'1.12.1-pre1': 337,
|
'1.12.1-pre1': 337,
|
||||||
'1.12.1': 338,
|
'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())
|
SUPPORTED_PROTOCOL_VERSIONS = sorted(SUPPORTED_MINECRAFT_VERSIONS.values())
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
from .packet import Packet
|
from .packet import Packet
|
||||||
|
|
||||||
from minecraft.networking.types import (
|
from minecraft.networking.types import (
|
||||||
VarInt
|
VarInt, Long
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class KeepAlivePacket(Packet):
|
class KeepAlivePacket(Packet):
|
||||||
packet_name = "keep alive"
|
packet_name = "keep alive"
|
||||||
definition = [
|
get_definition = staticmethod(lambda context: [
|
||||||
{'keep_alive_id': VarInt}]
|
{'keep_alive_id': Long} if context.protocol_version >= 339
|
||||||
|
else {'keep_alive_id': VarInt}
|
||||||
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user