Add pre-release versions between 1.14.4 and 1.15.1; update test config

This commit is contained in:
joo committed 2020-01-08 16:15:42 +01:00
1 parent 51c618aeb5
commit b38adc1aa1
13 files changed
+67 -39

No files matched your search

+10 -8
View File
@@ -1,25 +1,27 @@
language: python language: python
python: 3.5 python: 3.8
matrix: matrix:
include: include:
- python: 2.7 - python: 2.7
env: TOX_ENV=py27 env: TOX_ENV=py27
- python: 3.4
env: TOX_ENV=py34
- python: pypy - python: pypy
env: TOX_ENV=pypy env: TOX_ENV=pypy
- python: 3.5 - python: 3.5
env: TOX_ENV=py35 env: TOX_ENV=py35
- python: 3.6 - python: 3.6
env: TOX_ENV=py36 env: TOX_ENV=py36
- python: 3.6 - python: 3.7
env: TOX_ENV=py37
- python: 3.8
env: TOX_ENV=py38
- python: 3.8
env: TOX_ENV=flake8 env: TOX_ENV=flake8
- python: 3.6 - python: 3.8
env: TOX_ENV=pylint-errors env: TOX_ENV=pylint-errors
- python: 3.6 - python: 3.8
env: TOX_ENV=pylint-full env: TOX_ENV=pylint-full
- python: 3.6 - python: 3.8
env: TOX_ENV=verify-manifest env: TOX_ENV=verify-manifest
install: install:
@@ -28,6 +30,6 @@ install:
script: script:
- tox -e $TOX_ENV - tox -e $TOX_ENV
after_script: after_script:
- if [ "$TOX_ENV" = "py36" ]; then tox -e coveralls; fi - if [ "$TOX_ENV" = "py38" ]; then tox -e coveralls; fi
notifications: notifications:
email: false email: false
+3 -1
View File
@@ -30,6 +30,7 @@ pyCraft is compatible with the following Minecraft releases:
* 1.12, 1.12.1, 1.12.2 * 1.12, 1.12.1, 1.12.2
* 1.13, 1.13.1, 1.13.2 * 1.13, 1.13.1, 1.13.2
* 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4 * 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4
* 1.15, 1.15.1
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
@@ -50,9 +51,10 @@ Supported Python versions
pyCraft is compatible with (at least) the following Python implementations: pyCraft is compatible with (at least) the following Python implementations:
* Python 2.7 * Python 2.7
* Python 3.4
* Python 3.5 * Python 3.5
* Python 3.6 * Python 3.6
* Python 3.7
* Python 3.8
* PyPy * PyPy
Requirements Requirements
+23
View File
@@ -197,7 +197,30 @@ SUPPORTED_MINECRAFT_VERSIONS = {
'1.14.4-pre6': 496, '1.14.4-pre6': 496,
'1.14.4-pre7': 497, '1.14.4-pre7': 497,
'1.14.4': 498, '1.14.4': 498,
'19w34a': 550,
'19w35a': 551,
'19w36a': 552,
'19w37a': 553,
'19w38a': 554,
'19w38b': 555,
'19w39a': 556,
'19w40a': 557,
'19w41a': 558,
'19w42a': 559,
'19w44a': 560,
'19w45a': 561,
'19w45b': 562,
'19w46a': 563,
'19w46b': 564,
'1.15-pre1': 565,
'1.15-pre2': 566,
'1.15-pre3': 567,
'1.15-pre4': 569,
'1.15-pre5': 570,
'1.15-pre6': 571,
'1.15-pre7': 572,
'1.15': 573, '1.15': 573,
'1.15.1-pre1': 574,
'1.15.1': 575, '1.15.1': 575,
} }
@@ -62,7 +62,7 @@ def get_packets(context):
class KeepAlivePacket(AbstractKeepAlivePacket): class KeepAlivePacket(AbstractKeepAlivePacket):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x21 if context.protocol_version >= 573 else \ return 0x21 if context.protocol_version >= 550 else \
0x20 if context.protocol_version >= 471 else \ 0x20 if context.protocol_version >= 471 else \
0x21 if context.protocol_version >= 389 else \ 0x21 if context.protocol_version >= 389 else \
0x20 if context.protocol_version >= 345 else \ 0x20 if context.protocol_version >= 345 else \
@@ -75,7 +75,7 @@ class KeepAlivePacket(AbstractKeepAlivePacket):
class JoinGamePacket(Packet): class JoinGamePacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x26 if context.protocol_version >= 573 else \ return 0x26 if context.protocol_version >= 550 else \
0x25 if context.protocol_version >= 389 else \ 0x25 if context.protocol_version >= 389 else \
0x24 if context.protocol_version >= 345 else \ 0x24 if context.protocol_version >= 345 else \
0x23 if context.protocol_version >= 332 else \ 0x23 if context.protocol_version >= 332 else \
@@ -88,13 +88,13 @@ class JoinGamePacket(Packet):
{'entity_id': Integer}, {'entity_id': Integer},
{'game_mode': UnsignedByte}, {'game_mode': UnsignedByte},
{'dimension': Integer if context.protocol_version >= 108 else Byte}, {'dimension': Integer if context.protocol_version >= 108 else Byte},
{'hashed_seed': Long} if context.protocol_version >= 573 else {}, {'hashed_seed': Long} if context.protocol_version >= 552 else {},
{'difficulty': UnsignedByte} if context.protocol_version < 464 else {}, {'difficulty': UnsignedByte} if context.protocol_version < 464 else {},
{'max_players': UnsignedByte}, {'max_players': UnsignedByte},
{'level_type': String}, {'level_type': String},
{'render_distance': VarInt} if context.protocol_version >= 468 else {}, {'render_distance': VarInt} if context.protocol_version >= 468 else {},
{'reduced_debug_info': Boolean}, {'reduced_debug_info': Boolean},
{'respawn_screen': Boolean} if context.protocol_version >= 573 else {}, {'respawn_screen': Boolean} if context.protocol_version >= 571 else {},
]) ])
# These aliases declare the Enum type corresponding to each field: # These aliases declare the Enum type corresponding to each field:
@@ -106,7 +106,7 @@ class JoinGamePacket(Packet):
class ServerDifficultyPacket(Packet): class ServerDifficultyPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x0E if context.protocol_version >= 573 else \ return 0x0E if context.protocol_version >= 550 else \
0x0D if context.protocol_version >= 332 else \ 0x0D if context.protocol_version >= 332 else \
0x0E if context.protocol_version >= 318 else \ 0x0E if context.protocol_version >= 318 else \
0x0D if context.protocol_version >= 70 else \ 0x0D if context.protocol_version >= 70 else \
@@ -125,7 +125,7 @@ class ServerDifficultyPacket(Packet):
class ChatMessagePacket(Packet): class ChatMessagePacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x0F if context.protocol_version >= 573 else \ return 0x0F if context.protocol_version >= 550 else \
0x0E if context.protocol_version >= 343 else \ 0x0E if context.protocol_version >= 343 else \
0x0F if context.protocol_version >= 332 else \ 0x0F if context.protocol_version >= 332 else \
0x10 if context.protocol_version >= 317 else \ 0x10 if context.protocol_version >= 317 else \
@@ -146,7 +146,7 @@ class ChatMessagePacket(Packet):
class DisconnectPacket(Packet): class DisconnectPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x1B if context.protocol_version >= 573 else \ return 0x1B if context.protocol_version >= 550 else \
0x1A if context.protocol_version >= 471 else \ 0x1A if context.protocol_version >= 471 else \
0x1B if context.protocol_version >= 345 else \ 0x1B if context.protocol_version >= 345 else \
0x1A if context.protocol_version >= 332 else \ 0x1A if context.protocol_version >= 332 else \
@@ -187,7 +187,7 @@ class SpawnPlayerPacket(Packet):
{'yaw': Angle}, {'yaw': Angle},
{'pitch': Angle}, {'pitch': Angle},
{'current_item': Short} if context.protocol_version <= 49 else {}, {'current_item': Short} if context.protocol_version <= 49 else {},
# TODO: read entity metadata # TODO: read entity metadata (protocol < 550)
]) ])
# Access the 'x', 'y', 'z' fields as a Vector tuple. # Access the 'x', 'y', 'z' fields as a Vector tuple.
@@ -206,7 +206,7 @@ class SpawnPlayerPacket(Packet):
class EntityVelocityPacket(Packet): class EntityVelocityPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x46 if context.protocol_version >= 573 else \ return 0x46 if context.protocol_version >= 550 else \
0x45 if context.protocol_version >= 471 else \ 0x45 if context.protocol_version >= 471 else \
0x41 if context.protocol_version >= 461 else \ 0x41 if context.protocol_version >= 461 else \
0x42 if context.protocol_version >= 451 else \ 0x42 if context.protocol_version >= 451 else \
@@ -232,7 +232,7 @@ class EntityVelocityPacket(Packet):
class UpdateHealthPacket(Packet): class UpdateHealthPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x49 if context.protocol_version >= 573 else \ return 0x49 if context.protocol_version >= 550 else \
0x48 if context.protocol_version >= 471 else \ 0x48 if context.protocol_version >= 471 else \
0x44 if context.protocol_version >= 461 else \ 0x44 if context.protocol_version >= 461 else \
0x45 if context.protocol_version >= 451 else \ 0x45 if context.protocol_version >= 451 else \
@@ -257,7 +257,7 @@ class UpdateHealthPacket(Packet):
class RespawnPacket(Packet): class RespawnPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x3B if context.protocol_version >= 573 else \ return 0x3B if context.protocol_version >= 550 else \
0x3A if context.protocol_version >= 471 else \ 0x3A if context.protocol_version >= 471 else \
0x38 if context.protocol_version >= 461 else \ 0x38 if context.protocol_version >= 461 else \
0x39 if context.protocol_version >= 451 else \ 0x39 if context.protocol_version >= 451 else \
@@ -274,6 +274,7 @@ class RespawnPacket(Packet):
get_definition = staticmethod(lambda context: [ get_definition = staticmethod(lambda context: [
{'dimension': Integer}, {'dimension': Integer},
{'difficulty': UnsignedByte} if context.protocol_version < 464 else {}, {'difficulty': UnsignedByte} if context.protocol_version < 464 else {},
{'hashed_seed': Long} if context.protocol_version >= 552 else {},
{'game_mode': UnsignedByte}, {'game_mode': UnsignedByte},
{'level_type': String}, {'level_type': String},
]) ])
@@ -287,7 +288,7 @@ class RespawnPacket(Packet):
class PluginMessagePacket(AbstractPluginMessagePacket): class PluginMessagePacket(AbstractPluginMessagePacket):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x19 if context.protocol_version >= 573 else \ return 0x19 if context.protocol_version >= 550 else \
0x18 if context.protocol_version >= 471 else \ 0x18 if context.protocol_version >= 471 else \
0x19 if context.protocol_version >= 345 else \ 0x19 if context.protocol_version >= 345 else \
0x18 if context.protocol_version >= 332 else \ 0x18 if context.protocol_version >= 332 else \
@@ -299,7 +300,7 @@ class PluginMessagePacket(AbstractPluginMessagePacket):
class PlayerListHeaderAndFooterPacket(Packet): class PlayerListHeaderAndFooterPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x54 if context.protocol_version >= 573 else \ return 0x54 if context.protocol_version >= 550 else \
0x53 if context.protocol_version >= 471 else \ 0x53 if context.protocol_version >= 471 else \
0x5F if context.protocol_version >= 461 else \ 0x5F if context.protocol_version >= 461 else \
0x50 if context.protocol_version >= 451 else \ 0x50 if context.protocol_version >= 451 else \
@@ -320,7 +321,7 @@ class PlayerListHeaderAndFooterPacket(Packet):
class EntityLookPacket(Packet): class EntityLookPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x2B if context.protocol_version >= 573 else \ return 0x2B if context.protocol_version >= 550 else \
0x2A if context.protocol_version >= 389 else \ 0x2A if context.protocol_version >= 389 else \
0x29 if context.protocol_version >= 345 else \ 0x29 if context.protocol_version >= 345 else \
0x28 if context.protocol_version >= 318 else \ 0x28 if context.protocol_version >= 318 else \
@@ -8,7 +8,7 @@ from minecraft.networking.types import (
class BlockChangePacket(Packet): class BlockChangePacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x0C if context.protocol_version >= 573 else \ return 0x0C if context.protocol_version >= 550 else \
0x0B if context.protocol_version >= 332 else \ 0x0B if context.protocol_version >= 332 else \
0x0C if context.protocol_version >= 318 else \ 0x0C if context.protocol_version >= 318 else \
0x0B if context.protocol_version >= 67 else \ 0x0B if context.protocol_version >= 67 else \
@@ -46,7 +46,7 @@ class BlockChangePacket(Packet):
class MultiBlockChangePacket(Packet): class MultiBlockChangePacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x10 if context.protocol_version >= 573 else \ return 0x10 if context.protocol_version >= 550 else \
0x0F if context.protocol_version >= 343 else \ 0x0F if context.protocol_version >= 343 else \
0x10 if context.protocol_version >= 332 else \ 0x10 if context.protocol_version >= 332 else \
0x11 if context.protocol_version >= 318 else \ 0x11 if context.protocol_version >= 318 else \
@@ -8,7 +8,7 @@ from minecraft.networking.types import (
class CombatEventPacket(Packet): class CombatEventPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x33 if context.protocol_version >= 573 else \ return 0x33 if context.protocol_version >= 550 else \
0x32 if context.protocol_version >= 471 else \ 0x32 if context.protocol_version >= 471 else \
0x30 if context.protocol_version >= 451 else \ 0x30 if context.protocol_version >= 451 else \
0x2F if context.protocol_version >= 389 else \ 0x2F if context.protocol_version >= 389 else \
@@ -7,7 +7,7 @@ from minecraft.networking.packets import Packet
class ExplosionPacket(Packet): class ExplosionPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x1D if context.protocol_version >= 573 else \ return 0x1D if context.protocol_version >= 550 else \
0x1C if context.protocol_version >= 471 else \ 0x1C if context.protocol_version >= 471 else \
0x1E if context.protocol_version >= 389 else \ 0x1E if context.protocol_version >= 389 else \
0x1D if context.protocol_version >= 345 else \ 0x1D if context.protocol_version >= 345 else \
@@ -8,7 +8,7 @@ from minecraft.networking.packets import Packet
class FacePlayerPacket(Packet): class FacePlayerPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x35 if context.protocol_version >= 573 else \ return 0x35 if context.protocol_version >= 550 else \
0x34 if context.protocol_version >= 471 else \ 0x34 if context.protocol_version >= 471 else \
0x32 if context.protocol_version >= 451 else \ 0x32 if context.protocol_version >= 451 else \
0x31 if context.protocol_version >= 389 else \ 0x31 if context.protocol_version >= 389 else \
@@ -8,7 +8,7 @@ from minecraft.networking.types import (
class MapPacket(Packet): class MapPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x27 if context.protocol_version >= 573 else \ return 0x27 if context.protocol_version >= 550 else \
0x26 if context.protocol_version >= 389 else \ 0x26 if context.protocol_version >= 389 else \
0x25 if context.protocol_version >= 345 else \ 0x25 if context.protocol_version >= 345 else \
0x24 if context.protocol_version >= 334 else \ 0x24 if context.protocol_version >= 334 else \
@@ -9,7 +9,7 @@ from minecraft.networking.types import (
class PlayerListItemPacket(Packet): class PlayerListItemPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x34 if context.protocol_version >= 573 else \ return 0x34 if context.protocol_version >= 550 else \
0x33 if context.protocol_version >= 471 else \ 0x33 if context.protocol_version >= 471 else \
0x31 if context.protocol_version >= 451 else \ 0x31 if context.protocol_version >= 451 else \
0x30 if context.protocol_version >= 389 else \ 0x30 if context.protocol_version >= 389 else \
@@ -9,7 +9,7 @@ from minecraft.networking.types import (
class PlayerPositionAndLookPacket(Packet, BitFieldEnum): class PlayerPositionAndLookPacket(Packet, BitFieldEnum):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x36 if context.protocol_version >= 573 else \ return 0x36 if context.protocol_version >= 550 else \
0x35 if context.protocol_version >= 471 else \ 0x35 if context.protocol_version >= 471 else \
0x33 if context.protocol_version >= 451 else \ 0x33 if context.protocol_version >= 451 else \
0x32 if context.protocol_version >= 389 else \ 0x32 if context.protocol_version >= 389 else \
@@ -9,7 +9,7 @@ __all__ = 'SoundEffectPacket',
class SoundEffectPacket(Packet): class SoundEffectPacket(Packet):
@staticmethod @staticmethod
def get_id(context): def get_id(context):
return 0x52 if context.protocol_version >= 573 else \ return 0x52 if context.protocol_version >= 550 else \
0x51 if context.protocol_version >= 471 else \ 0x51 if context.protocol_version >= 471 else \
0x4D if context.protocol_version >= 461 else \ 0x4D if context.protocol_version >= 461 else \
0x4E if context.protocol_version >= 451 else \ 0x4E if context.protocol_version >= 451 else \
+7 -7
View File
@@ -4,7 +4,7 @@
# and then run "tox" from this directory. # and then run "tox" from this directory.
[tox] [tox]
envlist = py27, py34, py35, py36, pypy, flake8, pylint-errors, pylint-full, verify-manifest envlist = py27, py35, py36, py37, py38, pypy, flake8, pylint-errors, pylint-full, verify-manifest
[testenv] [testenv]
commands = nosetests --with-timer commands = nosetests --with-timer
@@ -32,7 +32,7 @@ deps =
{[testenv]deps} {[testenv]deps}
mock mock
[testenv:py36] [testenv:py38]
setenv = setenv =
PYCRAFT_RUN_INTERNET_TESTS=1 PYCRAFT_RUN_INTERNET_TESTS=1
commands = commands =
@@ -46,7 +46,7 @@ deps =
mock mock
[testenv:flake8] [testenv:flake8]
basepython = python3.6 basepython = python3.8
commands = commands =
flake8 minecraft tests setup.py start.py bin/generate_travis_yml.py flake8 minecraft tests setup.py start.py bin/generate_travis_yml.py
deps = deps =
@@ -58,14 +58,14 @@ per-file-ignores =
*/clientbound/play/spawn_object_packet.py:E221,E222,E271,E272 */clientbound/play/spawn_object_packet.py:E221,E222,E271,E272
[testenv:pylint-errors] [testenv:pylint-errors]
basepython = python3.6 basepython = python3.8
deps = deps =
{[testenv]deps} {[testenv]deps}
pylint pylint
commands = pylint minecraft -E commands = pylint minecraft -E
[testenv:pylint-full] [testenv:pylint-full]
basepython = python3.6 basepython = python3.8
deps = deps =
{[testenv]deps} {[testenv]deps}
pylint pylint
@@ -73,7 +73,7 @@ commands =
- pylint minecraft --disable=E - pylint minecraft --disable=E
[testenv:docs] [testenv:docs]
basepython = python3.6 basepython = python3.8
deps = deps =
{[testenv:cover]deps} {[testenv:cover]deps}
sphinx sphinx
@@ -82,7 +82,7 @@ commands =
{toxinidir}/bin/build_docs {toxinidir}/bin/build_docs
[testenv:verify-manifest] [testenv:verify-manifest]
basepython = python3.6 basepython = python3.8
deps = deps =
check-manifest check-manifest
commands = commands =