diff --git a/aiocraft/mc/definitions.py b/aiocraft/mc/definitions.py index f169d65..9fc23ae 100644 --- a/aiocraft/mc/definitions.py +++ b/aiocraft/mc/definitions.py @@ -3,6 +3,62 @@ from enum import Enum from dataclasses import dataclass from typing import Tuple +class ConnectionState(Enum): + NONE = -1 + HANDSHAKING = 0 + STATUS = 1 + LOGIN = 2 + PLAY = 3 + +class Dimension(Enum): + NETHER = -1 + OVERWORLD = 0 + END = 1 + +class Difficulty(Enum): + PEACEFUL = 0 + EASY = 1 + NORMAL = 2 + HARD = 3 + +class Gamemode(Enum): + SURVIVAL = 0 + CREATIVE = 1 + ADVENTURE = 2 + SPECTATOR = 3 + +class EnchantmentType(Enum): + protection = 0 + fire_protection = 1 + feather_falling = 2 + blast_protection = 3 + projectile_protection = 4 + respiration = 5 + aqua_affinity = 6 + thorns = 7 + depth_strider = 8 + frost_walker = 9 + binding_curse = 10 + sharpness = 16 + smite = 17 + bane_of_arthropods = 18 + knockback = 19 + fire_aspect = 20 + looting = 21 + sweeping = 22 + efficiency = 32 + silk_touch = 33 + unbreaking = 34 + fortune = 35 + power = 48 + punch = 49 + flame = 50 + infinity = 51 + luck_of_the_sea = 61 + lure = 62 + mending = 70 + vanishing_curse = 71 + @dataclass # TODO use the one from types class BlockPos: x : float @@ -45,7 +101,7 @@ class Item: nbt : dict damage : int # This got removed past 1.12.2 - def __init__(self, item:Item = None): + def __init__(self, item : 'Item' = None): if item: self.id = item.id self.count = item.count @@ -60,58 +116,20 @@ class Item: # TODO make a map of durability for each item and subtract damage? return self.damage -class Dimension(Enum): - NETHER = -1 - OVERWORLD = 0 - END = 1 +class Enchantment: + eid : int + type : EnchantmentType + level : int -class Difficulty(Enum): - PEACEFUL = 0 - EASY = 1 - NORMAL = 2 - HARD = 3 + def __init__(self, type:EnchantmentType=None, eid:int=None, level:int=1): + if not type and not eid: + raise ValueError("No enchantment type or enchantment id provided") + self.type = type or EnchantmentType(eid) + self.eid = self.type.value + self.level = level -class Gamemode(Enum): - SURVIVAL = 0 - CREATIVE = 1 - ADVENTURE = 2 - SPECTATOR = 3 + def repr(self) -> str: + return f"" -class Enchantments(Enum): - PROTECTION = 0 - FIRE_PROTECTION = 1 - FEATHER_FALLING = 2 - BLAST_PROTECTION = 3 - PROJECTILE_PROTECTION = 4 - RESPIRATION = 5 - AQUA_AFFINITY = 6 - THORNS = 7 - DEPTH_STRIDER = 8 - FROST_WALKER = 9 - BINDING_CURSE = 10 - SHARPNESS = 16 - SMITE = 17 - BANE_OF_ARTHROPODS = 18 - KNOCKBACK = 19 - FIRE_ASPECT = 20 - LOOTING = 21 - SWEEPING = 22 - EFFICIENCY = 32 - SILK_TOUCH = 33 - UNBREAKING = 34 - FORTUNE = 35 - POWER = 48 - PUNCH = 49 - FLAME = 50 - INFINITY = 51 - LUCK_OF_THE_SEA = 61 - LURE = 62 - MENDING = 70 - VANISHING_CURSE = 71 - -class ConnectionState(Enum): - NONE = -1 - HANDSHAKING = 0 - STATUS = 1 - LOGIN = 2 - PLAY = 3 + def __str__(self) -> str: + return f"{self.type.name}" + (f" {self.level}" if self.level > 1 else "") 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 b118248..8667da2 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 @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/handshaking/serverbound/packet_set_protocol.py b/aiocraft/mc/proto/handshaking/serverbound/packet_set_protocol.py index 6acb7dc..c30e79e 100644 --- a/aiocraft/mc/proto/handshaking/serverbound/packet_set_protocol.py +++ b/aiocraft/mc/proto/handshaking/serverbound/packet_set_protocol.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/login/clientbound/packet_compress.py b/aiocraft/mc/proto/login/clientbound/packet_compress.py index 8396a01..cf31891 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_compress.py +++ b/aiocraft/mc/proto/login/clientbound/packet_compress.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/login/clientbound/packet_disconnect.py b/aiocraft/mc/proto/login/clientbound/packet_disconnect.py index 289ddee..ec3b9e7 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_disconnect.py +++ b/aiocraft/mc/proto/login/clientbound/packet_disconnect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/login/clientbound/packet_encryption_begin.py b/aiocraft/mc/proto/login/clientbound/packet_encryption_begin.py index fee54b1..70fef1a 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_encryption_begin.py +++ b/aiocraft/mc/proto/login/clientbound/packet_encryption_begin.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 7c8fa39..647c769 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_login_plugin_request.py +++ b/aiocraft/mc/proto/login/clientbound/packet_login_plugin_request.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/login/clientbound/packet_success.py b/aiocraft/mc/proto/login/clientbound/packet_success.py index 63d0797..b4c8162 100644 --- a/aiocraft/mc/proto/login/clientbound/packet_success.py +++ b/aiocraft/mc/proto/login/clientbound/packet_success.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/login/serverbound/packet_encryption_begin.py b/aiocraft/mc/proto/login/serverbound/packet_encryption_begin.py index ea576ac..185d582 100644 --- a/aiocraft/mc/proto/login/serverbound/packet_encryption_begin.py +++ b/aiocraft/mc/proto/login/serverbound/packet_encryption_begin.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 6891caf..1eb32fb 100644 --- a/aiocraft/mc/proto/login/serverbound/packet_login_plugin_response.py +++ b/aiocraft/mc/proto/login/serverbound/packet_login_plugin_response.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/login/serverbound/packet_login_start.py b/aiocraft/mc/proto/login/serverbound/packet_login_start.py index c3a1ed7..66654ee 100644 --- a/aiocraft/mc/proto/login/serverbound/packet_login_start.py +++ b/aiocraft/mc/proto/login/serverbound/packet_login_start.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_abilities.py b/aiocraft/mc/proto/play/clientbound/packet_abilities.py index 9364bc0..445c71a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_abilities.py +++ b/aiocraft/mc/proto/play/clientbound/packet_abilities.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 9edc946..09cb5d0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_acknowledge_player_digging.py +++ b/aiocraft/mc/proto/play/clientbound/packet_acknowledge_player_digging.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_action_bar.py b/aiocraft/mc/proto/play/clientbound/packet_action_bar.py index 469966c..d84c46f 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_action_bar.py +++ b/aiocraft/mc/proto/play/clientbound/packet_action_bar.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_advancement_progress.py b/aiocraft/mc/proto/play/clientbound/packet_advancement_progress.py index 932aa5d..85c08df 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_advancement_progress.py +++ b/aiocraft/mc/proto/play/clientbound/packet_advancement_progress.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_advancements.py b/aiocraft/mc/proto/play/clientbound/packet_advancements.py index 9eacabb..fbb9c72 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_advancements.py +++ b/aiocraft/mc/proto/play/clientbound/packet_advancements.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_animation.py b/aiocraft/mc/proto/play/clientbound/packet_animation.py index 60e829d..b3e777e 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_animation.py +++ b/aiocraft/mc/proto/play/clientbound/packet_animation.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_attach_entity.py b/aiocraft/mc/proto/play/clientbound/packet_attach_entity.py index 71b44fa..6af5d57 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_attach_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_attach_entity.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_bed.py b/aiocraft/mc/proto/play/clientbound/packet_bed.py index f417e75..589560d 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_bed.py +++ b/aiocraft/mc/proto/play/clientbound/packet_bed.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_block_action.py b/aiocraft/mc/proto/play/clientbound/packet_block_action.py index 9817e80..b905e45 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_block_action.py +++ b/aiocraft/mc/proto/play/clientbound/packet_block_action.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 18be35f..4de9ab7 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_block_break_animation.py +++ b/aiocraft/mc/proto/play/clientbound/packet_block_break_animation.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_block_change.py b/aiocraft/mc/proto/play/clientbound/packet_block_change.py index 949c0c4..7aa6e99 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_block_change.py +++ b/aiocraft/mc/proto/play/clientbound/packet_block_change.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_boss_bar.py b/aiocraft/mc/proto/play/clientbound/packet_boss_bar.py index 9879ced..099167d 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_boss_bar.py +++ b/aiocraft/mc/proto/play/clientbound/packet_boss_bar.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,21 +8,21 @@ class PacketBossBar(Packet): __slots__ = ( 'id', 'action', 'color', 'dividers', 'entityUUID', 'flags', 'health', 'title' ) action : int - color : bytes - dividers : bytes + color : Union[None, int] + dividers : Union[None, int] entityUUID : str - flags : bytes - health : bytes - title : bytes + flags : Union[None, int] + health : Union[float, None] + title : Union[str, None] def __init__(self, proto:int, action:int=None, - color:bytes=None, - dividers:bytes=None, + color:Union[None, int]=None, + dividers:Union[None, int]=None, entityUUID:str=None, - flags:bytes=None, - health:bytes=None, - title:bytes=None + flags:Union[None, int]=None, + health:Union[float, None]=None, + title:Union[str, None]=None ): super().__init__(proto, action=action, diff --git a/aiocraft/mc/proto/play/clientbound/packet_camera.py b/aiocraft/mc/proto/play/clientbound/packet_camera.py index 6b1f552..7c322bf 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_camera.py +++ b/aiocraft/mc/proto/play/clientbound/packet_camera.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_chat.py b/aiocraft/mc/proto/play/clientbound/packet_chat.py index 30af4fe..9a02654 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_chat.py +++ b/aiocraft/mc/proto/play/clientbound/packet_chat.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_clear_titles.py b/aiocraft/mc/proto/play/clientbound/packet_clear_titles.py index 2018296..52f6b2e 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_clear_titles.py +++ b/aiocraft/mc/proto/play/clientbound/packet_clear_titles.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_close_window.py b/aiocraft/mc/proto/play/clientbound/packet_close_window.py index acbb7d9..a6a62d6 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_close_window.py +++ b/aiocraft/mc/proto/play/clientbound/packet_close_window.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_collect.py b/aiocraft/mc/proto/play/clientbound/packet_collect.py index c7599fa..2c455a3 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_collect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_collect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_combat_event.py b/aiocraft/mc/proto/play/clientbound/packet_combat_event.py index 0cfcef6..1924832 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_combat_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_combat_event.py @@ -1,24 +1,24 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketCombatEvent(Packet): __slots__ = ( 'id', 'duration', 'entityId', 'event', 'message', 'playerId' ) - duration : bytes - entityId : bytes + duration : Union[None, int] + entityId : Union[None, int] event : int - message : bytes - playerId : bytes + message : Union[str, None] + playerId : Union[None, int] def __init__(self, proto:int, - duration:bytes=None, - entityId:bytes=None, + duration:Union[None, int]=None, + entityId:Union[None, int]=None, event:int=None, - message:bytes=None, - playerId:bytes=None + message:Union[str, None]=None, + playerId:Union[None, int]=None ): super().__init__(proto, duration=duration, 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 21d3913..8cecb84 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_craft_progress_bar.py +++ b/aiocraft/mc/proto/play/clientbound/packet_craft_progress_bar.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 4a2a56b..4ec9267 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_craft_recipe_response.py +++ b/aiocraft/mc/proto/play/clientbound/packet_craft_recipe_response.py @@ -1,17 +1,17 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketCraftRecipeResponse(Packet): __slots__ = ( 'id', 'recipe', 'windowId' ) - recipe : Union[int,str] + recipe : Union[str,int] windowId : int def __init__(self, proto:int, - recipe:Union[int,str]=None, + recipe:Union[str,int]=None, windowId:int=None ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_custom_payload.py b/aiocraft/mc/proto/play/clientbound/packet_custom_payload.py index ef8abeb..dcc206e 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_custom_payload.py +++ b/aiocraft/mc/proto/play/clientbound/packet_custom_payload.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 f7a8ae8..be8a331 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_death_combat_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_death_combat_event.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_declare_commands.py b/aiocraft/mc/proto/play/clientbound/packet_declare_commands.py index 9aa1ad3..1430b17 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_declare_commands.py +++ b/aiocraft/mc/proto/play/clientbound/packet_declare_commands.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_declare_recipes.py b/aiocraft/mc/proto/play/clientbound/packet_declare_recipes.py index 6e5762d..548d2f6 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_declare_recipes.py +++ b/aiocraft/mc/proto/play/clientbound/packet_declare_recipes.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_destroy_entity.py b/aiocraft/mc/proto/play/clientbound/packet_destroy_entity.py index 3024acd..4fc1f5c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_destroy_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_destroy_entity.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_difficulty.py b/aiocraft/mc/proto/play/clientbound/packet_difficulty.py index d5b21d3..3228cc8 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_difficulty.py +++ b/aiocraft/mc/proto/play/clientbound/packet_difficulty.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 6ce46bd..6d489e5 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_end_combat_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_end_combat_event.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 ec6ca74..d056767 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_enter_combat_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_enter_combat_event.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity.py b/aiocraft/mc/proto/play/clientbound/packet_entity.py index b59bf38..3331daa 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_destroy.py b/aiocraft/mc/proto/play/clientbound/packet_entity_destroy.py index b5cdf88..86d7ebe 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_destroy.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_destroy.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_effect.py b/aiocraft/mc/proto/play/clientbound/packet_entity_effect.py index c6430e6..b331b0a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_effect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -11,14 +11,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 ): super().__init__(proto, amplifier=amplifier, diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_equipment.py b/aiocraft/mc/proto/play/clientbound/packet_entity_equipment.py index c8a7236..c683a92 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_equipment.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_equipment.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 4bd9b2b..4111aae 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_head_rotation.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_head_rotation.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_look.py b/aiocraft/mc/proto/play/clientbound/packet_entity_look.py index 57ea66b..f331d78 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_look.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_look.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_metadata.py b/aiocraft/mc/proto/play/clientbound/packet_entity_metadata.py index dfa71a7..10cb991 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_metadata.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_metadata.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 c03ece0..ad01317 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_move_look.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_move_look.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 4e6aaea..1b56862 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_sound_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_sound_effect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_status.py b/aiocraft/mc/proto/play/clientbound/packet_entity_status.py index 410d05d..4013628 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_status.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_status.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_teleport.py b/aiocraft/mc/proto/play/clientbound/packet_entity_teleport.py index 26c977a..e90e983 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_teleport.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_teleport.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 60b630f..2564661 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_update_attributes.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_update_attributes.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_entity_velocity.py b/aiocraft/mc/proto/play/clientbound/packet_entity_velocity.py index e3e1551..de7e24e 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_entity_velocity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_entity_velocity.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_experience.py b/aiocraft/mc/proto/play/clientbound/packet_experience.py index 40e0e88..2659642 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_experience.py +++ b/aiocraft/mc/proto/play/clientbound/packet_experience.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_explosion.py b/aiocraft/mc/proto/play/clientbound/packet_explosion.py index e9bc9bd..e54d456 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_explosion.py +++ b/aiocraft/mc/proto/play/clientbound/packet_explosion.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_face_player.py b/aiocraft/mc/proto/play/clientbound/packet_face_player.py index fff361d..08f0e42 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_face_player.py +++ b/aiocraft/mc/proto/play/clientbound/packet_face_player.py @@ -1,14 +1,14 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketFacePlayer(Packet): __slots__ = ( 'id', 'entityId', 'entity_feet_eyes', 'feet_eyes', 'isEntity', 'x', 'y', 'z' ) - entityId : bytes - entity_feet_eyes : bytes + entityId : Union[None, int] + entity_feet_eyes : Union[str, None] feet_eyes : int isEntity : bool x : float @@ -16,8 +16,8 @@ class PacketFacePlayer(Packet): z : float def __init__(self, proto:int, - entityId:bytes=None, - entity_feet_eyes:bytes=None, + entityId:Union[None, int]=None, + entity_feet_eyes:Union[str, None]=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 b903763..dca4988 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_game_state_change.py +++ b/aiocraft/mc/proto/play/clientbound/packet_game_state_change.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 c565c8b..0524277 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_held_item_slot.py +++ b/aiocraft/mc/proto/play/clientbound/packet_held_item_slot.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 c10ebbd..a3c97cd 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_initialize_world_border.py +++ b/aiocraft/mc/proto/play/clientbound/packet_initialize_world_border.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_keep_alive.py b/aiocraft/mc/proto/play/clientbound/packet_keep_alive.py index 3c2e3e4..cb8cf57 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_keep_alive.py +++ b/aiocraft/mc/proto/play/clientbound/packet_keep_alive.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_kick_disconnect.py b/aiocraft/mc/proto/play/clientbound/packet_kick_disconnect.py index 5e06df1..d6bf93d 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_kick_disconnect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_kick_disconnect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_login.py b/aiocraft/mc/proto/play/clientbound/packet_login.py index a04bd60..d631f5b 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_login.py +++ b/aiocraft/mc/proto/play/clientbound/packet_login.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,8 +8,8 @@ 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,bytes,str] - dimensionCodec : bytes + dimension : Union[dict,str,int] + dimensionCodec : dict enableRespawnScreen : bool entityId : int gameMode : int @@ -28,8 +28,8 @@ class PacketLogin(Packet): def __init__(self, proto:int, difficulty:int=None, - dimension:Union[int,bytes,str]=None, - dimensionCodec:bytes=None, + dimension:Union[dict,str,int]=None, + dimensionCodec:dict=None, enableRespawnScreen:bool=None, entityId:int=None, gameMode:int=None, diff --git a/aiocraft/mc/proto/play/clientbound/packet_map.py b/aiocraft/mc/proto/play/clientbound/packet_map.py index b201954..79d8adc 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_map.py +++ b/aiocraft/mc/proto/play/clientbound/packet_map.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,27 +8,27 @@ class PacketMap(Packet): __slots__ = ( 'id', 'columns', 'data', 'icons', 'itemDamage', 'locked', 'rows', 'scale', 'trackingPosition', 'x', 'y' ) columns : int - data : bytes + data : Union[None, bytes] icons : Union[tuple,list] itemDamage : int locked : bool - rows : bytes + rows : Union[None, int] scale : int trackingPosition : bool - x : bytes - y : bytes + x : Union[None, int] + y : Union[None, int] def __init__(self, proto:int, columns:int=None, - data:bytes=None, + data:Union[None, bytes]=None, icons:Union[tuple,list]=None, itemDamage:int=None, locked:bool=None, - rows:bytes=None, + rows:Union[None, int]=None, scale:int=None, trackingPosition:bool=None, - x:bytes=None, - y:bytes=None + x:Union[None, int]=None, + y:Union[None, int]=None ): super().__init__(proto, columns=columns, diff --git a/aiocraft/mc/proto/play/clientbound/packet_map_chunk.py b/aiocraft/mc/proto/play/clientbound/packet_map_chunk.py index fc11111..a4daaf6 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_map_chunk.py +++ b/aiocraft/mc/proto/play/clientbound/packet_map_chunk.py @@ -1,13 +1,13 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet 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[bytes,list] + biomes : Union[Union[None, list],list] bitMap : Union[int,list] blockEntities : list blockLight : list @@ -16,7 +16,7 @@ class PacketMapChunk(Packet): emptyBlockLightMask : list emptySkyLightMask : list groundUp : bool - heightmaps : bytes + heightmaps : dict ignoreOldData : bool skyLight : list skyLightMask : list @@ -25,7 +25,7 @@ class PacketMapChunk(Packet): z : int def __init__(self, proto:int, - biomes:Union[bytes,list]=None, + biomes:Union[Union[None, list],list]=None, bitMap:Union[int,list]=None, blockEntities:list=None, blockLight:list=None, @@ -34,7 +34,7 @@ class PacketMapChunk(Packet): emptyBlockLightMask:list=None, emptySkyLightMask:list=None, groundUp:bool=None, - heightmaps:bytes=None, + heightmaps:dict=None, ignoreOldData:bool=None, skyLight:list=None, skyLightMask: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 3b5ef2b..bb0010d 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_map_chunk_bulk.py +++ b/aiocraft/mc/proto/play/clientbound/packet_map_chunk_bulk.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 4eaa373..7fe614a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py +++ b/aiocraft/mc/proto/play/clientbound/packet_multi_block_change.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 a018349..bc751df 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_named_entity_spawn.py +++ b/aiocraft/mc/proto/play/clientbound/packet_named_entity_spawn.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 0dcba0e..276d780 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_named_sound_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_named_sound_effect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 5c979ed..034d9ec 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_nbt_query_response.py +++ b/aiocraft/mc/proto/play/clientbound/packet_nbt_query_response.py @@ -1,17 +1,17 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketNbtQueryResponse(Packet): __slots__ = ( 'id', 'nbt', 'transactionId' ) - nbt : bytes + nbt : Optional[dict] transactionId : int def __init__(self, proto:int, - nbt:bytes=None, + nbt:Optional[dict]=None, transactionId:int=None ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_open_book.py b/aiocraft/mc/proto/play/clientbound/packet_open_book.py index 4d68597..86b10dd 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_open_book.py +++ b/aiocraft/mc/proto/play/clientbound/packet_open_book.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 d082e11..fcc94db 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_open_horse_window.py +++ b/aiocraft/mc/proto/play/clientbound/packet_open_horse_window.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 d55260b..d7fbe53 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_open_sign_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_open_sign_entity.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_open_window.py b/aiocraft/mc/proto/play/clientbound/packet_open_window.py index 94a373c..ec72713 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_open_window.py +++ b/aiocraft/mc/proto/play/clientbound/packet_open_window.py @@ -1,21 +1,21 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketOpenWindow(Packet): __slots__ = ( 'id', 'entityId', 'inventoryType', 'slotCount', 'windowId', 'windowTitle' ) - entityId : bytes - inventoryType : Union[int,str] + entityId : Union[None, int] + inventoryType : Union[str,int] slotCount : int windowId : int windowTitle : str def __init__(self, proto:int, - entityId:bytes=None, - inventoryType:Union[int,str]=None, + entityId:Union[None, int]=None, + inventoryType:Union[str,int]=None, slotCount:int=None, windowId:int=None, windowTitle:str=None diff --git a/aiocraft/mc/proto/play/clientbound/packet_ping.py b/aiocraft/mc/proto/play/clientbound/packet_ping.py index c973024..b82e0ff 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_ping.py +++ b/aiocraft/mc/proto/play/clientbound/packet_ping.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_player_info.py b/aiocraft/mc/proto/play/clientbound/packet_player_info.py index 52f067b..69932e4 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_player_info.py +++ b/aiocraft/mc/proto/play/clientbound/packet_player_info.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_playerlist_header.py b/aiocraft/mc/proto/play/clientbound/packet_playerlist_header.py index ce075d7..910e394 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_playerlist_header.py +++ b/aiocraft/mc/proto/play/clientbound/packet_playerlist_header.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_position.py b/aiocraft/mc/proto/play/clientbound/packet_position.py index d26150a..303d9d3 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_position.py +++ b/aiocraft/mc/proto/play/clientbound/packet_position.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 137343f..93b9dd5 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_rel_entity_move.py +++ b/aiocraft/mc/proto/play/clientbound/packet_rel_entity_move.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 f31e225..67fcfb6 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_remove_entity_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_remove_entity_effect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 8d1fc82..2cf0db0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_resource_pack_send.py +++ b/aiocraft/mc/proto/play/clientbound/packet_resource_pack_send.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_respawn.py b/aiocraft/mc/proto/play/clientbound/packet_respawn.py index dca8b34..ca381b4 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_respawn.py +++ b/aiocraft/mc/proto/play/clientbound/packet_respawn.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -9,7 +9,7 @@ class PacketRespawn(Packet): copyMetadata : bool difficulty : int - dimension : Union[int,bytes,str] + dimension : Union[dict,str,int] gamemode : int hashedSeed : int isDebug : bool @@ -21,7 +21,7 @@ class PacketRespawn(Packet): def __init__(self, proto:int, copyMetadata:bool=None, difficulty:int=None, - dimension:Union[int,bytes,str]=None, + dimension:Union[dict,str,int]=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 4e791df..bd19677 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_display_objective.py +++ b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_display_objective.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_objective.py b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_objective.py index 0589ce8..4c84876 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_objective.py +++ b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_objective.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,15 +8,15 @@ class PacketScoreboardObjective(Packet): __slots__ = ( 'id', 'action', 'displayText', 'name', 'type' ) action : int - displayText : bytes + displayText : Union[str, None] name : str - type : bytes + type : Union[Union[str, None],Union[None, int]] def __init__(self, proto:int, action:int=None, - displayText:bytes=None, + displayText:Union[str, None]=None, name:str=None, - type:bytes=None + type:Union[Union[str, None],Union[None, int]]=None ): super().__init__(proto, action=action, diff --git a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_score.py b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_score.py index 3f2c2dd..874ee01 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_score.py +++ b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_score.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -10,13 +10,13 @@ class PacketScoreboardScore(Packet): action : int itemName : str scoreName : str - value : bytes + value : Union[None, int] def __init__(self, proto:int, action:int=None, itemName:str=None, scoreName:str=None, - value:bytes=None + value:Union[None, int]=None ): super().__init__(proto, action=action, diff --git a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_team.py b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_team.py index 60ddbb6..c1017e0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_scoreboard_team.py +++ b/aiocraft/mc/proto/play/clientbound/packet_scoreboard_team.py @@ -1,33 +1,33 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketScoreboardTeam(Packet): __slots__ = ( 'id', 'collisionRule', 'color', 'friendlyFire', 'mode', 'name', 'nameTagVisibility', 'players', 'prefix', 'suffix', 'team' ) - collisionRule : bytes - color : bytes - friendlyFire : bytes + collisionRule : Union[str, None] + color : Union[None, int] + friendlyFire : Union[None, int] mode : int - name : bytes - nameTagVisibility : bytes - players : bytes - prefix : bytes - suffix : bytes + name : Union[str, None] + nameTagVisibility : Union[str, None] + players : Union[None, list] + prefix : Union[str, None] + suffix : Union[str, None] team : str def __init__(self, proto:int, - collisionRule:bytes=None, - color:bytes=None, - friendlyFire:bytes=None, + collisionRule:Union[str, None]=None, + color:Union[None, int]=None, + friendlyFire:Union[None, int]=None, mode:int=None, - name:bytes=None, - nameTagVisibility:bytes=None, - players:bytes=None, - prefix:bytes=None, - suffix:bytes=None, + name:Union[str, None]=None, + nameTagVisibility:Union[str, None]=None, + players:Union[None, list]=None, + prefix:Union[str, None]=None, + suffix:Union[str, None]=None, team:str=None ): super().__init__(proto, 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 e698880..05983e7 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_sculk_vibration_signal.py +++ b/aiocraft/mc/proto/play/clientbound/packet_sculk_vibration_signal.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,13 +8,13 @@ class PacketSculkVibrationSignal(Packet): __slots__ = ( 'id', 'arrivalTicks', 'destination', 'destinationIdentifier', 'sourcePosition' ) arrivalTicks : int - destination : bytes + destination : Union[None, int, tuple] destinationIdentifier : str sourcePosition : tuple def __init__(self, proto:int, arrivalTicks:int=None, - destination:bytes=None, + destination:Union[None, int, tuple]=None, destinationIdentifier:str=None, sourcePosition:tuple=None ): 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 f45e4a0..6af6aa7 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_select_advancement_tab.py +++ b/aiocraft/mc/proto/play/clientbound/packet_select_advancement_tab.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_compression.py b/aiocraft/mc/proto/play/clientbound/packet_set_compression.py index 1738551..7af250b 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_compression.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_compression.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_cooldown.py b/aiocraft/mc/proto/play/clientbound/packet_set_cooldown.py index fd0be84..8a82389 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_cooldown.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_cooldown.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_passengers.py b/aiocraft/mc/proto/play/clientbound/packet_set_passengers.py index 18e5ad7..43974d1 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_passengers.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_passengers.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_set_slot.py b/aiocraft/mc/proto/play/clientbound/packet_set_slot.py index 3c77a99..ae97f73 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_slot.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_slot.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 482f3aa..00df45b 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_title_subtitle.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_title_subtitle.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 4f98a0a..c57a52c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_title_text.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_title_text.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 41b7b66..994cb50 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_set_title_time.py +++ b/aiocraft/mc/proto/play/clientbound/packet_set_title_time.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_simulation_distance.py b/aiocraft/mc/proto/play/clientbound/packet_simulation_distance.py index 8a4d52c..3a7ffdb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_simulation_distance.py +++ b/aiocraft/mc/proto/play/clientbound/packet_simulation_distance.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_sound_effect.py b/aiocraft/mc/proto/play/clientbound/packet_sound_effect.py index d51546f..3de0033 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_sound_effect.py +++ b/aiocraft/mc/proto/play/clientbound/packet_sound_effect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity.py b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity.py index 2e535f9..df96ffb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -9,7 +9,7 @@ class PacketSpawnEntity(Packet): entityId : int entityUUID : str - objectData : Union[int,dict] + objectData : Union[dict,int] objectUUID : str pitch : int type : int @@ -24,7 +24,7 @@ class PacketSpawnEntity(Packet): 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, 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 5715106..afabbbf 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 @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 f7c65ba..6f7c4fb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_living.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_living.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 324207f..95a046f 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_painting.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_painting.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -11,14 +11,14 @@ class PacketSpawnEntityPainting(Packet): entityId : int entityUUID : str location : tuple - title : Union[int,str] + title : Union[str,int] def __init__(self, proto:int, direction:int=None, entityId:int=None, entityUUID:str=None, location:tuple=None, - title:Union[int,str]=None + title:Union[str,int]=None ): super().__init__(proto, direction=direction, 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 c725e82..d7b88bb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_weather.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_entity_weather.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_spawn_position.py b/aiocraft/mc/proto/play/clientbound/packet_spawn_position.py index 6b53ff0..f2ef9bb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_spawn_position.py +++ b/aiocraft/mc/proto/play/clientbound/packet_spawn_position.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_statistics.py b/aiocraft/mc/proto/play/clientbound/packet_statistics.py index 90b41ae..f27a3d3 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_statistics.py +++ b/aiocraft/mc/proto/play/clientbound/packet_statistics.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_stop_sound.py b/aiocraft/mc/proto/play/clientbound/packet_stop_sound.py index ba9c79b..690da60 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_stop_sound.py +++ b/aiocraft/mc/proto/play/clientbound/packet_stop_sound.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,13 +8,13 @@ class PacketStopSound(Packet): __slots__ = ( 'id', 'flags', 'sound', 'source' ) flags : int - sound : bytes - source : bytes + sound : Union[str, None] + source : Union[None, int] def __init__(self, proto:int, flags:int=None, - sound:bytes=None, - source:bytes=None + sound:Union[str, None]=None, + source:Union[None, int]=None ): super().__init__(proto, flags=flags, diff --git a/aiocraft/mc/proto/play/clientbound/packet_tab_complete.py b/aiocraft/mc/proto/play/clientbound/packet_tab_complete.py index beaac25..03ddd91 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_tab_complete.py +++ b/aiocraft/mc/proto/play/clientbound/packet_tab_complete.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_tags.py b/aiocraft/mc/proto/play/clientbound/packet_tags.py index 54fabdb..88896b8 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_tags.py +++ b/aiocraft/mc/proto/play/clientbound/packet_tags.py @@ -1,23 +1,23 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketTags(Packet): __slots__ = ( 'id', 'blockTags', 'entityTags', 'fluidTags', 'itemTags', 'tags' ) - blockTags : bytes - entityTags : bytes - fluidTags : bytes - itemTags : bytes + blockTags : list + entityTags : list + fluidTags : list + itemTags : list tags : list def __init__(self, proto:int, - blockTags:bytes=None, - entityTags:bytes=None, - fluidTags:bytes=None, - itemTags:bytes=None, + blockTags:list=None, + entityTags:list=None, + fluidTags:list=None, + itemTags:list=None, tags:list=None ): super().__init__(proto, diff --git a/aiocraft/mc/proto/play/clientbound/packet_teams.py b/aiocraft/mc/proto/play/clientbound/packet_teams.py index 7ce1304..8420dfb 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_teams.py +++ b/aiocraft/mc/proto/play/clientbound/packet_teams.py @@ -1,35 +1,35 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketTeams(Packet): __slots__ = ( 'id', 'collisionRule', 'color', 'formatting', 'friendlyFire', 'mode', 'name', 'nameTagVisibility', 'players', 'prefix', 'suffix', 'team' ) - collisionRule : bytes - color : bytes - formatting : bytes - friendlyFire : bytes + collisionRule : Union[str, None] + color : Union[None, int] + formatting : Union[None, int] + friendlyFire : Union[None, int] mode : int - name : bytes - nameTagVisibility : bytes - players : bytes - prefix : bytes - suffix : bytes + name : Union[str, None] + nameTagVisibility : Union[str, None] + players : Union[None, list] + prefix : Union[str, None] + suffix : Union[str, None] team : str def __init__(self, proto:int, - collisionRule:bytes=None, - color:bytes=None, - formatting:bytes=None, - friendlyFire:bytes=None, + collisionRule:Union[str, None]=None, + color:Union[None, int]=None, + formatting:Union[None, int]=None, + friendlyFire:Union[None, int]=None, mode:int=None, - name:bytes=None, - nameTagVisibility:bytes=None, - players:bytes=None, - prefix:bytes=None, - suffix:bytes=None, + name:Union[str, None]=None, + nameTagVisibility:Union[str, None]=None, + players:Union[None, list]=None, + prefix:Union[str, None]=None, + suffix:Union[str, None]=None, team:str=None ): super().__init__(proto, 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 cc55865..0b8de11 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_tile_entity_data.py +++ b/aiocraft/mc/proto/play/clientbound/packet_tile_entity_data.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -9,12 +9,12 @@ class PacketTileEntityData(Packet): action : int location : tuple - nbtData : bytes + nbtData : Optional[dict] def __init__(self, proto:int, action:int=None, location:tuple=None, - nbtData:bytes=None + nbtData:Optional[dict]=None ): super().__init__(proto, action=action, diff --git a/aiocraft/mc/proto/play/clientbound/packet_title.py b/aiocraft/mc/proto/play/clientbound/packet_title.py index b82449d..f1dfe4c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_title.py +++ b/aiocraft/mc/proto/play/clientbound/packet_title.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,17 +8,17 @@ class PacketTitle(Packet): __slots__ = ( 'id', 'action', 'fadeIn', 'fadeOut', 'stay', 'text' ) action : int - fadeIn : bytes - fadeOut : bytes - stay : bytes - text : bytes + fadeIn : Union[None, int] + fadeOut : Union[None, int] + stay : Union[None, int] + text : Union[str, None] def __init__(self, proto:int, action:int=None, - fadeIn:bytes=None, - fadeOut:bytes=None, - stay:bytes=None, - text:bytes=None + fadeIn:Union[None, int]=None, + fadeOut:Union[None, int]=None, + stay:Union[None, int]=None, + text:Union[str, None]=None ): super().__init__(proto, action=action, diff --git a/aiocraft/mc/proto/play/clientbound/packet_trade_list.py b/aiocraft/mc/proto/play/clientbound/packet_trade_list.py index 5f8999b..874ca6a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_trade_list.py +++ b/aiocraft/mc/proto/play/clientbound/packet_trade_list.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_transaction.py b/aiocraft/mc/proto/play/clientbound/packet_transaction.py index a6d829a..7ed3831 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_transaction.py +++ b/aiocraft/mc/proto/play/clientbound/packet_transaction.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_unload_chunk.py b/aiocraft/mc/proto/play/clientbound/packet_unload_chunk.py index 6899606..aac0b59 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_unload_chunk.py +++ b/aiocraft/mc/proto/play/clientbound/packet_unload_chunk.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_unlock_recipes.py b/aiocraft/mc/proto/play/clientbound/packet_unlock_recipes.py index f1e253c..5c22ef7 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_unlock_recipes.py +++ b/aiocraft/mc/proto/play/clientbound/packet_unlock_recipes.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -17,7 +17,7 @@ class PacketUnlockRecipes(Packet): notification : bool recipes : list recipes1 : list - recipes2 : Union[bytes,list] + recipes2 : Union[Union[None, list],list] smeltingBookOpen : bool smokerBookOpen : bool @@ -32,7 +32,7 @@ class PacketUnlockRecipes(Packet): notification:bool=None, recipes:list=None, recipes1:list=None, - recipes2:Union[bytes,list]=None, + recipes2:Union[Union[None, list],list]=None, smeltingBookOpen:bool=None, smokerBookOpen:bool=None ): diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_attributes.py b/aiocraft/mc/proto/play/clientbound/packet_update_attributes.py index 4ecc894..492ed68 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_attributes.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_attributes.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 2158e41..ffe680c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_entity_nbt.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_entity_nbt.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,11 +8,11 @@ class PacketUpdateEntityNbt(Packet): __slots__ = ( 'id', 'entityId', 'tag' ) entityId : int - tag : bytes + tag : dict def __init__(self, proto:int, entityId:int=None, - tag:bytes=None + tag:dict=None ): super().__init__(proto, entityId=entityId, diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_health.py b/aiocraft/mc/proto/play/clientbound/packet_update_health.py index e6011e2..5056f8a 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_health.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_health.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_light.py b/aiocraft/mc/proto/play/clientbound/packet_update_light.py index e17b747..2885e9b 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_light.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_light.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_sign.py b/aiocraft/mc/proto/play/clientbound/packet_update_sign.py index dc9a001..ac6accd 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_sign.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_sign.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_update_time.py b/aiocraft/mc/proto/play/clientbound/packet_update_time.py index dca1b42..847783f 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_time.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_time.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 77d49df..ea2a61c 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_view_distance.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_view_distance.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 abfa973..4827742 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_update_view_position.py +++ b/aiocraft/mc/proto/play/clientbound/packet_update_view_position.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_vehicle_move.py b/aiocraft/mc/proto/play/clientbound/packet_vehicle_move.py index fd108b7..ba2bbf3 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_vehicle_move.py +++ b/aiocraft/mc/proto/play/clientbound/packet_vehicle_move.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_window_items.py b/aiocraft/mc/proto/play/clientbound/packet_window_items.py index 5a9ec94..ee3c44f 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_window_items.py +++ b/aiocraft/mc/proto/play/clientbound/packet_window_items.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_border.py b/aiocraft/mc/proto/play/clientbound/packet_world_border.py index ca4bff7..f125bf7 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,27 +8,27 @@ class PacketWorldBorder(Packet): __slots__ = ( 'id', 'action', 'new_radius', 'old_radius', 'portalBoundary', 'radius', 'speed', 'warning_blocks', 'warning_time', 'x', 'z' ) action : int - new_radius : bytes - old_radius : bytes - portalBoundary : bytes - radius : bytes - speed : bytes - warning_blocks : bytes - warning_time : bytes - x : bytes - z : bytes + new_radius : Union[float, None] + old_radius : Union[float, None] + portalBoundary : Union[None, int] + radius : Union[float, None] + speed : Union[None, int] + warning_blocks : Union[None, int] + warning_time : Union[None, int] + x : Union[float, None] + z : Union[float, None] def __init__(self, proto:int, action:int=None, - new_radius:bytes=None, - old_radius:bytes=None, - portalBoundary:bytes=None, - radius:bytes=None, - speed:bytes=None, - warning_blocks:bytes=None, - warning_time:bytes=None, - x:bytes=None, - z:bytes=None + new_radius:Union[float, None]=None, + old_radius:Union[float, None]=None, + portalBoundary:Union[None, int]=None, + radius:Union[float, None]=None, + speed:Union[None, int]=None, + warning_blocks:Union[None, int]=None, + warning_time:Union[None, int]=None, + x:Union[float, None]=None, + z:Union[float, None]=None ): super().__init__(proto, action=action, 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 50f74e9..f9d6f68 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border_center.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border_center.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 1f180dd..6e04f01 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 @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 c0c078c..dd97df0 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_border_size.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_border_size.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 a5ed4a6..f706a8d 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 @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 b0caaba..94dee25 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 @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_event.py b/aiocraft/mc/proto/play/clientbound/packet_world_event.py index f7eff96..5243cc2 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_event.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_event.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/clientbound/packet_world_particles.py b/aiocraft/mc/proto/play/clientbound/packet_world_particles.py index 075d28b..5b752f8 100644 --- a/aiocraft/mc/proto/play/clientbound/packet_world_particles.py +++ b/aiocraft/mc/proto/play/clientbound/packet_world_particles.py @@ -1,13 +1,13 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketWorldParticles(Packet): __slots__ = ( 'id', 'data', 'longDistance', 'offsetX', 'offsetY', 'offsetZ', 'particleData', 'particleId', 'particles', 'x', 'y', 'z' ) - data : bytes + data : Union[Union[None, list],bytes,Union[dict, None, int]] longDistance : bool offsetX : float offsetY : float @@ -20,7 +20,7 @@ class PacketWorldParticles(Packet): z : float def __init__(self, proto:int, - data:bytes=None, + data:Union[Union[None, list],bytes,Union[dict, None, int]]=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 fe0def3..0541edc 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_abilities.py +++ b/aiocraft/mc/proto/play/serverbound/packet_abilities.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_advancement_tab.py b/aiocraft/mc/proto/play/serverbound/packet_advancement_tab.py index e60d56b..ed76e21 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_advancement_tab.py +++ b/aiocraft/mc/proto/play/serverbound/packet_advancement_tab.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,11 +8,11 @@ class PacketAdvancementTab(Packet): __slots__ = ( 'id', 'action', 'tabId' ) action : int - tabId : bytes + tabId : Union[str, None] def __init__(self, proto:int, action:int=None, - tabId:bytes=None + tabId:Union[str, None]=None ): super().__init__(proto, action=action, diff --git a/aiocraft/mc/proto/play/serverbound/packet_arm_animation.py b/aiocraft/mc/proto/play/serverbound/packet_arm_animation.py index bd53ac9..b3ba852 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_arm_animation.py +++ b/aiocraft/mc/proto/play/serverbound/packet_arm_animation.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_block_dig.py b/aiocraft/mc/proto/play/serverbound/packet_block_dig.py index a27724c..242cabe 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_block_dig.py +++ b/aiocraft/mc/proto/play/serverbound/packet_block_dig.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_block_place.py b/aiocraft/mc/proto/play/serverbound/packet_block_place.py index 717c723..31590f5 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_block_place.py +++ b/aiocraft/mc/proto/play/serverbound/packet_block_place.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_chat.py b/aiocraft/mc/proto/play/serverbound/packet_chat.py index 846c44c..1e50c03 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_chat.py +++ b/aiocraft/mc/proto/play/serverbound/packet_chat.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_client_command.py b/aiocraft/mc/proto/play/serverbound/packet_client_command.py index 80b80e0..93c5ff7 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_client_command.py +++ b/aiocraft/mc/proto/play/serverbound/packet_client_command.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_close_window.py b/aiocraft/mc/proto/play/serverbound/packet_close_window.py index c3973da..4b19fa8 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_close_window.py +++ b/aiocraft/mc/proto/play/serverbound/packet_close_window.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 f1d01d7..091a686 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_craft_recipe_request.py +++ b/aiocraft/mc/proto/play/serverbound/packet_craft_recipe_request.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * @@ -8,12 +8,12 @@ class PacketCraftRecipeRequest(Packet): __slots__ = ( 'id', 'makeAll', 'recipe', 'windowId' ) makeAll : bool - recipe : Union[int,str] + recipe : Union[str,int] windowId : int def __init__(self, proto:int, makeAll:bool=None, - recipe:Union[int,str]=None, + recipe:Union[str,int]=None, windowId:int=None ): super().__init__(proto, 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 73d6c80..ee212bf 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_crafting_book_data.py +++ b/aiocraft/mc/proto/play/serverbound/packet_crafting_book_data.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_custom_payload.py b/aiocraft/mc/proto/play/serverbound/packet_custom_payload.py index 31ef68d..e8073f4 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_custom_payload.py +++ b/aiocraft/mc/proto/play/serverbound/packet_custom_payload.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_displayed_recipe.py b/aiocraft/mc/proto/play/serverbound/packet_displayed_recipe.py index 8ee8623..f118bc5 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_displayed_recipe.py +++ b/aiocraft/mc/proto/play/serverbound/packet_displayed_recipe.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_edit_book.py b/aiocraft/mc/proto/play/serverbound/packet_edit_book.py index 1bf73fa..de95b35 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_edit_book.py +++ b/aiocraft/mc/proto/play/serverbound/packet_edit_book.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_enchant_item.py b/aiocraft/mc/proto/play/serverbound/packet_enchant_item.py index aa30212..be2c371 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_enchant_item.py +++ b/aiocraft/mc/proto/play/serverbound/packet_enchant_item.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_entity_action.py b/aiocraft/mc/proto/play/serverbound/packet_entity_action.py index 9a2ca9a..fad1561 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_entity_action.py +++ b/aiocraft/mc/proto/play/serverbound/packet_entity_action.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_flying.py b/aiocraft/mc/proto/play/serverbound/packet_flying.py index 070794d..3307814 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_flying.py +++ b/aiocraft/mc/proto/play/serverbound/packet_flying.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_generate_structure.py b/aiocraft/mc/proto/play/serverbound/packet_generate_structure.py index 1fa3212..118d3d5 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_generate_structure.py +++ b/aiocraft/mc/proto/play/serverbound/packet_generate_structure.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 0a3fe64..a8c1f65 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_held_item_slot.py +++ b/aiocraft/mc/proto/play/serverbound/packet_held_item_slot.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_keep_alive.py b/aiocraft/mc/proto/play/serverbound/packet_keep_alive.py index 72e1187..b8cb493 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_keep_alive.py +++ b/aiocraft/mc/proto/play/serverbound/packet_keep_alive.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_lock_difficulty.py b/aiocraft/mc/proto/play/serverbound/packet_lock_difficulty.py index 1ff1fc6..ca6daf5 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_lock_difficulty.py +++ b/aiocraft/mc/proto/play/serverbound/packet_lock_difficulty.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_look.py b/aiocraft/mc/proto/play/serverbound/packet_look.py index aa32b46..808c913 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_look.py +++ b/aiocraft/mc/proto/play/serverbound/packet_look.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_name_item.py b/aiocraft/mc/proto/play/serverbound/packet_name_item.py index a9fbec0..63fc660 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_name_item.py +++ b/aiocraft/mc/proto/play/serverbound/packet_name_item.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_pick_item.py b/aiocraft/mc/proto/play/serverbound/packet_pick_item.py index efd8ab7..40fbe98 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_pick_item.py +++ b/aiocraft/mc/proto/play/serverbound/packet_pick_item.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_pong.py b/aiocraft/mc/proto/play/serverbound/packet_pong.py index e7d855d..23fc1b3 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_pong.py +++ b/aiocraft/mc/proto/play/serverbound/packet_pong.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_position.py b/aiocraft/mc/proto/play/serverbound/packet_position.py index 9627cfe..7f34e0a 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_position.py +++ b/aiocraft/mc/proto/play/serverbound/packet_position.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_position_look.py b/aiocraft/mc/proto/play/serverbound/packet_position_look.py index 721587c..ab5c787 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_position_look.py +++ b/aiocraft/mc/proto/play/serverbound/packet_position_look.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 98ee5cd..fe16344 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_prepare_crafting_grid.py +++ b/aiocraft/mc/proto/play/serverbound/packet_prepare_crafting_grid.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 e0f550d..5fa8cf6 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_query_block_nbt.py +++ b/aiocraft/mc/proto/play/serverbound/packet_query_block_nbt.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 b744a45..4fc8a6b 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_query_entity_nbt.py +++ b/aiocraft/mc/proto/play/serverbound/packet_query_entity_nbt.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_recipe_book.py b/aiocraft/mc/proto/play/serverbound/packet_recipe_book.py index eb7aa88..b238fae 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_recipe_book.py +++ b/aiocraft/mc/proto/play/serverbound/packet_recipe_book.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 df54a46..9244133 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_resource_pack_receive.py +++ b/aiocraft/mc/proto/play/serverbound/packet_resource_pack_receive.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_select_trade.py b/aiocraft/mc/proto/play/serverbound/packet_select_trade.py index 4f234cb..856c127 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_select_trade.py +++ b/aiocraft/mc/proto/play/serverbound/packet_select_trade.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 d03d1cb..875eddf 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_set_beacon_effect.py +++ b/aiocraft/mc/proto/play/serverbound/packet_set_beacon_effect.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 8d59d58..d97a4fd 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_set_creative_slot.py +++ b/aiocraft/mc/proto/play/serverbound/packet_set_creative_slot.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_set_difficulty.py b/aiocraft/mc/proto/play/serverbound/packet_set_difficulty.py index 948ded7..e2ecb61 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_set_difficulty.py +++ b/aiocraft/mc/proto/play/serverbound/packet_set_difficulty.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_settings.py b/aiocraft/mc/proto/play/serverbound/packet_settings.py index 6272d9b..fae0097 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_settings.py +++ b/aiocraft/mc/proto/play/serverbound/packet_settings.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_spectate.py b/aiocraft/mc/proto/play/serverbound/packet_spectate.py index ef09a72..b8b8f44 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_spectate.py +++ b/aiocraft/mc/proto/play/serverbound/packet_spectate.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_steer_boat.py b/aiocraft/mc/proto/play/serverbound/packet_steer_boat.py index ae07fda..6fc0321 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_steer_boat.py +++ b/aiocraft/mc/proto/play/serverbound/packet_steer_boat.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_steer_vehicle.py b/aiocraft/mc/proto/play/serverbound/packet_steer_vehicle.py index f75e218..1a435b3 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_steer_vehicle.py +++ b/aiocraft/mc/proto/play/serverbound/packet_steer_vehicle.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_tab_complete.py b/aiocraft/mc/proto/play/serverbound/packet_tab_complete.py index 1bffc02..8c289a9 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_tab_complete.py +++ b/aiocraft/mc/proto/play/serverbound/packet_tab_complete.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_teleport_confirm.py b/aiocraft/mc/proto/play/serverbound/packet_teleport_confirm.py index 4afd6cb..21944ee 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_teleport_confirm.py +++ b/aiocraft/mc/proto/play/serverbound/packet_teleport_confirm.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_transaction.py b/aiocraft/mc/proto/play/serverbound/packet_transaction.py index e9721b1..c688053 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_transaction.py +++ b/aiocraft/mc/proto/play/serverbound/packet_transaction.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 d9c14e9..7d88c7d 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_command_block.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_command_block.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 6af6659..96e505d 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 @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 d8039cc..515ab60 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_jigsaw_block.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_jigsaw_block.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_update_sign.py b/aiocraft/mc/proto/play/serverbound/packet_update_sign.py index 363f863..579f156 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_sign.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_sign.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * 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 42d4361..c69b3c5 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_update_structure_block.py +++ b/aiocraft/mc/proto/play/serverbound/packet_update_structure_block.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_use_entity.py b/aiocraft/mc/proto/play/serverbound/packet_use_entity.py index 20b7423..ae95ddc 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_use_entity.py +++ b/aiocraft/mc/proto/play/serverbound/packet_use_entity.py @@ -1,28 +1,28 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * class PacketUseEntity(Packet): __slots__ = ( 'id', 'hand', 'mouse', 'sneaking', 'target', 'x', 'y', 'z' ) - hand : bytes + hand : Union[None, int] mouse : int sneaking : bool target : int - x : bytes - y : bytes - z : bytes + x : Union[float, None] + y : Union[float, None] + z : Union[float, None] def __init__(self, proto:int, - hand:bytes=None, + hand:Union[None, int]=None, mouse:int=None, sneaking:bool=None, target:int=None, - x:bytes=None, - y:bytes=None, - z:bytes=None + x:Union[float, None]=None, + y:Union[float, None]=None, + z:Union[float, None]=None ): super().__init__(proto, hand=hand, diff --git a/aiocraft/mc/proto/play/serverbound/packet_use_item.py b/aiocraft/mc/proto/play/serverbound/packet_use_item.py index f0d2ee8..43aed83 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_use_item.py +++ b/aiocraft/mc/proto/play/serverbound/packet_use_item.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_vehicle_move.py b/aiocraft/mc/proto/play/serverbound/packet_vehicle_move.py index 6ea0020..42a0f98 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_vehicle_move.py +++ b/aiocraft/mc/proto/play/serverbound/packet_vehicle_move.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/play/serverbound/packet_window_click.py b/aiocraft/mc/proto/play/serverbound/packet_window_click.py index fae8e2b..c746acc 100644 --- a/aiocraft/mc/proto/play/serverbound/packet_window_click.py +++ b/aiocraft/mc/proto/play/serverbound/packet_window_click.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/status/clientbound/packet_ping.py b/aiocraft/mc/proto/status/clientbound/packet_ping.py index 66180d6..faff803 100644 --- a/aiocraft/mc/proto/status/clientbound/packet_ping.py +++ b/aiocraft/mc/proto/status/clientbound/packet_ping.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/status/clientbound/packet_server_info.py b/aiocraft/mc/proto/status/clientbound/packet_server_info.py index 2fd7194..0ef86cd 100644 --- a/aiocraft/mc/proto/status/clientbound/packet_server_info.py +++ b/aiocraft/mc/proto/status/clientbound/packet_server_info.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/status/serverbound/packet_ping.py b/aiocraft/mc/proto/status/serverbound/packet_ping.py index 66180d6..faff803 100644 --- a/aiocraft/mc/proto/status/serverbound/packet_ping.py +++ b/aiocraft/mc/proto/status/serverbound/packet_ping.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/aiocraft/mc/proto/status/serverbound/packet_ping_start.py b/aiocraft/mc/proto/status/serverbound/packet_ping_start.py index 8a48753..0183a80 100644 --- a/aiocraft/mc/proto/status/serverbound/packet_ping_start.py +++ b/aiocraft/mc/proto/status/serverbound/packet_ping_start.py @@ -1,6 +1,6 @@ """[!] This file is autogenerated""" -from typing import Tuple, List, Dict, Union +from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import * diff --git a/compiler/proto.py b/compiler/proto.py index 5e52b8a..b1f9a7a 100644 --- a/compiler/proto.py +++ b/compiler/proto.py @@ -8,12 +8,13 @@ from pathlib import Path from typing import Tuple, List, Dict, Union, Set, Type as Class from aiocraft.mc.types import * +from aiocraft.mc.definitions import Item # TODO de-spaghetti this file sometime! DIR_MAP = {"toClient": "clientbound", "toServer": "serverbound"} PREFACE = """\"\"\"[!] This file is autogenerated\"\"\"\n\n""" -IMPORTS = """from typing import Tuple, List, Dict, Union +IMPORTS = """from typing import Tuple, List, Dict, Union, Optional from ....packet import Packet from ....types import *\n""" IMPORT_ALL = """__all__ = [\n\t{all}\n]\n""" @@ -88,6 +89,7 @@ TYPE_MAP = { "position": Ref('Position'), "entityMetadataItem": Ref('EntityMetadataItem'), "entityMetadata": Ref('EntityMetadata'), + "restBuffer": Ref('TrailingData'), "void": Ref('Void'), } @@ -106,10 +108,15 @@ HINT_MAP = { "bool": 'bool', "UUID": 'str', "string": 'str', - "nbt": 'bytes', + "nbt": 'dict', + "optionalNbt": 'Optional[dict]', "slot": 'dict', "position": 'tuple', "entityMetadata": 'dict', + "restBuffer": 'bytes', + "void": 'None', + "tags": 'list', # TODO this has been added in 1.13 + "bitfield": 'int', # TODO this can be hinted better } def _format_line(i, depth:int=0) -> str: @@ -153,9 +160,8 @@ def mctype(slot_type:Any) -> Ref: Ref(format_dict({int(k) if k.isnumeric() else repr(k):mctype(x) for k,x in v["fields"].items()}, depth=0)), mctype(v["default"]) if "default" in v and v['default'] != 'void' else None, ) - # return SwitchType(mctype(v)) # TODO elif t == "bitfield": - return Ref('Int') + return Ref('Int') # TODO # elif t == "mapper": # ???? # return TrailingData else: @@ -171,15 +177,22 @@ def mchint(slot_type:Any) -> Ref: return Ref('bytes') elif t == "array": # Generic array return Ref('list') - elif t == "container": # Struct + elif t == "container": # Struct TODO make an object with type hints return Ref('dict') elif t == "option": # Optional return Ref('tuple') elif t == "switch": # Union - return Ref('bytes') - # return SwitchType(mctype(v)) # TODO + possibilities = set() + for val in slot_type[1]['fields'].values(): + possibilities.add(mchint(val)) + if 'default' in slot_type[1]: + possibilities.add(mchint(slot_type[1]['default'])) + else: + possibilities.add(Ref('None')) + return Ref(f'Union[{", ".join(str(s) for s in possibilities)}]') # elif t == "mapper": # ???? # return TrailingData + logging.error("Unknown type %s, using 'bytes' as hint", str(slot_type)) return Ref('bytes') def pytype(t:list) -> str: