ItemEnchantableComponent
¶
文档版本:1.21.60.21
ItemEnchantableComponent
类,扩展自ItemComponent
。script_api.minecraft/server.itemenchantablecomponent.description
常量¶
componentId
属性¶
slots
slots
:EnchantmentSlot[]
- script_api.minecraft/server.itemenchantablecomponent.slots.description
方法¶
addEnchantment
script_api.minecraft/server.itemenchantablecomponent.addenchantment.description
enchantment
:Enchantment
- script_api.minecraft/server.itemenchantablecomponent.addenchantment.enchantment.description
- 返回值:
void
- script_api.minecraft/server.itemenchantablecomponent.addenchantment.return
addEnchantments
script_api.minecraft/server.itemenchantablecomponent.addenchantments.description
enchantments
:Enchantment[]
- script_api.minecraft/server.itemenchantablecomponent.addenchantments.enchantments.description
- 返回值:
void
- script_api.minecraft/server.itemenchantablecomponent.addenchantments.return
canAddEnchantment
script_api.minecraft/server.itemenchantablecomponent.canaddenchantment.description
enchantment
:Enchantment
- script_api.minecraft/server.itemenchantablecomponent.canaddenchantment.enchantment.description
- 返回值:
boolean
- script_api.minecraft/server.itemenchantablecomponent.canaddenchantment.return
getEnchantment
script_api.minecraft/server.itemenchantablecomponent.getenchantment.description
enchantmentType
:EnchantmentType
|string
- script_api.minecraft/server.itemenchantablecomponent.getenchantment.enchantmenttype.description
- 返回值:
Enchantment
|undefined
- script_api.minecraft/server.itemenchantablecomponent.getenchantment.return
getEnchantments
script_api.minecraft/server.itemenchantablecomponent.getenchantments.description
hasEnchantment
script_api.minecraft/server.itemenchantablecomponent.hasenchantment.description
enchantmentType
:EnchantmentType
|string
- script_api.minecraft/server.itemenchantablecomponent.hasenchantment.enchantmenttype.description
- 返回值:
boolean
- script_api.minecraft/server.itemenchantablecomponent.hasenchantment.return
removeAllEnchantments
script_api.minecraft/server.itemenchantablecomponent.removeallenchantments.description
- 返回值:
void
- script_api.minecraft/server.itemenchantablecomponent.removeallenchantments.return
removeEnchantment
script_api.minecraft/server.itemenchantablecomponent.removeenchantment.description
enchantmentType
:EnchantmentType
|string
- script_api.minecraft/server.itemenchantablecomponent.removeenchantment.enchantmenttype.description
- 返回值:
void
- script_api.minecraft/server.itemenchantablecomponent.removeenchantment.return