Merge pull request #135 from jimchen5209/1.14.4

Upgrade to 1.14.4 (Same Packet Format)
This commit is contained in:
joo 2019-08-16 02:03:42 +02:00 committed by GitHub
commit 6f2f25656c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 13 deletions

View File

@ -29,7 +29,7 @@ pyCraft is compatible with the following Minecraft releases:
* 1.11, 1.11.1, 1.11.2
* 1.12, 1.12.1, 1.12.2
* 1.13, 1.13.1, 1.13.2
* 1.14, 1.14.1, 1.14.2, 1.14.3
* 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4
In addition, some development snapshots and pre-release versions are supported:
`<minecraft/__init__.py>`_ contains a full list of supported Minecraft versions

View File

@ -6,8 +6,11 @@ with a MineCraft server.
# The version number of the most recent pyCraft release.
__version__ = "0.6.0"
# A dict mapping the name of each Minecraft version supported by pyCraft to
# the corresponding protocol version number.
# A dict mapping the ID string of each Minecraft version supported by pyCraft
# to the corresponding protocol version number. The ID string of a version is
# the key used to identify it in
# <https://launchermeta.mojang.com/mc/game/version_manifest.json>, or the 'id'
# key in "version.json" in the corresponding ".jar" file distributed by Mojang.
SUPPORTED_MINECRAFT_VERSIONS = {
'1.8': 47,
'1.8.1': 47,
@ -181,14 +184,26 @@ SUPPORTED_MINECRAFT_VERSIONS = {
'1.14.2 Pre-Release 3': 483,
'1.14.2 Pre-Release 4': 484,
'1.14.2': 485,
'1.14.3-pre1': 486,
'1.14.3-pre2': 487,
'1.14.3-pre3': 488,
'1.14.3-pre4': 489,
'1.14.3': 490,
'1.14.4-pre1': 491,
'1.14.4-pre2': 492,
'1.14.4-pre3': 493,
'1.14.4-pre4': 494,
'1.14.4-pre5': 495,
'1.14.4-pre6': 496,
'1.14.4-pre7': 497,
'1.14.4': 498,
}
# Those Minecraft versions supported by pyCraft which are "release" versions,
# i.e. not development snapshots or pre-release versions.
RELEASE_MINECRAFT_VERSIONS = {
name: protocol for (name, protocol) in SUPPORTED_MINECRAFT_VERSIONS.items()
if __import__('re').match(r'\d+(\.\d+)+$', name)}
vid: protocol for (vid, protocol) in SUPPORTED_MINECRAFT_VERSIONS.items()
if __import__('re').match(r'\d+(\.\d+)+$', vid)}
# The protocol versions of SUPPORTED_MINECRAFT_VERSIONS, without duplicates,
# in ascending numerical (and hence chronological) order.

View File

@ -73,13 +73,13 @@ class Connection(object):
object. If None, no authentication is attempted and
the server is assumed to be running in offline mode.
:param username: Username string; only applicable in offline mode.
:param initial_version: A Minecraft version string or protocol version
number to use if the server's protocol version
cannot be determined. (Although it is now
somewhat inaccurate, this name is retained for
backward compatibility.)
:param initial_version: A Minecraft version ID string or protocol
version number to use if the server's protocol
version cannot be determined. (Although it is
now somewhat inaccurate, this name is retained
for backward compatibility.)
:param allowed_versions: A set of versions, each being a Minecraft
version string or protocol version number,
version ID string or protocol version number,
restricting the versions that the client may
use in connecting to the server.
:param handle_exception: The final exception handler. This is triggered

View File

@ -422,10 +422,10 @@ class _FakeServerTest(unittest.TestCase):
"""
server_version = VERSIONS[-1]
# The Minecraft version name that the server will support.
# The Minecraft version ID that the server will support.
client_versions = None
# The set of Minecraft version names or protocol version numbers that the
# The set of Minecraft version IDs or protocol version numbers that the
# client will support. If None, the client supports all possible versions.
server_type = FakeServer