hinted slot as Item

This commit is contained in:
əlemi 2022-01-19 01:21:02 +01:00
parent c64f527ec7
commit 15801426b0
9 changed files with 19 additions and 19 deletions

View file

@ -10,13 +10,13 @@ class PacketEntityEquipment(Packet):
entityId : int
equipments : bytes
item : dict
item : Item
slot : int
def __init__(self, proto:int,
entityId:int=None,
equipments:bytes=None,
item:dict=None,
item:Item=None,
slot:int=None,
**kwargs
):

View file

@ -8,13 +8,13 @@ from ....types import *
class PacketSetSlot(Packet):
__slots__ = ( 'id', 'item', 'slot', 'stateId', 'windowId' )
item : dict
item : Item
slot : int
stateId : int
windowId : int
def __init__(self, proto:int,
item:dict=None,
item:Item=None,
slot:int=None,
stateId:int=None,
windowId:int=None,

View file

@ -8,13 +8,13 @@ from ....types import *
class PacketWindowItems(Packet):
__slots__ = ( 'id', 'carriedItem', 'items', 'stateId', 'windowId' )
carriedItem : dict
carriedItem : Item
items : list
stateId : int
windowId : int
def __init__(self, proto:int,
carriedItem:dict=None,
carriedItem:Item=None,
items:list=None,
stateId:int=None,
windowId:int=None,

View file

@ -8,7 +8,7 @@ from ....types import *
class PacketWorldParticles(Packet):
__slots__ = ( 'id', 'data', 'longDistance', 'offsetX', 'offsetY', 'offsetZ', 'particleData', 'particleId', 'particles', 'x', 'y', 'z' )
data : Union[Union[None, dict, int],Union[None, list],bytes]
data : Union[Union[Item, None, int],Union[None, list],bytes]
longDistance : bool
offsetX : float
offsetY : float
@ -21,7 +21,7 @@ class PacketWorldParticles(Packet):
z : float
def __init__(self, proto:int,
data:Union[Union[None, dict, int],Union[None, list],bytes]=None,
data:Union[Union[Item, None, int],Union[None, list],bytes]=None,
longDistance:bool=None,
offsetX:float=None,
offsetY:float=None,

View file

@ -13,7 +13,7 @@ class PacketBlockPlace(Packet):
cursorZ : Union[float,int]
direction : int
hand : int
heldItem : dict
heldItem : Item
insideBlock : bool
location : tuple
@ -23,7 +23,7 @@ class PacketBlockPlace(Packet):
cursorZ:Union[float,int]=None,
direction:int=None,
hand:int=None,
heldItem:dict=None,
heldItem:Item=None,
insideBlock:bool=None,
location:tuple=None,
**kwargs

View file

@ -9,14 +9,14 @@ class PacketEditBook(Packet):
__slots__ = ( 'id', 'hand', 'new_book', 'pages', 'signing', 'title' )
hand : int
new_book : dict
new_book : Item
pages : list
signing : bool
title : tuple
def __init__(self, proto:int,
hand:int=None,
new_book:dict=None,
new_book:Item=None,
pages:list=None,
signing:bool=None,
title:tuple=None,

View file

@ -8,11 +8,11 @@ from ....types import *
class PacketSetCreativeSlot(Packet):
__slots__ = ( 'id', 'item', 'slot' )
item : dict
item : Item
slot : int
def __init__(self, proto:int,
item:dict=None,
item:Item=None,
slot:int=None,
**kwargs
):

View file

@ -10,8 +10,8 @@ class PacketWindowClick(Packet):
action : int
changedSlots : list
cursorItem : dict
item : dict
cursorItem : Item
item : Item
mode : int
mouseButton : int
slot : int
@ -21,8 +21,8 @@ class PacketWindowClick(Packet):
def __init__(self, proto:int,
action:int=None,
changedSlots:list=None,
cursorItem:dict=None,
item:dict=None,
cursorItem:Item=None,
item:Item=None,
mode:int=None,
mouseButton:int=None,
slot:int=None,

View file

@ -111,7 +111,7 @@ HINT_MAP = {
"string": 'str',
"nbt": 'dict',
"optionalNbt": 'Optional[dict]',
"slot": 'dict',
"slot": 'Item',
"position": 'tuple',
"entityMetadata": 'dict',
"restBuffer": 'bytes',