hinted slot as Item
This commit is contained in:
parent
c64f527ec7
commit
15801426b0
9 changed files with 19 additions and 19 deletions
|
@ -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
|
||||
):
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
):
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -111,7 +111,7 @@ HINT_MAP = {
|
|||
"string": 'str',
|
||||
"nbt": 'dict',
|
||||
"optionalNbt": 'Optional[dict]',
|
||||
"slot": 'dict',
|
||||
"slot": 'Item',
|
||||
"position": 'tuple',
|
||||
"entityMetadata": 'dict',
|
||||
"restBuffer": 'bytes',
|
||||
|
|
Loading…
Reference in a new issue