From c64f527ec744b42eac1e6ada70ddb985c3be775a Mon Sep 17 00:00:00 2001 From: alemidev Date: Wed, 19 Jan 2022 01:20:16 +0100 Subject: [PATCH] made Union consistent (sorted) --- .../packet_legacy_server_list_ping.py | 1 + .../serverbound/packet_set_protocol.py | 1 + .../login/clientbound/packet_compress.py | 1 + .../login/clientbound/packet_disconnect.py | 1 + .../clientbound/packet_encryption_begin.py | 1 + .../packet_login_plugin_request.py | 1 + .../proto/login/clientbound/packet_success.py | 1 + .../serverbound/packet_encryption_begin.py | 1 + .../packet_login_plugin_response.py | 1 + .../login/serverbound/packet_login_start.py | 1 + .../play/clientbound/packet_abilities.py | 1 + .../packet_acknowledge_player_digging.py | 1 + .../play/clientbound/packet_action_bar.py | 1 + .../packet_advancement_progress.py | 1 + .../play/clientbound/packet_advancements.py | 1 + .../play/clientbound/packet_animation.py | 1 + .../play/clientbound/packet_attach_entity.py | 1 + .../mc/proto/play/clientbound/packet_bed.py | 1 + .../play/clientbound/packet_block_action.py | 1 + .../packet_block_break_animation.py | 1 + .../play/clientbound/packet_block_change.py | 1 + .../proto/play/clientbound/packet_boss_bar.py | 17 +++++---- .../proto/play/clientbound/packet_camera.py | 1 + .../mc/proto/play/clientbound/packet_chat.py | 1 + .../play/clientbound/packet_clear_titles.py | 1 + .../play/clientbound/packet_close_window.py | 1 + .../proto/play/clientbound/packet_collect.py | 1 + .../play/clientbound/packet_combat_event.py | 17 +++++---- .../clientbound/packet_craft_progress_bar.py | 1 + .../packet_craft_recipe_response.py | 1 + .../play/clientbound/packet_custom_payload.py | 1 + .../clientbound/packet_death_combat_event.py | 1 + .../clientbound/packet_declare_commands.py | 1 + .../clientbound/packet_declare_recipes.py | 1 + .../play/clientbound/packet_destroy_entity.py | 1 + .../play/clientbound/packet_difficulty.py | 1 + .../clientbound/packet_end_combat_event.py | 1 + .../clientbound/packet_enter_combat_event.py | 1 + .../proto/play/clientbound/packet_entity.py | 1 + .../play/clientbound/packet_entity_destroy.py | 1 + .../play/clientbound/packet_entity_effect.py | 5 ++- .../clientbound/packet_entity_equipment.py | 1 + .../packet_entity_head_rotation.py | 1 + .../play/clientbound/packet_entity_look.py | 1 + .../clientbound/packet_entity_metadata.py | 1 + .../clientbound/packet_entity_move_look.py | 1 + .../clientbound/packet_entity_sound_effect.py | 1 + .../play/clientbound/packet_entity_status.py | 1 + .../clientbound/packet_entity_teleport.py | 13 ++++--- .../packet_entity_update_attributes.py | 1 + .../clientbound/packet_entity_velocity.py | 1 + .../play/clientbound/packet_experience.py | 1 + .../play/clientbound/packet_explosion.py | 1 + .../play/clientbound/packet_face_player.py | 9 +++-- .../clientbound/packet_game_state_change.py | 1 + .../play/clientbound/packet_held_item_slot.py | 1 + .../packet_initialize_world_border.py | 1 + .../play/clientbound/packet_keep_alive.py | 1 + .../clientbound/packet_kick_disconnect.py | 1 + .../mc/proto/play/clientbound/packet_login.py | 5 ++- .../mc/proto/play/clientbound/packet_map.py | 13 ++++--- .../play/clientbound/packet_map_chunk.py | 5 ++- .../play/clientbound/packet_map_chunk_bulk.py | 1 + .../clientbound/packet_multi_block_change.py | 1 + .../clientbound/packet_named_entity_spawn.py | 13 ++++--- .../clientbound/packet_named_sound_effect.py | 5 ++- .../clientbound/packet_nbt_query_response.py | 1 + .../play/clientbound/packet_open_book.py | 1 + .../clientbound/packet_open_horse_window.py | 1 + .../clientbound/packet_open_sign_entity.py | 1 + .../play/clientbound/packet_open_window.py | 5 ++- .../mc/proto/play/clientbound/packet_ping.py | 1 + .../play/clientbound/packet_player_info.py | 1 + .../clientbound/packet_playerlist_header.py | 1 + .../proto/play/clientbound/packet_position.py | 1 + .../clientbound/packet_rel_entity_move.py | 1 + .../packet_remove_entity_effect.py | 1 + .../clientbound/packet_resource_pack_send.py | 1 + .../proto/play/clientbound/packet_respawn.py | 5 ++- .../packet_scoreboard_display_objective.py | 1 + .../packet_scoreboard_objective.py | 9 +++-- .../clientbound/packet_scoreboard_score.py | 5 ++- .../clientbound/packet_scoreboard_team.py | 33 +++++++++-------- .../packet_sculk_vibration_signal.py | 5 ++- .../packet_select_advancement_tab.py | 1 + .../clientbound/packet_set_compression.py | 1 + .../play/clientbound/packet_set_cooldown.py | 1 + .../play/clientbound/packet_set_passengers.py | 1 + .../proto/play/clientbound/packet_set_slot.py | 1 + .../clientbound/packet_set_title_subtitle.py | 1 + .../play/clientbound/packet_set_title_text.py | 1 + .../play/clientbound/packet_set_title_time.py | 1 + .../clientbound/packet_simulation_distance.py | 1 + .../play/clientbound/packet_sound_effect.py | 5 ++- .../play/clientbound/packet_spawn_entity.py | 17 +++++---- .../packet_spawn_entity_experience_orb.py | 13 ++++--- .../clientbound/packet_spawn_entity_living.py | 13 ++++--- .../packet_spawn_entity_painting.py | 1 + .../packet_spawn_entity_weather.py | 13 ++++--- .../play/clientbound/packet_spawn_position.py | 1 + .../play/clientbound/packet_statistics.py | 1 + .../play/clientbound/packet_stop_sound.py | 9 +++-- .../play/clientbound/packet_tab_complete.py | 1 + .../mc/proto/play/clientbound/packet_tags.py | 1 + .../mc/proto/play/clientbound/packet_teams.py | 37 ++++++++++--------- .../clientbound/packet_tile_entity_data.py | 1 + .../mc/proto/play/clientbound/packet_title.py | 17 +++++---- .../play/clientbound/packet_trade_list.py | 1 + .../play/clientbound/packet_transaction.py | 1 + .../play/clientbound/packet_unload_chunk.py | 1 + .../play/clientbound/packet_unlock_recipes.py | 5 ++- .../clientbound/packet_update_attributes.py | 1 + .../clientbound/packet_update_entity_nbt.py | 1 + .../play/clientbound/packet_update_health.py | 1 + .../play/clientbound/packet_update_light.py | 1 + .../play/clientbound/packet_update_sign.py | 1 + .../play/clientbound/packet_update_time.py | 1 + .../packet_update_view_distance.py | 1 + .../packet_update_view_position.py | 1 + .../play/clientbound/packet_vehicle_move.py | 1 + .../play/clientbound/packet_window_items.py | 1 + .../play/clientbound/packet_world_border.py | 17 +++++---- .../clientbound/packet_world_border_center.py | 1 + .../packet_world_border_lerp_size.py | 1 + .../clientbound/packet_world_border_size.py | 1 + .../packet_world_border_warning_delay.py | 1 + .../packet_world_border_warning_reach.py | 1 + .../play/clientbound/packet_world_event.py | 1 + .../clientbound/packet_world_particles.py | 5 ++- .../play/serverbound/packet_abilities.py | 1 + .../serverbound/packet_advancement_tab.py | 5 ++- .../play/serverbound/packet_arm_animation.py | 1 + .../play/serverbound/packet_block_dig.py | 1 + .../play/serverbound/packet_block_place.py | 13 ++++--- .../mc/proto/play/serverbound/packet_chat.py | 1 + .../play/serverbound/packet_client_command.py | 1 + .../play/serverbound/packet_close_window.py | 1 + .../packet_craft_recipe_request.py | 1 + .../serverbound/packet_crafting_book_data.py | 1 + .../play/serverbound/packet_custom_payload.py | 1 + .../serverbound/packet_displayed_recipe.py | 1 + .../play/serverbound/packet_edit_book.py | 1 + .../play/serverbound/packet_enchant_item.py | 1 + .../play/serverbound/packet_entity_action.py | 1 + .../proto/play/serverbound/packet_flying.py | 1 + .../serverbound/packet_generate_structure.py | 1 + .../play/serverbound/packet_held_item_slot.py | 1 + .../play/serverbound/packet_keep_alive.py | 1 + .../serverbound/packet_lock_difficulty.py | 1 + .../mc/proto/play/serverbound/packet_look.py | 1 + .../play/serverbound/packet_name_item.py | 1 + .../play/serverbound/packet_pick_item.py | 1 + .../mc/proto/play/serverbound/packet_pong.py | 1 + .../proto/play/serverbound/packet_position.py | 1 + .../play/serverbound/packet_position_look.py | 1 + .../packet_prepare_crafting_grid.py | 1 + .../serverbound/packet_query_block_nbt.py | 1 + .../serverbound/packet_query_entity_nbt.py | 1 + .../play/serverbound/packet_recipe_book.py | 1 + .../packet_resource_pack_receive.py | 1 + .../play/serverbound/packet_select_trade.py | 1 + .../serverbound/packet_set_beacon_effect.py | 1 + .../serverbound/packet_set_creative_slot.py | 1 + .../play/serverbound/packet_set_difficulty.py | 1 + .../proto/play/serverbound/packet_settings.py | 1 + .../proto/play/serverbound/packet_spectate.py | 1 + .../play/serverbound/packet_steer_boat.py | 1 + .../play/serverbound/packet_steer_vehicle.py | 1 + .../play/serverbound/packet_tab_complete.py | 1 + .../serverbound/packet_teleport_confirm.py | 1 + .../play/serverbound/packet_transaction.py | 1 + .../packet_update_command_block.py | 1 + .../packet_update_command_block_minecart.py | 1 + .../serverbound/packet_update_jigsaw_block.py | 1 + .../play/serverbound/packet_update_sign.py | 1 + .../packet_update_structure_block.py | 1 + .../play/serverbound/packet_use_entity.py | 5 ++- .../proto/play/serverbound/packet_use_item.py | 1 + .../play/serverbound/packet_vehicle_move.py | 1 + .../play/serverbound/packet_window_click.py | 1 + .../proto/status/clientbound/packet_ping.py | 1 + .../status/clientbound/packet_server_info.py | 1 + .../proto/status/serverbound/packet_ping.py | 1 + .../status/serverbound/packet_ping_start.py | 1 + compiler/proto.py | 5 ++- 185 files changed, 341 insertions(+), 156 deletions(-) diff --git a/aiocraft/mc/proto/handshaking/serverbound/packet_legacy_server_list_ping.py b/aiocraft/mc/proto/handshaking/serverbound/packet_legacy_server_list_ping.py index e18f14b..5040982 100644 --- a/aiocraft/mc/proto/handshaking/serverbound/packet_legacy_server_list_ping.py +++ b/aiocraft/mc/proto/handshaking/serverbound/packet_legacy_server_list_ping.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketLegacyServerListPing(Packet): diff --git a/aiocraft/mc/proto/handshaking/serverbound/packet_set_protocol.py b/aiocraft/mc/proto/handshaking/serverbound/packet_set_protocol.py index dcf365d..bf3d3a6 100644 --- a/aiocraft/mc/proto/handshaking/serverbound/packet_set_protocol.py +++ b/aiocraft/mc/proto/handshaking/serverbound/packet_set_protocol.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetProtocol(Packet): diff --git a/aiocraft/mc/proto/login/clientbound/packet_compress.py b/aiocraft/mc/proto/login/clientbound/packet_compress.py index d1e669d..ae5a5be 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_compress.py +++ b/aiocraft/mc/proto/login/clientbound/packet_compress.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCompress(Packet): diff --git a/aiocraft/mc/proto/login/clientbound/packet_disconnect.py b/aiocraft/mc/proto/login/clientbound/packet_disconnect.py index 45ca3ec..a658816 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_disconnect.py +++ b/aiocraft/mc/proto/login/clientbound/packet_disconnect.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketDisconnect(Packet): diff --git a/aiocraft/mc/proto/login/clientbound/packet_encryption_begin.py b/aiocraft/mc/proto/login/clientbound/packet_encryption_begin.py index bcb1cbe..15ee2bf 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_encryption_begin.py +++ b/aiocraft/mc/proto/login/clientbound/packet_encryption_begin.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEncryptionBegin(Packet): diff --git a/aiocraft/mc/proto/login/clientbound/packet_login_plugin_request.py b/aiocraft/mc/proto/login/clientbound/packet_login_plugin_request.py index 6451a64..1653eff 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_login_plugin_request.py +++ b/aiocraft/mc/proto/login/clientbound/packet_login_plugin_request.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketLoginPluginRequest(Packet): diff --git a/aiocraft/mc/proto/login/clientbound/packet_success.py b/aiocraft/mc/proto/login/clientbound/packet_success.py index 4dc0c73..47f257f 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_success.py +++ b/aiocraft/mc/proto/login/clientbound/packet_success.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSuccess(Packet): diff --git a/aiocraft/mc/proto/login/serverbound/packet_encryption_begin.py b/aiocraft/mc/proto/login/serverbound/packet_encryption_begin.py index 64f91ed..e774e67 100644 --- a/aiocraft/mc/proto/login/serverbound/packet_encryption_begin.py +++ b/aiocraft/mc/proto/login/serverbound/packet_encryption_begin.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEncryptionBegin(Packet): diff --git a/aiocraft/mc/proto/login/serverbound/packet_login_plugin_response.py b/aiocraft/mc/proto/login/serverbound/packet_login_plugin_response.py index 8ff7cde..b7286e9 100644 --- a/aiocraft/mc/proto/login/serverbound/packet_login_plugin_response.py +++ b/aiocraft/mc/proto/login/serverbound/packet_login_plugin_response.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketLoginPluginResponse(Packet): diff --git a/aiocraft/mc/proto/login/serverbound/packet_login_start.py b/aiocraft/mc/proto/login/serverbound/packet_login_start.py index f4ddf7a..9264203 100644 --- a/aiocraft/mc/proto/login/serverbound/packet_login_start.py +++ b/aiocraft/mc/proto/login/serverbound/packet_login_start.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketLoginStart(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_abilities.py b/aiocraft/mc/proto/play/clientbound/packet_abilities.py index 9ddc56a..c6ca29c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_abilities.py +++ b/aiocraft/mc/proto/play/clientbound/packet_abilities.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketAbilities(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_acknowledge_player_digging.py b/aiocraft/mc/proto/play/clientbound/packet_acknowledge_player_digging.py index f1de421..d97ea73 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_acknowledge_player_digging.py +++ b/aiocraft/mc/proto/play/clientbound/packet_acknowledge_player_digging.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketAcknowledgePlayerDigging(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_action_bar.py b/aiocraft/mc/proto/play/clientbound/packet_action_bar.py index ef00ac1..0ae4d18 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_action_bar.py +++ b/aiocraft/mc/proto/play/clientbound/packet_action_bar.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketActionBar(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_advancement_progress.py b/aiocraft/mc/proto/play/clientbound/packet_advancement_progress.py index d16a6dd..78f9b26 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_advancement_progress.py +++ b/aiocraft/mc/proto/play/clientbound/packet_advancement_progress.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketAdvancementProgress(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_advancements.py b/aiocraft/mc/proto/play/clientbound/packet_advancements.py index dec13fc..7a2a3ef 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_advancements.py +++ b/aiocraft/mc/proto/play/clientbound/packet_advancements.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketAdvancements(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_animation.py b/aiocraft/mc/proto/play/clientbound/packet_animation.py index 27cc6d7..f3b8186 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_animation.py +++ b/aiocraft/mc/proto/play/clientbound/packet_animation.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketAnimation(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_attach_entity.py b/aiocraft/mc/proto/play/clientbound/packet_attach_entity.py index 2e91da4..428cc58 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_attach_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_attach_entity.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketAttachEntity(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_bed.py b/aiocraft/mc/proto/play/clientbound/packet_bed.py index 858642e..3ea1395 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_bed.py +++ b/aiocraft/mc/proto/play/clientbound/packet_bed.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketBed(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_block_action.py b/aiocraft/mc/proto/play/clientbound/packet_block_action.py index f38d972..b4da7c0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_block_action.py +++ b/aiocraft/mc/proto/play/clientbound/packet_block_action.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketBlockAction(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_block_break_animation.py b/aiocraft/mc/proto/play/clientbound/packet_block_break_animation.py index f984d0d..d2eeadb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_block_break_animation.py +++ b/aiocraft/mc/proto/play/clientbound/packet_block_break_animation.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketBlockBreakAnimation(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_block_change.py b/aiocraft/mc/proto/play/clientbound/packet_block_change.py index 2dbf079..584ec0a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_block_change.py +++ b/aiocraft/mc/proto/play/clientbound/packet_block_change.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketBlockChange(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_boss_bar.py b/aiocraft/mc/proto/play/clientbound/packet_boss_bar.py index 382bed9..9e6e112 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_boss_bar.py +++ b/aiocraft/mc/proto/play/clientbound/packet_boss_bar.py @@ -2,27 +2,28 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketBossBar(Packet): __slots__ = ( 'id', 'action', 'color', 'dividers', 'entityUUID', 'flags', 'health', 'title' ) action : int - color : Union[int, None] - dividers : Union[int, None] + color : Union[None, int] + dividers : Union[None, int] entityUUID : str - flags : Union[int, None] + flags : Union[None, int] health : Union[None, float] - title : Union[str, None] + title : Union[None, str] def __init__(self, proto:int, action:int=None, - color:Union[int, None]=None, - dividers:Union[int, None]=None, + color:Union[None, int]=None, + dividers:Union[None, int]=None, entityUUID:str=None, - flags:Union[int, None]=None, + flags:Union[None, int]=None, health:Union[None, float]=None, - title:Union[str, None]=None, + title:Union[None, str]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_camera.py b/aiocraft/mc/proto/play/clientbound/packet_camera.py index cb6fb01..3eb6f84 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_camera.py +++ b/aiocraft/mc/proto/play/clientbound/packet_camera.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCamera(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_chat.py b/aiocraft/mc/proto/play/clientbound/packet_chat.py index 1e05921..d87c2fc 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_chat.py +++ b/aiocraft/mc/proto/play/clientbound/packet_chat.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketChat(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_clear_titles.py b/aiocraft/mc/proto/play/clientbound/packet_clear_titles.py index 0fc85a5..569996a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_clear_titles.py +++ b/aiocraft/mc/proto/play/clientbound/packet_clear_titles.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketClearTitles(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_close_window.py b/aiocraft/mc/proto/play/clientbound/packet_close_window.py index 5481f4d..4d119b7 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_close_window.py +++ b/aiocraft/mc/proto/play/clientbound/packet_close_window.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCloseWindow(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_collect.py b/aiocraft/mc/proto/play/clientbound/packet_collect.py index 92c0be4..e9eb0c0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_collect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_collect.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCollect(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_combat_event.py b/aiocraft/mc/proto/play/clientbound/packet_combat_event.py index 604fa6c..ffa6799 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_combat_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_combat_event.py @@ -2,23 +2,24 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCombatEvent(Packet): __slots__ = ( 'id', 'duration', 'entityId', 'event', 'message', 'playerId' ) - duration : Union[int, None] - entityId : Union[int, None] + duration : Union[None, int] + entityId : Union[None, int] event : int - message : Union[str, None] - playerId : Union[int, None] + message : Union[None, str] + playerId : Union[None, int] def __init__(self, proto:int, - duration:Union[int, None]=None, - entityId:Union[int, None]=None, + duration:Union[None, int]=None, + entityId:Union[None, int]=None, event:int=None, - message:Union[str, None]=None, - playerId:Union[int, None]=None, + message:Union[None, str]=None, + playerId:Union[None, int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_craft_progress_bar.py b/aiocraft/mc/proto/play/clientbound/packet_craft_progress_bar.py index e29e7f4..9b1b631 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_craft_progress_bar.py +++ b/aiocraft/mc/proto/play/clientbound/packet_craft_progress_bar.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCraftProgressBar(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_craft_recipe_response.py b/aiocraft/mc/proto/play/clientbound/packet_craft_recipe_response.py index 8147448..a2cd3f6 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_craft_recipe_response.py +++ b/aiocraft/mc/proto/play/clientbound/packet_craft_recipe_response.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCraftRecipeResponse(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_custom_payload.py b/aiocraft/mc/proto/play/clientbound/packet_custom_payload.py index a62ad29..9ea9b11 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_custom_payload.py +++ b/aiocraft/mc/proto/play/clientbound/packet_custom_payload.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCustomPayload(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_death_combat_event.py b/aiocraft/mc/proto/play/clientbound/packet_death_combat_event.py index cc34487..ba22b66 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_death_combat_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_death_combat_event.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketDeathCombatEvent(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_declare_commands.py b/aiocraft/mc/proto/play/clientbound/packet_declare_commands.py index 9551e1c..2f9b147 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_declare_commands.py +++ b/aiocraft/mc/proto/play/clientbound/packet_declare_commands.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketDeclareCommands(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_declare_recipes.py b/aiocraft/mc/proto/play/clientbound/packet_declare_recipes.py index 76165f2..a46732d 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_declare_recipes.py +++ b/aiocraft/mc/proto/play/clientbound/packet_declare_recipes.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketDeclareRecipes(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_destroy_entity.py b/aiocraft/mc/proto/play/clientbound/packet_destroy_entity.py index 2926d51..be3a341 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_destroy_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_destroy_entity.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketDestroyEntity(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_difficulty.py b/aiocraft/mc/proto/play/clientbound/packet_difficulty.py index 33b36d7..9976381 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_difficulty.py +++ b/aiocraft/mc/proto/play/clientbound/packet_difficulty.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketDifficulty(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_end_combat_event.py b/aiocraft/mc/proto/play/clientbound/packet_end_combat_event.py index 3605583..3241861 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_end_combat_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_end_combat_event.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEndCombatEvent(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_enter_combat_event.py b/aiocraft/mc/proto/play/clientbound/packet_enter_combat_event.py index b8022af..dc31d22 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_enter_combat_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_enter_combat_event.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEnterCombatEvent(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity.py b/aiocraft/mc/proto/play/clientbound/packet_entity.py index 97d2f2f..547ac5a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntity(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_destroy.py b/aiocraft/mc/proto/play/clientbound/packet_entity_destroy.py index 5e1e399..3fb4e3a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_destroy.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_destroy.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityDestroy(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_effect.py b/aiocraft/mc/proto/play/clientbound/packet_entity_effect.py index d22e390..3759ef0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_effect.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityEffect(Packet): @@ -11,14 +12,14 @@ class PacketEntityEffect(Packet): duration : int effectId : int entityId : int - hideParticles : Union[int,bool] + hideParticles : Union[bool,int] def __init__(self, proto:int, amplifier:int=None, duration:int=None, effectId:int=None, entityId:int=None, - hideParticles:Union[int,bool]=None, + hideParticles:Union[bool,int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_equipment.py b/aiocraft/mc/proto/play/clientbound/packet_entity_equipment.py index 677510f..9d05c0b 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_equipment.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_equipment.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityEquipment(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_head_rotation.py b/aiocraft/mc/proto/play/clientbound/packet_entity_head_rotation.py index 2948a08..8ce04f9 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_head_rotation.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_head_rotation.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityHeadRotation(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_look.py b/aiocraft/mc/proto/play/clientbound/packet_entity_look.py index 0657516..cca8e37 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_look.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_look.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityLook(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_metadata.py b/aiocraft/mc/proto/play/clientbound/packet_entity_metadata.py index 2860baf..670662f 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_metadata.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_metadata.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityMetadata(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_move_look.py b/aiocraft/mc/proto/play/clientbound/packet_entity_move_look.py index 65e9a44..63c61c2 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_move_look.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_move_look.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityMoveLook(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_sound_effect.py b/aiocraft/mc/proto/play/clientbound/packet_entity_sound_effect.py index ec5ac6d..6ceb201 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_sound_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_sound_effect.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntitySoundEffect(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_status.py b/aiocraft/mc/proto/play/clientbound/packet_entity_status.py index b5afbd6..83393bb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_status.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_status.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityStatus(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_teleport.py b/aiocraft/mc/proto/play/clientbound/packet_entity_teleport.py index 8066362..44106a3 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_teleport.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_teleport.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityTeleport(Packet): @@ -10,19 +11,19 @@ class PacketEntityTeleport(Packet): entityId : int onGround : bool pitch : int - x : Union[int,float] - y : Union[int,float] + x : Union[float,int] + y : Union[float,int] yaw : int - z : Union[int,float] + z : Union[float,int] def __init__(self, proto:int, entityId:int=None, onGround:bool=None, pitch:int=None, - x:Union[int,float]=None, - y:Union[int,float]=None, + x:Union[float,int]=None, + y:Union[float,int]=None, yaw:int=None, - z:Union[int,float]=None, + z:Union[float,int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_update_attributes.py b/aiocraft/mc/proto/play/clientbound/packet_entity_update_attributes.py index aa3d757..8bc9ae0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_update_attributes.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_update_attributes.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityUpdateAttributes(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_velocity.py b/aiocraft/mc/proto/play/clientbound/packet_entity_velocity.py index 7ef1c57..251345a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_velocity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_velocity.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityVelocity(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_experience.py b/aiocraft/mc/proto/play/clientbound/packet_experience.py index baff131..7ee4bfe 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_experience.py +++ b/aiocraft/mc/proto/play/clientbound/packet_experience.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketExperience(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_explosion.py b/aiocraft/mc/proto/play/clientbound/packet_explosion.py index a5ee24b..0cd5ccd 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_explosion.py +++ b/aiocraft/mc/proto/play/clientbound/packet_explosion.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketExplosion(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_face_player.py b/aiocraft/mc/proto/play/clientbound/packet_face_player.py index c839c75..8f22420 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_face_player.py +++ b/aiocraft/mc/proto/play/clientbound/packet_face_player.py @@ -2,13 +2,14 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketFacePlayer(Packet): __slots__ = ( 'id', 'entityId', 'entity_feet_eyes', 'feet_eyes', 'isEntity', 'x', 'y', 'z' ) - entityId : Union[int, None] - entity_feet_eyes : Union[str, None] + entityId : Union[None, int] + entity_feet_eyes : Union[None, str] feet_eyes : int isEntity : bool x : float @@ -16,8 +17,8 @@ class PacketFacePlayer(Packet): z : float def __init__(self, proto:int, - entityId:Union[int, None]=None, - entity_feet_eyes:Union[str, None]=None, + entityId:Union[None, int]=None, + entity_feet_eyes:Union[None, str]=None, feet_eyes:int=None, isEntity:bool=None, x:float=None, diff --git a/aiocraft/mc/proto/play/clientbound/packet_game_state_change.py b/aiocraft/mc/proto/play/clientbound/packet_game_state_change.py index b90aa51..786cf8e 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_game_state_change.py +++ b/aiocraft/mc/proto/play/clientbound/packet_game_state_change.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketGameStateChange(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_held_item_slot.py b/aiocraft/mc/proto/play/clientbound/packet_held_item_slot.py index 28fd692..6403a7a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_held_item_slot.py +++ b/aiocraft/mc/proto/play/clientbound/packet_held_item_slot.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketHeldItemSlot(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_initialize_world_border.py b/aiocraft/mc/proto/play/clientbound/packet_initialize_world_border.py index a9a0325..95b9dc7 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_initialize_world_border.py +++ b/aiocraft/mc/proto/play/clientbound/packet_initialize_world_border.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketInitializeWorldBorder(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_keep_alive.py b/aiocraft/mc/proto/play/clientbound/packet_keep_alive.py index 61881b9..01ce0a2 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_keep_alive.py +++ b/aiocraft/mc/proto/play/clientbound/packet_keep_alive.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketKeepAlive(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_kick_disconnect.py b/aiocraft/mc/proto/play/clientbound/packet_kick_disconnect.py index 77f0632..eebe244 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_kick_disconnect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_kick_disconnect.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketKickDisconnect(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_login.py b/aiocraft/mc/proto/play/clientbound/packet_login.py index f65ef40..89ea42c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_login.py +++ b/aiocraft/mc/proto/play/clientbound/packet_login.py @@ -2,13 +2,14 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketLogin(Packet): __slots__ = ( 'id', 'difficulty', 'dimension', 'dimensionCodec', 'enableRespawnScreen', 'entityId', 'gameMode', 'hashedSeed', 'isDebug', 'isFlat', 'isHardcore', 'levelType', 'maxPlayers', 'previousGameMode', 'reducedDebugInfo', 'simulationDistance', 'viewDistance', 'worldName', 'worldNames' ) difficulty : int - dimension : Union[int,dict,str] + dimension : Union[dict,int,str] dimensionCodec : dict enableRespawnScreen : bool entityId : int @@ -28,7 +29,7 @@ class PacketLogin(Packet): def __init__(self, proto:int, difficulty:int=None, - dimension:Union[int,dict,str]=None, + dimension:Union[dict,int,str]=None, dimensionCodec:dict=None, enableRespawnScreen:bool=None, entityId:int=None, diff --git a/aiocraft/mc/proto/play/clientbound/packet_map.py b/aiocraft/mc/proto/play/clientbound/packet_map.py index 12c8bdf..ef814eb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_map.py +++ b/aiocraft/mc/proto/play/clientbound/packet_map.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketMap(Packet): @@ -12,11 +13,11 @@ class PacketMap(Packet): icons : Union[list,tuple] itemDamage : int locked : bool - rows : Union[int, None] + rows : Union[None, int] scale : int trackingPosition : bool - x : Union[int, None] - y : Union[int, None] + x : Union[None, int] + y : Union[None, int] def __init__(self, proto:int, columns:int=None, @@ -24,11 +25,11 @@ class PacketMap(Packet): icons:Union[list,tuple]=None, itemDamage:int=None, locked:bool=None, - rows:Union[int, None]=None, + rows:Union[None, int]=None, scale:int=None, trackingPosition:bool=None, - x:Union[int, None]=None, - y:Union[int, None]=None, + x:Union[None, int]=None, + y:Union[None, int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_map_chunk.py b/aiocraft/mc/proto/play/clientbound/packet_map_chunk.py index 683e8fb..0be26df 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_map_chunk.py +++ b/aiocraft/mc/proto/play/clientbound/packet_map_chunk.py @@ -2,12 +2,13 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketMapChunk(Packet): __slots__ = ( 'id', 'biomes', 'bitMap', 'blockEntities', 'blockLight', 'blockLightMask', 'chunkData', 'emptyBlockLightMask', 'emptySkyLightMask', 'groundUp', 'heightmaps', 'ignoreOldData', 'skyLight', 'skyLightMask', 'trustEdges', 'x', 'z' ) - biomes : Union[Union[list, None],list] + biomes : Union[Union[None, list],list] bitMap : Union[int,list] blockEntities : list blockLight : list @@ -25,7 +26,7 @@ class PacketMapChunk(Packet): z : int def __init__(self, proto:int, - biomes:Union[Union[list, None],list]=None, + biomes:Union[Union[None, list],list]=None, bitMap:Union[int,list]=None, blockEntities:list=None, blockLight:list=None, diff --git a/aiocraft/mc/proto/play/clientbound/packet_map_chunk_bulk.py b/aiocraft/mc/proto/play/clientbound/packet_map_chunk_bulk.py index 2e8cf13..b0a6231 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_map_chunk_bulk.py +++ b/aiocraft/mc/proto/play/clientbound/packet_map_chunk_bulk.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketMapChunkBulk(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py b/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py index 4eeff3c..eccc3b1 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py +++ b/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketMultiBlockChange(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_named_entity_spawn.py b/aiocraft/mc/proto/play/clientbound/packet_named_entity_spawn.py index 6ec960c..34e753a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_named_entity_spawn.py +++ b/aiocraft/mc/proto/play/clientbound/packet_named_entity_spawn.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketNamedEntitySpawn(Packet): @@ -12,10 +13,10 @@ class PacketNamedEntitySpawn(Packet): metadata : dict pitch : int playerUUID : str - x : Union[int,float] - y : Union[int,float] + x : Union[float,int] + y : Union[float,int] yaw : int - z : Union[int,float] + z : Union[float,int] def __init__(self, proto:int, currentItem:int=None, @@ -23,10 +24,10 @@ class PacketNamedEntitySpawn(Packet): metadata:dict=None, pitch:int=None, playerUUID:str=None, - x:Union[int,float]=None, - y:Union[int,float]=None, + x:Union[float,int]=None, + y:Union[float,int]=None, yaw:int=None, - z:Union[int,float]=None, + z:Union[float,int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_named_sound_effect.py b/aiocraft/mc/proto/play/clientbound/packet_named_sound_effect.py index 3a2a402..e5a6b82 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_named_sound_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_named_sound_effect.py @@ -2,12 +2,13 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketNamedSoundEffect(Packet): __slots__ = ( 'id', 'pitch', 'soundCategory', 'soundName', 'volume', 'x', 'y', 'z' ) - pitch : Union[int,float] + pitch : Union[float,int] soundCategory : int soundName : str volume : float @@ -16,7 +17,7 @@ class PacketNamedSoundEffect(Packet): z : int def __init__(self, proto:int, - pitch:Union[int,float]=None, + pitch:Union[float,int]=None, soundCategory:int=None, soundName:str=None, volume:float=None, diff --git a/aiocraft/mc/proto/play/clientbound/packet_nbt_query_response.py b/aiocraft/mc/proto/play/clientbound/packet_nbt_query_response.py index aba7cf9..ca8bbfe 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_nbt_query_response.py +++ b/aiocraft/mc/proto/play/clientbound/packet_nbt_query_response.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketNbtQueryResponse(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_open_book.py b/aiocraft/mc/proto/play/clientbound/packet_open_book.py index 8d4997f..f02bfbd 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_open_book.py +++ b/aiocraft/mc/proto/play/clientbound/packet_open_book.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketOpenBook(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_open_horse_window.py b/aiocraft/mc/proto/play/clientbound/packet_open_horse_window.py index 73f36e8..aa091ec 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_open_horse_window.py +++ b/aiocraft/mc/proto/play/clientbound/packet_open_horse_window.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketOpenHorseWindow(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_open_sign_entity.py b/aiocraft/mc/proto/play/clientbound/packet_open_sign_entity.py index b3c721f..611710f 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_open_sign_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_open_sign_entity.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketOpenSignEntity(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_open_window.py b/aiocraft/mc/proto/play/clientbound/packet_open_window.py index 781b58e..1475063 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_open_window.py +++ b/aiocraft/mc/proto/play/clientbound/packet_open_window.py @@ -2,19 +2,20 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketOpenWindow(Packet): __slots__ = ( 'id', 'entityId', 'inventoryType', 'slotCount', 'windowId', 'windowTitle' ) - entityId : Union[int, None] + entityId : Union[None, int] inventoryType : Union[int,str] slotCount : int windowId : int windowTitle : str def __init__(self, proto:int, - entityId:Union[int, None]=None, + entityId:Union[None, int]=None, inventoryType:Union[int,str]=None, slotCount:int=None, windowId:int=None, diff --git a/aiocraft/mc/proto/play/clientbound/packet_ping.py b/aiocraft/mc/proto/play/clientbound/packet_ping.py index 06682fc..e3d4be8 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_ping.py +++ b/aiocraft/mc/proto/play/clientbound/packet_ping.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPing(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_player_info.py b/aiocraft/mc/proto/play/clientbound/packet_player_info.py index 35e08e1..024e01c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_player_info.py +++ b/aiocraft/mc/proto/play/clientbound/packet_player_info.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPlayerInfo(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_playerlist_header.py b/aiocraft/mc/proto/play/clientbound/packet_playerlist_header.py index 92a96f7..48a2c67 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_playerlist_header.py +++ b/aiocraft/mc/proto/play/clientbound/packet_playerlist_header.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPlayerlistHeader(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_position.py b/aiocraft/mc/proto/play/clientbound/packet_position.py index ccc004a..3bd89c1 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_position.py +++ b/aiocraft/mc/proto/play/clientbound/packet_position.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPosition(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_rel_entity_move.py b/aiocraft/mc/proto/play/clientbound/packet_rel_entity_move.py index 6825a5f..4918425 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_rel_entity_move.py +++ b/aiocraft/mc/proto/play/clientbound/packet_rel_entity_move.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketRelEntityMove(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_remove_entity_effect.py b/aiocraft/mc/proto/play/clientbound/packet_remove_entity_effect.py index 720a983..d43f916 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_remove_entity_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_remove_entity_effect.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketRemoveEntityEffect(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_resource_pack_send.py b/aiocraft/mc/proto/play/clientbound/packet_resource_pack_send.py index bce51a0..1e23d18 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_resource_pack_send.py +++ b/aiocraft/mc/proto/play/clientbound/packet_resource_pack_send.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketResourcePackSend(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_respawn.py b/aiocraft/mc/proto/play/clientbound/packet_respawn.py index cb75370..ab01e9a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_respawn.py +++ b/aiocraft/mc/proto/play/clientbound/packet_respawn.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketRespawn(Packet): @@ -9,7 +10,7 @@ class PacketRespawn(Packet): copyMetadata : bool difficulty : int - dimension : Union[int,dict,str] + dimension : Union[dict,int,str] gamemode : int hashedSeed : int isDebug : bool @@ -21,7 +22,7 @@ class PacketRespawn(Packet): def __init__(self, proto:int, copyMetadata:bool=None, difficulty:int=None, - dimension:Union[int,dict,str]=None, + dimension:Union[dict,int,str]=None, gamemode:int=None, hashedSeed:int=None, isDebug:bool=None, diff --git a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_display_objective.py b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_display_objective.py index 91c7c89..af32f37 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_display_objective.py +++ b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_display_objective.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketScoreboardDisplayObjective(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_objective.py b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_objective.py index 9348f03..404ceb0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_objective.py +++ b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_objective.py @@ -2,21 +2,22 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketScoreboardObjective(Packet): __slots__ = ( 'id', 'action', 'displayText', 'name', 'type' ) action : int - displayText : Union[str, None] + displayText : Union[None, str] name : str - type : Union[Union[str, None],Union[int, None]] + type : Union[Union[None, int],Union[None, str]] def __init__(self, proto:int, action:int=None, - displayText:Union[str, None]=None, + displayText:Union[None, str]=None, name:str=None, - type:Union[Union[str, None],Union[int, None]]=None, + type:Union[Union[None, int],Union[None, str]]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_score.py b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_score.py index f8f747e..0e5d95e 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_score.py +++ b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_score.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketScoreboardScore(Packet): @@ -10,13 +11,13 @@ class PacketScoreboardScore(Packet): action : int itemName : str scoreName : str - value : Union[int, None] + value : Union[None, int] def __init__(self, proto:int, action:int=None, itemName:str=None, scoreName:str=None, - value:Union[int, None]=None, + value:Union[None, int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_team.py b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_team.py index 86a7f71..300c80a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_team.py +++ b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_team.py @@ -2,32 +2,33 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketScoreboardTeam(Packet): __slots__ = ( 'id', 'collisionRule', 'color', 'friendlyFire', 'mode', 'name', 'nameTagVisibility', 'players', 'prefix', 'suffix', 'team' ) - collisionRule : Union[str, None] - color : Union[int, None] - friendlyFire : Union[int, None] + collisionRule : Union[None, str] + color : Union[None, int] + friendlyFire : Union[None, int] mode : int - name : Union[str, None] - nameTagVisibility : Union[str, None] - players : Union[list, None] - prefix : Union[str, None] - suffix : Union[str, None] + name : Union[None, str] + nameTagVisibility : Union[None, str] + players : Union[None, list] + prefix : Union[None, str] + suffix : Union[None, str] team : str def __init__(self, proto:int, - collisionRule:Union[str, None]=None, - color:Union[int, None]=None, - friendlyFire:Union[int, None]=None, + collisionRule:Union[None, str]=None, + color:Union[None, int]=None, + friendlyFire:Union[None, int]=None, mode:int=None, - name:Union[str, None]=None, - nameTagVisibility:Union[str, None]=None, - players:Union[list, None]=None, - prefix:Union[str, None]=None, - suffix:Union[str, None]=None, + name:Union[None, str]=None, + nameTagVisibility:Union[None, str]=None, + players:Union[None, list]=None, + prefix:Union[None, str]=None, + suffix:Union[None, str]=None, team:str=None, **kwargs ): diff --git a/aiocraft/mc/proto/play/clientbound/packet_sculk_vibration_signal.py b/aiocraft/mc/proto/play/clientbound/packet_sculk_vibration_signal.py index 366be69..9f3de8d 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_sculk_vibration_signal.py +++ b/aiocraft/mc/proto/play/clientbound/packet_sculk_vibration_signal.py @@ -2,19 +2,20 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSculkVibrationSignal(Packet): __slots__ = ( 'id', 'arrivalTicks', 'destination', 'destinationIdentifier', 'sourcePosition' ) arrivalTicks : int - destination : Union[int, tuple, None] + destination : Union[None, int, tuple] destinationIdentifier : str sourcePosition : tuple def __init__(self, proto:int, arrivalTicks:int=None, - destination:Union[int, tuple, None]=None, + destination:Union[None, int, tuple]=None, destinationIdentifier:str=None, sourcePosition:tuple=None, **kwargs diff --git a/aiocraft/mc/proto/play/clientbound/packet_select_advancement_tab.py b/aiocraft/mc/proto/play/clientbound/packet_select_advancement_tab.py index 4d74c46..c3c2411 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_select_advancement_tab.py +++ b/aiocraft/mc/proto/play/clientbound/packet_select_advancement_tab.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSelectAdvancementTab(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_compression.py b/aiocraft/mc/proto/play/clientbound/packet_set_compression.py index 3c6c37e..5c0fd2a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_compression.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_compression.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetCompression(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_cooldown.py b/aiocraft/mc/proto/play/clientbound/packet_set_cooldown.py index 57a2cdf..e5a4130 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_cooldown.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_cooldown.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetCooldown(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_passengers.py b/aiocraft/mc/proto/play/clientbound/packet_set_passengers.py index 801ff00..22a79df 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_passengers.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_passengers.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetPassengers(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_slot.py b/aiocraft/mc/proto/play/clientbound/packet_set_slot.py index 6061f52..8866a52 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_slot.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_slot.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetSlot(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_title_subtitle.py b/aiocraft/mc/proto/play/clientbound/packet_set_title_subtitle.py index 9f17e2a..335e27a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_title_subtitle.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_title_subtitle.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetTitleSubtitle(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_title_text.py b/aiocraft/mc/proto/play/clientbound/packet_set_title_text.py index fdbab79..e810d0d 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_title_text.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_title_text.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetTitleText(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_title_time.py b/aiocraft/mc/proto/play/clientbound/packet_set_title_time.py index 9a608e6..90411ce 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_title_time.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_title_time.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetTitleTime(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_simulation_distance.py b/aiocraft/mc/proto/play/clientbound/packet_simulation_distance.py index 50218c0..04f3d8e 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_simulation_distance.py +++ b/aiocraft/mc/proto/play/clientbound/packet_simulation_distance.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSimulationDistance(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_sound_effect.py b/aiocraft/mc/proto/play/clientbound/packet_sound_effect.py index d8af1c7..ce40cdb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_sound_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_sound_effect.py @@ -2,13 +2,14 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSoundEffect(Packet): __slots__ = ( 'id', 'parrottedEntityType', 'pitch', 'soundCategory', 'soundId', 'volume', 'x', 'y', 'z' ) parrottedEntityType : str - pitch : Union[int,float] + pitch : Union[float,int] soundCategory : int soundId : int volume : float @@ -18,7 +19,7 @@ class PacketSoundEffect(Packet): def __init__(self, proto:int, parrottedEntityType:str=None, - pitch:Union[int,float]=None, + pitch:Union[float,int]=None, soundCategory:int=None, soundId:int=None, volume:float=None, diff --git a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity.py b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity.py index ea20293..eae545d 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSpawnEntity(Packet): @@ -9,32 +10,32 @@ class PacketSpawnEntity(Packet): entityId : int entityUUID : str - objectData : Union[int,dict] + objectData : Union[dict,int] objectUUID : str pitch : int type : int velocityX : int velocityY : int velocityZ : int - x : Union[int,float] - y : Union[int,float] + x : Union[float,int] + y : Union[float,int] yaw : int - z : Union[int,float] + z : Union[float,int] def __init__(self, proto:int, entityId:int=None, entityUUID:str=None, - objectData:Union[int,dict]=None, + objectData:Union[dict,int]=None, objectUUID:str=None, pitch:int=None, type:int=None, velocityX:int=None, velocityY:int=None, velocityZ:int=None, - x:Union[int,float]=None, - y:Union[int,float]=None, + x:Union[float,int]=None, + y:Union[float,int]=None, yaw:int=None, - z:Union[int,float]=None, + z:Union[float,int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_experience_orb.py b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_experience_orb.py index d295da2..355dc8a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_experience_orb.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_experience_orb.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSpawnEntityExperienceOrb(Packet): @@ -9,16 +10,16 @@ class PacketSpawnEntityExperienceOrb(Packet): count : int entityId : int - x : Union[int,float] - y : Union[int,float] - z : Union[int,float] + x : Union[float,int] + y : Union[float,int] + z : Union[float,int] def __init__(self, proto:int, count:int=None, entityId:int=None, - x:Union[int,float]=None, - y:Union[int,float]=None, - z:Union[int,float]=None, + x:Union[float,int]=None, + y:Union[float,int]=None, + z:Union[float,int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_living.py b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_living.py index 7d0f81e..8611fe4 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_living.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_living.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSpawnEntityLiving(Packet): @@ -16,10 +17,10 @@ class PacketSpawnEntityLiving(Packet): velocityX : int velocityY : int velocityZ : int - x : Union[int,float] - y : Union[int,float] + x : Union[float,int] + y : Union[float,int] yaw : int - z : Union[int,float] + z : Union[float,int] def __init__(self, proto:int, entityId:int=None, @@ -31,10 +32,10 @@ class PacketSpawnEntityLiving(Packet): velocityX:int=None, velocityY:int=None, velocityZ:int=None, - x:Union[int,float]=None, - y:Union[int,float]=None, + x:Union[float,int]=None, + y:Union[float,int]=None, yaw:int=None, - z:Union[int,float]=None, + z:Union[float,int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_painting.py b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_painting.py index cc48b2b..c9eb60a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_painting.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_painting.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSpawnEntityPainting(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_weather.py b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_weather.py index 74f3fd8..5e5dabe 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_weather.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_weather.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSpawnEntityWeather(Packet): @@ -9,16 +10,16 @@ class PacketSpawnEntityWeather(Packet): entityId : int type : int - x : Union[int,float] - y : Union[int,float] - z : Union[int,float] + x : Union[float,int] + y : Union[float,int] + z : Union[float,int] def __init__(self, proto:int, entityId:int=None, type:int=None, - x:Union[int,float]=None, - y:Union[int,float]=None, - z:Union[int,float]=None, + x:Union[float,int]=None, + y:Union[float,int]=None, + z:Union[float,int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_spawn_position.py b/aiocraft/mc/proto/play/clientbound/packet_spawn_position.py index 761d3fb..ef3acb5 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_position.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_position.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSpawnPosition(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_statistics.py b/aiocraft/mc/proto/play/clientbound/packet_statistics.py index d3c4892..37cd909 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_statistics.py +++ b/aiocraft/mc/proto/play/clientbound/packet_statistics.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketStatistics(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_stop_sound.py b/aiocraft/mc/proto/play/clientbound/packet_stop_sound.py index fd373c0..dd942e3 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_stop_sound.py +++ b/aiocraft/mc/proto/play/clientbound/packet_stop_sound.py @@ -2,19 +2,20 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketStopSound(Packet): __slots__ = ( 'id', 'flags', 'sound', 'source' ) flags : int - sound : Union[str, None] - source : Union[int, None] + sound : Union[None, str] + source : Union[None, int] def __init__(self, proto:int, flags:int=None, - sound:Union[str, None]=None, - source:Union[int, None]=None, + sound:Union[None, str]=None, + source:Union[None, int]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_tab_complete.py b/aiocraft/mc/proto/play/clientbound/packet_tab_complete.py index 1a7c3a7..e226fc3 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_tab_complete.py +++ b/aiocraft/mc/proto/play/clientbound/packet_tab_complete.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTabComplete(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_tags.py b/aiocraft/mc/proto/play/clientbound/packet_tags.py index 31a8763..c41120b 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_tags.py +++ b/aiocraft/mc/proto/play/clientbound/packet_tags.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTags(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_teams.py b/aiocraft/mc/proto/play/clientbound/packet_teams.py index 7dc4fdf..b8a93f0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_teams.py +++ b/aiocraft/mc/proto/play/clientbound/packet_teams.py @@ -2,34 +2,35 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTeams(Packet): __slots__ = ( 'id', 'collisionRule', 'color', 'formatting', 'friendlyFire', 'mode', 'name', 'nameTagVisibility', 'players', 'prefix', 'suffix', 'team' ) - collisionRule : Union[str, None] - color : Union[int, None] - formatting : Union[int, None] - friendlyFire : Union[int, None] + collisionRule : Union[None, str] + color : Union[None, int] + formatting : Union[None, int] + friendlyFire : Union[None, int] mode : int - name : Union[str, None] - nameTagVisibility : Union[str, None] - players : Union[list, None] - prefix : Union[str, None] - suffix : Union[str, None] + name : Union[None, str] + nameTagVisibility : Union[None, str] + players : Union[None, list] + prefix : Union[None, str] + suffix : Union[None, str] team : str def __init__(self, proto:int, - collisionRule:Union[str, None]=None, - color:Union[int, None]=None, - formatting:Union[int, None]=None, - friendlyFire:Union[int, None]=None, + collisionRule:Union[None, str]=None, + color:Union[None, int]=None, + formatting:Union[None, int]=None, + friendlyFire:Union[None, int]=None, mode:int=None, - name:Union[str, None]=None, - nameTagVisibility:Union[str, None]=None, - players:Union[list, None]=None, - prefix:Union[str, None]=None, - suffix:Union[str, None]=None, + name:Union[None, str]=None, + nameTagVisibility:Union[None, str]=None, + players:Union[None, list]=None, + prefix:Union[None, str]=None, + suffix:Union[None, str]=None, team:str=None, **kwargs ): diff --git a/aiocraft/mc/proto/play/clientbound/packet_tile_entity_data.py b/aiocraft/mc/proto/play/clientbound/packet_tile_entity_data.py index fb17350..8a6ebcc 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_tile_entity_data.py +++ b/aiocraft/mc/proto/play/clientbound/packet_tile_entity_data.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTileEntityData(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_title.py b/aiocraft/mc/proto/play/clientbound/packet_title.py index 7fea7fd..4f0d4f8 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_title.py +++ b/aiocraft/mc/proto/play/clientbound/packet_title.py @@ -2,23 +2,24 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTitle(Packet): __slots__ = ( 'id', 'action', 'fadeIn', 'fadeOut', 'stay', 'text' ) action : int - fadeIn : Union[int, None] - fadeOut : Union[int, None] - stay : Union[int, None] - text : Union[str, None] + fadeIn : Union[None, int] + fadeOut : Union[None, int] + stay : Union[None, int] + text : Union[None, str] def __init__(self, proto:int, action:int=None, - fadeIn:Union[int, None]=None, - fadeOut:Union[int, None]=None, - stay:Union[int, None]=None, - text:Union[str, None]=None, + fadeIn:Union[None, int]=None, + fadeOut:Union[None, int]=None, + stay:Union[None, int]=None, + text:Union[None, str]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_trade_list.py b/aiocraft/mc/proto/play/clientbound/packet_trade_list.py index 1715382..be25e68 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_trade_list.py +++ b/aiocraft/mc/proto/play/clientbound/packet_trade_list.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTradeList(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_transaction.py b/aiocraft/mc/proto/play/clientbound/packet_transaction.py index ae96d0a..db80cdb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_transaction.py +++ b/aiocraft/mc/proto/play/clientbound/packet_transaction.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTransaction(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_unload_chunk.py b/aiocraft/mc/proto/play/clientbound/packet_unload_chunk.py index b2961d2..cf06771 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_unload_chunk.py +++ b/aiocraft/mc/proto/play/clientbound/packet_unload_chunk.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUnloadChunk(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_unlock_recipes.py b/aiocraft/mc/proto/play/clientbound/packet_unlock_recipes.py index 1c1d7ef..891f329 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_unlock_recipes.py +++ b/aiocraft/mc/proto/play/clientbound/packet_unlock_recipes.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUnlockRecipes(Packet): @@ -17,7 +18,7 @@ class PacketUnlockRecipes(Packet): notification : bool recipes : list recipes1 : list - recipes2 : Union[Union[list, None],list] + recipes2 : Union[Union[None, list],list] smeltingBookOpen : bool smokerBookOpen : bool @@ -32,7 +33,7 @@ class PacketUnlockRecipes(Packet): notification:bool=None, recipes:list=None, recipes1:list=None, - recipes2:Union[Union[list, None],list]=None, + recipes2:Union[Union[None, list],list]=None, smeltingBookOpen:bool=None, smokerBookOpen:bool=None, **kwargs diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_attributes.py b/aiocraft/mc/proto/play/clientbound/packet_update_attributes.py index 9611748..b7e4971 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_attributes.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_attributes.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateAttributes(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_entity_nbt.py b/aiocraft/mc/proto/play/clientbound/packet_update_entity_nbt.py index fe48ab0..ac9f284 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_entity_nbt.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_entity_nbt.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateEntityNbt(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_health.py b/aiocraft/mc/proto/play/clientbound/packet_update_health.py index 8507265..90c8b25 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_health.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_health.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateHealth(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_light.py b/aiocraft/mc/proto/play/clientbound/packet_update_light.py index e91cb51..4a55ce2 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_light.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_light.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateLight(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_sign.py b/aiocraft/mc/proto/play/clientbound/packet_update_sign.py index 9522679..890041c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_sign.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_sign.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateSign(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_time.py b/aiocraft/mc/proto/play/clientbound/packet_update_time.py index eb5ff0c..f3692d9 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_time.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_time.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateTime(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_view_distance.py b/aiocraft/mc/proto/play/clientbound/packet_update_view_distance.py index bbf3c2b..b20890b 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_view_distance.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_view_distance.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateViewDistance(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_view_position.py b/aiocraft/mc/proto/play/clientbound/packet_update_view_position.py index 357719a..d8bb19f 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_view_position.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_view_position.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateViewPosition(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_vehicle_move.py b/aiocraft/mc/proto/play/clientbound/packet_vehicle_move.py index 02b8ec1..71b6744 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_vehicle_move.py +++ b/aiocraft/mc/proto/play/clientbound/packet_vehicle_move.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketVehicleMove(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_window_items.py b/aiocraft/mc/proto/play/clientbound/packet_window_items.py index d226437..e9c21d1 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_window_items.py +++ b/aiocraft/mc/proto/play/clientbound/packet_window_items.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWindowItems(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_border.py b/aiocraft/mc/proto/play/clientbound/packet_world_border.py index ad3b6cb..7d896cd 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWorldBorder(Packet): @@ -10,11 +11,11 @@ class PacketWorldBorder(Packet): action : int new_radius : Union[None, float] old_radius : Union[None, float] - portalBoundary : Union[int, None] + portalBoundary : Union[None, int] radius : Union[None, float] - speed : Union[int, None] - warning_blocks : Union[int, None] - warning_time : Union[int, None] + speed : Union[None, int] + warning_blocks : Union[None, int] + warning_time : Union[None, int] x : Union[None, float] z : Union[None, float] @@ -22,11 +23,11 @@ class PacketWorldBorder(Packet): action:int=None, new_radius:Union[None, float]=None, old_radius:Union[None, float]=None, - portalBoundary:Union[int, None]=None, + portalBoundary:Union[None, int]=None, radius:Union[None, float]=None, - speed:Union[int, None]=None, - warning_blocks:Union[int, None]=None, - warning_time:Union[int, None]=None, + speed:Union[None, int]=None, + warning_blocks:Union[None, int]=None, + warning_time:Union[None, int]=None, x:Union[None, float]=None, z:Union[None, float]=None, **kwargs diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_border_center.py b/aiocraft/mc/proto/play/clientbound/packet_world_border_center.py index 2ebaa23..d38a9ac 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border_center.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border_center.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWorldBorderCenter(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_border_lerp_size.py b/aiocraft/mc/proto/play/clientbound/packet_world_border_lerp_size.py index db7a7d6..820893f 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border_lerp_size.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border_lerp_size.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWorldBorderLerpSize(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_border_size.py b/aiocraft/mc/proto/play/clientbound/packet_world_border_size.py index aa75339..23a352e 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border_size.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border_size.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWorldBorderSize(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_border_warning_delay.py b/aiocraft/mc/proto/play/clientbound/packet_world_border_warning_delay.py index d6037b0..a8beba6 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border_warning_delay.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border_warning_delay.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWorldBorderWarningDelay(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_border_warning_reach.py b/aiocraft/mc/proto/play/clientbound/packet_world_border_warning_reach.py index bff06fb..4b16348 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border_warning_reach.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border_warning_reach.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWorldBorderWarningReach(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_event.py b/aiocraft/mc/proto/play/clientbound/packet_world_event.py index 3044f1b..3dbcff2 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_event.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWorldEvent(Packet): diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_particles.py b/aiocraft/mc/proto/play/clientbound/packet_world_particles.py index ce1bed7..7b95350 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_particles.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_particles.py @@ -2,12 +2,13 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWorldParticles(Packet): __slots__ = ( 'id', 'data', 'longDistance', 'offsetX', 'offsetY', 'offsetZ', 'particleData', 'particleId', 'particles', 'x', 'y', 'z' ) - data : Union[Union[list, None],Union[int, dict, None],bytes] + data : Union[Union[None, dict, int],Union[None, list],bytes] longDistance : bool offsetX : float offsetY : float @@ -20,7 +21,7 @@ class PacketWorldParticles(Packet): z : float def __init__(self, proto:int, - data:Union[Union[list, None],Union[int, dict, None],bytes]=None, + data:Union[Union[None, dict, int],Union[None, list],bytes]=None, longDistance:bool=None, offsetX:float=None, offsetY:float=None, diff --git a/aiocraft/mc/proto/play/serverbound/packet_abilities.py b/aiocraft/mc/proto/play/serverbound/packet_abilities.py index ad747d2..073c919 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_abilities.py +++ b/aiocraft/mc/proto/play/serverbound/packet_abilities.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketAbilities(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_advancement_tab.py b/aiocraft/mc/proto/play/serverbound/packet_advancement_tab.py index efba799..21d93f3 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_advancement_tab.py +++ b/aiocraft/mc/proto/play/serverbound/packet_advancement_tab.py @@ -2,17 +2,18 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketAdvancementTab(Packet): __slots__ = ( 'id', 'action', 'tabId' ) action : int - tabId : Union[str, None] + tabId : Union[None, str] def __init__(self, proto:int, action:int=None, - tabId:Union[str, None]=None, + tabId:Union[None, str]=None, **kwargs ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/serverbound/packet_arm_animation.py b/aiocraft/mc/proto/play/serverbound/packet_arm_animation.py index 75c9984..980c36b 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_arm_animation.py +++ b/aiocraft/mc/proto/play/serverbound/packet_arm_animation.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketArmAnimation(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_block_dig.py b/aiocraft/mc/proto/play/serverbound/packet_block_dig.py index 9bf04ea..2b472c1 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_block_dig.py +++ b/aiocraft/mc/proto/play/serverbound/packet_block_dig.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketBlockDig(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_block_place.py b/aiocraft/mc/proto/play/serverbound/packet_block_place.py index 218fa18..7ec3e66 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_block_place.py +++ b/aiocraft/mc/proto/play/serverbound/packet_block_place.py @@ -2,14 +2,15 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketBlockPlace(Packet): __slots__ = ( 'id', 'cursorX', 'cursorY', 'cursorZ', 'direction', 'hand', 'heldItem', 'insideBlock', 'location' ) - cursorX : Union[int,float] - cursorY : Union[int,float] - cursorZ : Union[int,float] + cursorX : Union[float,int] + cursorY : Union[float,int] + cursorZ : Union[float,int] direction : int hand : int heldItem : dict @@ -17,9 +18,9 @@ class PacketBlockPlace(Packet): location : tuple def __init__(self, proto:int, - cursorX:Union[int,float]=None, - cursorY:Union[int,float]=None, - cursorZ:Union[int,float]=None, + cursorX:Union[float,int]=None, + cursorY:Union[float,int]=None, + cursorZ:Union[float,int]=None, direction:int=None, hand:int=None, heldItem:dict=None, diff --git a/aiocraft/mc/proto/play/serverbound/packet_chat.py b/aiocraft/mc/proto/play/serverbound/packet_chat.py index d2ea647..6bde2f1 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_chat.py +++ b/aiocraft/mc/proto/play/serverbound/packet_chat.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketChat(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_client_command.py b/aiocraft/mc/proto/play/serverbound/packet_client_command.py index 296553c..b5d3e84 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_client_command.py +++ b/aiocraft/mc/proto/play/serverbound/packet_client_command.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketClientCommand(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_close_window.py b/aiocraft/mc/proto/play/serverbound/packet_close_window.py index 51d0930..82142ac 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_close_window.py +++ b/aiocraft/mc/proto/play/serverbound/packet_close_window.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCloseWindow(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_craft_recipe_request.py b/aiocraft/mc/proto/play/serverbound/packet_craft_recipe_request.py index 039a8d4..b262a1e 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_craft_recipe_request.py +++ b/aiocraft/mc/proto/play/serverbound/packet_craft_recipe_request.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCraftRecipeRequest(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_crafting_book_data.py b/aiocraft/mc/proto/play/serverbound/packet_crafting_book_data.py index b543632..6ff2696 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_crafting_book_data.py +++ b/aiocraft/mc/proto/play/serverbound/packet_crafting_book_data.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCraftingBookData(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_custom_payload.py b/aiocraft/mc/proto/play/serverbound/packet_custom_payload.py index 0bd64a0..359cd18 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_custom_payload.py +++ b/aiocraft/mc/proto/play/serverbound/packet_custom_payload.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketCustomPayload(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_displayed_recipe.py b/aiocraft/mc/proto/play/serverbound/packet_displayed_recipe.py index 3a3c4dd..7ca58b0 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_displayed_recipe.py +++ b/aiocraft/mc/proto/play/serverbound/packet_displayed_recipe.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketDisplayedRecipe(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_edit_book.py b/aiocraft/mc/proto/play/serverbound/packet_edit_book.py index d81d0d5..ac9777f 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_edit_book.py +++ b/aiocraft/mc/proto/play/serverbound/packet_edit_book.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEditBook(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_enchant_item.py b/aiocraft/mc/proto/play/serverbound/packet_enchant_item.py index 7fd240b..3c4f7f5 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_enchant_item.py +++ b/aiocraft/mc/proto/play/serverbound/packet_enchant_item.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEnchantItem(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_entity_action.py b/aiocraft/mc/proto/play/serverbound/packet_entity_action.py index 69bd855..07f76ef 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_entity_action.py +++ b/aiocraft/mc/proto/play/serverbound/packet_entity_action.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketEntityAction(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_flying.py b/aiocraft/mc/proto/play/serverbound/packet_flying.py index 49e67cd..92d8b16 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_flying.py +++ b/aiocraft/mc/proto/play/serverbound/packet_flying.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketFlying(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_generate_structure.py b/aiocraft/mc/proto/play/serverbound/packet_generate_structure.py index 7035932..fedbe2c 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_generate_structure.py +++ b/aiocraft/mc/proto/play/serverbound/packet_generate_structure.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketGenerateStructure(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_held_item_slot.py b/aiocraft/mc/proto/play/serverbound/packet_held_item_slot.py index 8b22978..bdc6f61 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_held_item_slot.py +++ b/aiocraft/mc/proto/play/serverbound/packet_held_item_slot.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketHeldItemSlot(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_keep_alive.py b/aiocraft/mc/proto/play/serverbound/packet_keep_alive.py index fdeda38..c6da89e 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_keep_alive.py +++ b/aiocraft/mc/proto/play/serverbound/packet_keep_alive.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketKeepAlive(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_lock_difficulty.py b/aiocraft/mc/proto/play/serverbound/packet_lock_difficulty.py index c2a2c69..2e7c725 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_lock_difficulty.py +++ b/aiocraft/mc/proto/play/serverbound/packet_lock_difficulty.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketLockDifficulty(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_look.py b/aiocraft/mc/proto/play/serverbound/packet_look.py index bc813bd..ad05694 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_look.py +++ b/aiocraft/mc/proto/play/serverbound/packet_look.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketLook(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_name_item.py b/aiocraft/mc/proto/play/serverbound/packet_name_item.py index 45cb6f4..f8fb311 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_name_item.py +++ b/aiocraft/mc/proto/play/serverbound/packet_name_item.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketNameItem(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_pick_item.py b/aiocraft/mc/proto/play/serverbound/packet_pick_item.py index dfd89de..fe0da34 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_pick_item.py +++ b/aiocraft/mc/proto/play/serverbound/packet_pick_item.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPickItem(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_pong.py b/aiocraft/mc/proto/play/serverbound/packet_pong.py index b30a7d8..5449980 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_pong.py +++ b/aiocraft/mc/proto/play/serverbound/packet_pong.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPong(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_position.py b/aiocraft/mc/proto/play/serverbound/packet_position.py index b98ce67..7a9ac23 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_position.py +++ b/aiocraft/mc/proto/play/serverbound/packet_position.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPosition(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_position_look.py b/aiocraft/mc/proto/play/serverbound/packet_position_look.py index c9ee31b..3ffca8e 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_position_look.py +++ b/aiocraft/mc/proto/play/serverbound/packet_position_look.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPositionLook(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_prepare_crafting_grid.py b/aiocraft/mc/proto/play/serverbound/packet_prepare_crafting_grid.py index 2892a57..5dfa1b6 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_prepare_crafting_grid.py +++ b/aiocraft/mc/proto/play/serverbound/packet_prepare_crafting_grid.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPrepareCraftingGrid(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_query_block_nbt.py b/aiocraft/mc/proto/play/serverbound/packet_query_block_nbt.py index 8dbfd0e..3eac1bd 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_query_block_nbt.py +++ b/aiocraft/mc/proto/play/serverbound/packet_query_block_nbt.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketQueryBlockNbt(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_query_entity_nbt.py b/aiocraft/mc/proto/play/serverbound/packet_query_entity_nbt.py index a2b210d..363f343 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_query_entity_nbt.py +++ b/aiocraft/mc/proto/play/serverbound/packet_query_entity_nbt.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketQueryEntityNbt(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_recipe_book.py b/aiocraft/mc/proto/play/serverbound/packet_recipe_book.py index ea62d59..25f407f 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_recipe_book.py +++ b/aiocraft/mc/proto/play/serverbound/packet_recipe_book.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketRecipeBook(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_resource_pack_receive.py b/aiocraft/mc/proto/play/serverbound/packet_resource_pack_receive.py index 032c128..5a4a123 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_resource_pack_receive.py +++ b/aiocraft/mc/proto/play/serverbound/packet_resource_pack_receive.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketResourcePackReceive(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_select_trade.py b/aiocraft/mc/proto/play/serverbound/packet_select_trade.py index ffcc95b..1536902 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_select_trade.py +++ b/aiocraft/mc/proto/play/serverbound/packet_select_trade.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSelectTrade(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_set_beacon_effect.py b/aiocraft/mc/proto/play/serverbound/packet_set_beacon_effect.py index 103b787..9a47a59 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_set_beacon_effect.py +++ b/aiocraft/mc/proto/play/serverbound/packet_set_beacon_effect.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetBeaconEffect(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_set_creative_slot.py b/aiocraft/mc/proto/play/serverbound/packet_set_creative_slot.py index 1a07adf..1fabf63 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_set_creative_slot.py +++ b/aiocraft/mc/proto/play/serverbound/packet_set_creative_slot.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetCreativeSlot(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_set_difficulty.py b/aiocraft/mc/proto/play/serverbound/packet_set_difficulty.py index e72ab97..2883ec4 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_set_difficulty.py +++ b/aiocraft/mc/proto/play/serverbound/packet_set_difficulty.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSetDifficulty(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_settings.py b/aiocraft/mc/proto/play/serverbound/packet_settings.py index 09b2c82..706fd87 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_settings.py +++ b/aiocraft/mc/proto/play/serverbound/packet_settings.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSettings(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_spectate.py b/aiocraft/mc/proto/play/serverbound/packet_spectate.py index 6fdbdd4..df25dea 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_spectate.py +++ b/aiocraft/mc/proto/play/serverbound/packet_spectate.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSpectate(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_steer_boat.py b/aiocraft/mc/proto/play/serverbound/packet_steer_boat.py index efe40d9..8c47508 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_steer_boat.py +++ b/aiocraft/mc/proto/play/serverbound/packet_steer_boat.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSteerBoat(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_steer_vehicle.py b/aiocraft/mc/proto/play/serverbound/packet_steer_vehicle.py index 15b47d3..0506e41 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_steer_vehicle.py +++ b/aiocraft/mc/proto/play/serverbound/packet_steer_vehicle.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketSteerVehicle(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_tab_complete.py b/aiocraft/mc/proto/play/serverbound/packet_tab_complete.py index fa01711..57dba11 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_tab_complete.py +++ b/aiocraft/mc/proto/play/serverbound/packet_tab_complete.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTabComplete(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_teleport_confirm.py b/aiocraft/mc/proto/play/serverbound/packet_teleport_confirm.py index 7080718..512af24 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_teleport_confirm.py +++ b/aiocraft/mc/proto/play/serverbound/packet_teleport_confirm.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTeleportConfirm(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_transaction.py b/aiocraft/mc/proto/play/serverbound/packet_transaction.py index 9f91d66..8f68efb 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_transaction.py +++ b/aiocraft/mc/proto/play/serverbound/packet_transaction.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketTransaction(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_update_command_block.py b/aiocraft/mc/proto/play/serverbound/packet_update_command_block.py index 00d69a9..5a42efb 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_command_block.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_command_block.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateCommandBlock(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_update_command_block_minecart.py b/aiocraft/mc/proto/play/serverbound/packet_update_command_block_minecart.py index 29ae264..7ee3b44 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_command_block_minecart.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_command_block_minecart.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateCommandBlockMinecart(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_update_jigsaw_block.py b/aiocraft/mc/proto/play/serverbound/packet_update_jigsaw_block.py index 758744b..77c1e81 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_jigsaw_block.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_jigsaw_block.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateJigsawBlock(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_update_sign.py b/aiocraft/mc/proto/play/serverbound/packet_update_sign.py index 82fe8e3..dacb098 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_sign.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_sign.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateSign(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_update_structure_block.py b/aiocraft/mc/proto/play/serverbound/packet_update_structure_block.py index d6fe7d5..c684c29 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_structure_block.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_structure_block.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUpdateStructureBlock(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_use_entity.py b/aiocraft/mc/proto/play/serverbound/packet_use_entity.py index 0ab1b15..014367e 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_use_entity.py +++ b/aiocraft/mc/proto/play/serverbound/packet_use_entity.py @@ -2,12 +2,13 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUseEntity(Packet): __slots__ = ( 'id', 'hand', 'mouse', 'sneaking', 'target', 'x', 'y', 'z' ) - hand : Union[int, None] + hand : Union[None, int] mouse : int sneaking : bool target : int @@ -16,7 +17,7 @@ class PacketUseEntity(Packet): z : Union[None, float] def __init__(self, proto:int, - hand:Union[int, None]=None, + hand:Union[None, int]=None, mouse:int=None, sneaking:bool=None, target:int=None, diff --git a/aiocraft/mc/proto/play/serverbound/packet_use_item.py b/aiocraft/mc/proto/play/serverbound/packet_use_item.py index 49a46e0..3e95181 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_use_item.py +++ b/aiocraft/mc/proto/play/serverbound/packet_use_item.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketUseItem(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_vehicle_move.py b/aiocraft/mc/proto/play/serverbound/packet_vehicle_move.py index 2d620c7..79696fd 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_vehicle_move.py +++ b/aiocraft/mc/proto/play/serverbound/packet_vehicle_move.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketVehicleMove(Packet): diff --git a/aiocraft/mc/proto/play/serverbound/packet_window_click.py b/aiocraft/mc/proto/play/serverbound/packet_window_click.py index e8f4146..ecb02a2 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_window_click.py +++ b/aiocraft/mc/proto/play/serverbound/packet_window_click.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketWindowClick(Packet): diff --git a/aiocraft/mc/proto/status/clientbound/packet_ping.py b/aiocraft/mc/proto/status/clientbound/packet_ping.py index 2e933be..1b65520 100644 --- a/aiocraft/mc/proto/status/clientbound/packet_ping.py +++ b/aiocraft/mc/proto/status/clientbound/packet_ping.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPing(Packet): diff --git a/aiocraft/mc/proto/status/clientbound/packet_server_info.py b/aiocraft/mc/proto/status/clientbound/packet_server_info.py index c61b310..e0e476c 100644 --- a/aiocraft/mc/proto/status/clientbound/packet_server_info.py +++ b/aiocraft/mc/proto/status/clientbound/packet_server_info.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketServerInfo(Packet): diff --git a/aiocraft/mc/proto/status/serverbound/packet_ping.py b/aiocraft/mc/proto/status/serverbound/packet_ping.py index 2e933be..1b65520 100644 --- a/aiocraft/mc/proto/status/serverbound/packet_ping.py +++ b/aiocraft/mc/proto/status/serverbound/packet_ping.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPing(Packet): diff --git a/aiocraft/mc/proto/status/serverbound/packet_ping_start.py b/aiocraft/mc/proto/status/serverbound/packet_ping_start.py index 226f257..c3cba3f 100644 --- a/aiocraft/mc/proto/status/serverbound/packet_ping_start.py +++ b/aiocraft/mc/proto/status/serverbound/packet_ping_start.py @@ -2,6 +2,7 @@ from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import * class PacketPingStart(Packet): diff --git a/compiler/proto.py b/compiler/proto.py index 2a338cb..bff7b4a 100644 --- a/compiler/proto.py +++ b/compiler/proto.py @@ -16,6 +16,7 @@ DIR_MAP = {"toClient": "clientbound", "toServer": "serverbound"} PREFACE = """\"\"\"[!] This file is autogenerated\"\"\"\n\n""" IMPORTS = """from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet +from ....definitions import * from ....types import *\n""" IMPORT_ALL = """__all__ = [\n\t{all}\n]\n""" REGISTRY_ENTRY = """ @@ -189,7 +190,7 @@ def mchint(slot_type:Any) -> Ref: possibilities.add(mchint(slot_type[1]['default'])) else: possibilities.add(Ref('None')) - return Ref(f'Union[{", ".join(str(s) for s in possibilities)}]') + return Ref(f'Union[{", ".join(str(s) for s in sorted(possibilities))}]') # elif t == "mapper": # ???? # return TrailingData logging.error("Unknown type %s, using 'bytes' as hint", str(slot_type)) @@ -199,7 +200,7 @@ def pytype(t:list) -> str: vals = set(str(x) for x in t) if len(vals) <= 1: return next(iter(vals)) - return 'Union[' + ','.join(x for x in vals) + ']' + return 'Union[' + ','.join(x for x in sorted(vals)) + ']' def snake_to_camel(name:str) -> str: return "".join(x.capitalize() for x in name.split("_"))