ItemStack
¶
文档版本:1.21.60.21
ItemStack
类。script_api.minecraft/server.itemstack.description
属性¶
amount
amount
:int32
- script_api.minecraft/server.itemstack.amount.description
isStackable
isStackable
:boolean
- script_api.minecraft/server.itemstack.isstackable.description
keepOnDeath
keepOnDeath
:boolean
- script_api.minecraft/server.itemstack.keepondeath.description
lockMode
lockMode
:ItemLockMode
- script_api.minecraft/server.itemstack.lockmode.description
maxAmount
maxAmount
:int32
- script_api.minecraft/server.itemstack.maxamount.description
nameTag
nameTag
:string
|undefined
- script_api.minecraft/server.itemstack.nametag.description
type
type
:ItemType
- script_api.minecraft/server.itemstack.type.description
typeId
typeId
:string
- script_api.minecraft/server.itemstack.typeid.description
方法¶
clearDynamicProperties
script_api.minecraft/server.itemstack.cleardynamicproperties.description
- 返回值:
void
- script_api.minecraft/server.itemstack.cleardynamicproperties.return
clone
script_api.minecraft/server.itemstack.clone.description
- 返回值:
ItemStack
- script_api.minecraft/server.itemstack.clone.return
constructor
script_api.minecraft/server.itemstack.constructor.description
itemType
:ItemType
|string
- script_api.minecraft/server.itemstack.constructor.itemtype.description
amount
:int32
=1
∈[1
,255
]- script_api.minecraft/server.itemstack.constructor.amount.description
- 返回值:
ItemStack
- script_api.minecraft/server.itemstack.constructor.return
createPotion
script_api.minecraft/server.itemstack.createpotion.description
options
:PotionOptions
- script_api.minecraft/server.itemstack.createpotion.options.description
- 返回值:
ItemStack
- script_api.minecraft/server.itemstack.createpotion.return
getCanDestroy
script_api.minecraft/server.itemstack.getcandestroy.description
- 返回值:
string[]
- script_api.minecraft/server.itemstack.getcandestroy.return
getCanPlaceOn
script_api.minecraft/server.itemstack.getcanplaceon.description
- 返回值:
string[]
- script_api.minecraft/server.itemstack.getcanplaceon.return
getComponent
script_api.minecraft/server.itemstack.getcomponent.description
componentId
:string
- script_api.minecraft/server.itemstack.getcomponent.componentid.description
- 返回值:
ItemComponent
|undefined
- script_api.minecraft/server.itemstack.getcomponent.return
getComponents
script_api.minecraft/server.itemstack.getcomponents.description
- 返回值:
ItemComponent[]
- script_api.minecraft/server.itemstack.getcomponents.return
getDynamicProperty
script_api.minecraft/server.itemstack.getdynamicproperty.description
identifier
:string
- script_api.minecraft/server.itemstack.getdynamicproperty.identifier.description
- 返回值:
boolean
|double
|float
|string
|Vector3
|undefined
- script_api.minecraft/server.itemstack.getdynamicproperty.return
getDynamicPropertyIds
script_api.minecraft/server.itemstack.getdynamicpropertyids.description
- 返回值:
string[]
- script_api.minecraft/server.itemstack.getdynamicpropertyids.return
getDynamicPropertyTotalByteCount
script_api.minecraft/server.itemstack.getdynamicpropertytotalbytecount.description
- 返回值:
int32
- script_api.minecraft/server.itemstack.getdynamicpropertytotalbytecount.return
getLore
script_api.minecraft/server.itemstack.getlore.description
- 返回值:
string[]
- script_api.minecraft/server.itemstack.getlore.return
getTags
script_api.minecraft/server.itemstack.gettags.description
- 返回值:
string[]
- script_api.minecraft/server.itemstack.gettags.return
hasComponent
script_api.minecraft/server.itemstack.hascomponent.description
componentId
:string
- script_api.minecraft/server.itemstack.hascomponent.componentid.description
- 返回值:
boolean
- script_api.minecraft/server.itemstack.hascomponent.return
hasTag
script_api.minecraft/server.itemstack.hastag.description
tag
:string
- script_api.minecraft/server.itemstack.hastag.tag.description
- 返回值:
boolean
- script_api.minecraft/server.itemstack.hastag.return
isStackableWith
script_api.minecraft/server.itemstack.isstackablewith.description
itemStack
:ItemStack
- script_api.minecraft/server.itemstack.isstackablewith.itemstack.description
- 返回值:
boolean
- script_api.minecraft/server.itemstack.isstackablewith.return
matches
script_api.minecraft/server.itemstack.matches.description
itemName
:string
- script_api.minecraft/server.itemstack.matches.itemname.description
states
?:Record<string, boolean | int32 | string>
=null
- script_api.minecraft/server.itemstack.matches.states.description
- 返回值:
boolean
- script_api.minecraft/server.itemstack.matches.return
setCanDestroy
script_api.minecraft/server.itemstack.setcandestroy.description
blockIdentifiers
?:string[]
=null
- script_api.minecraft/server.itemstack.setcandestroy.blockidentifiers.description
- 返回值:
void
- script_api.minecraft/server.itemstack.setcandestroy.return
setCanPlaceOn
script_api.minecraft/server.itemstack.setcanplaceon.description
blockIdentifiers
?:string[]
=null
- script_api.minecraft/server.itemstack.setcanplaceon.blockidentifiers.description
- 返回值:
void
- script_api.minecraft/server.itemstack.setcanplaceon.return
setDynamicProperty
script_api.minecraft/server.itemstack.setdynamicproperty.description
identifier
:string
- script_api.minecraft/server.itemstack.setdynamicproperty.identifier.description
value
?:boolean
|double
|float
|string
|Vector3
=null
- script_api.minecraft/server.itemstack.setdynamicproperty.value.description
- 返回值:
void
- script_api.minecraft/server.itemstack.setdynamicproperty.return
setLore
script_api.minecraft/server.itemstack.setlore.description
loreList
?:string[]
=null
- script_api.minecraft/server.itemstack.setlore.lorelist.description
- 返回值:
void
- script_api.minecraft/server.itemstack.setlore.return