1. Wiki
  2. /物品
  3. /minecraft:wearable

minecraft:wearable

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:wearable。Get GodCraft

概览

minecraft:wearable 是一个物品组件:写在自定义物品的 components 对象中。 让物品可以穿戴在装备栏位中,比如头盔或靴子。搭配资源包中的附着物(attachable),它才会显示在玩家身上。

字段

字段类型默认值说明
slotEquipmentSlot无放入的栏位,例如 "slot.armor.head"。除手部以外的任何栏位都会把堆叠数量设为 1。
protectioninteger0穿戴时提供的盔甲值。范围:0 到 …
hides_player_locationbooleanfalse为 true 时,穿戴后玩家不会显示在定位地图和定位栏上。

示例

写在 BP/items/<name>.json 的 components 对象中(值为默认值或占位值):

BP/items/<name>.json
{
  "minecraft:wearable": {
    "slot": {},
    "protection": 0,
    "hides_player_location": false
  }
}

物品: 行为包

We use cookies to improve your experience and analyse site traffic. Learn more