Add support for Minecraft 18w43a to 1.14 (protocols 441 to 477)
This commit introduces two backward-incompatible changes which may break existing code: (1) `networking.packets.clientbound.play.SpawnObjectPacket.EntityType' is no longer accessible as an attribute of the the `SpawnObjectPacket' class: the values now depend on a `ConnectionContext`, and must be accessed through an instance, or using `SpawnObjectPacket.field_enum'. See the text of the `AttributeError` raised from the descriptor for `SpawnObjectPacket.EntityType` for the full details. (2) For some subclasses of `networking.types.Type', it is necessary to call the methods `read_with_context' and `send_with_context' instead of `read' and `send', supplying a `ConnectionContext' for those data types - currently only `Position` - whose layout depends on it.
This commit is contained in:
1 parent
9b43d6f004
commit
612fa8e324
20 files changed
+463
-219
No files matched your search
@@ -103,7 +103,7 @@ class FakeClientHandler(object):
|
||||
# Called upon entering the play state.
|
||||
self.write_packet(clientbound.play.JoinGamePacket(
|
||||
entity_id=0, game_mode=0, dimension=0, difficulty=2, max_players=1,
|
||||
level_type='default', reduced_debug_info=False))
|
||||
level_type='default', reduced_debug_info=False, render_distance=9))
|
||||
|
||||
def handle_play_packet(self, packet):
|
||||
# Called upon each packet received after handle_play_start() returns.
|
||||
|
||||
Reference in new issue
Block a user