Add support for Minecraft 1.13 and 1.13-pre3 to pre10 (protocols 385 to 393).

Add clientbound.login.PluginRequestPacket and serverbound.login.PluginResponsePacket.
This commit is contained in:
joo committed 2018-07-19 09:50:13 +01:00
1 parent 745aa054b0
commit adc8d15ddc
19 files changed
+258 -48

No files matched your search

+7
View File
@@ -3,17 +3,23 @@ try:
from unittest import mock
except ImportError:
import mock
from minecraft import SUPPORTED_PROTOCOL_VERSIONS
from minecraft.networking.connection import (
LoginReactor, PlayingReactor, ConnectionContext
)
from minecraft.networking.packets import clientbound
max_proto_ver = max(SUPPORTED_PROTOCOL_VERSIONS)
class LoginReactorTest(unittest.TestCase):
@mock.patch('minecraft.networking.connection.encryption')
def test_encryption_online_server(self, encrypt):
connection = mock.MagicMock()
connection.context = ConnectionContext(protocol_version=max_proto_ver)
reactor = LoginReactor(connection)
packet = clientbound.login.EncryptionRequestPacket()
@@ -37,6 +43,7 @@ class LoginReactorTest(unittest.TestCase):
@mock.patch('minecraft.networking.connection.encryption')
def test_encryption_offline_server(self, encrypt):
connection = mock.MagicMock()
connection.context = ConnectionContext(protocol_version=max_proto_ver)
reactor = LoginReactor(connection)
packet = clientbound.login.EncryptionRequestPacket()