概览
minecraft:enchantable 是一个物品组件:写在自定义物品的 components 对象中。 允许物品被附魔,并选择它接受哪一组附魔。附魔只有在物品也具备相应行为时才会生效。
字段
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
value | integer | 无 | 附魔能力:数值越高,在附魔台上能得到越好的附魔。范围:0 到 … |
slot | string | 无 | 物品使用的附魔组,例如 "sword"、"bow" 或 "armor_head"。 |
示例
写在 BP/items/<name>.json 的 components 对象中(值为默认值或占位值):
BP/items/<name>.json
{
"minecraft:enchantable": {
"value": 0,
"slot": ""
}
}