Merge branch 'main' of github.com:alemidev/aiocraft

This commit is contained in:
əlemi 2022-01-14 16:15:40 +01:00
commit 0216be7c4d
186 changed files with 429 additions and 398 deletions

View file

@ -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"<Enchantment({str(self)})>"
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 "")

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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
):

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

View file

@ -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 *

View file

@ -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,

View file

@ -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 *

Some files were not shown because too many files have changed in this diff Show more