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

minecraft:storage_item

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

概览

minecraft:storage_item 是一个物品组件:写在自定义物品的 components 对象中。 让物品可以在里面装其他物品,就像收纳袋一样。minecraft:bundle_interaction 等其他组件会使用这个存储空间。

这是实验性功能:只有在开启了对应实验性玩法的世界中才能生效,并且在以后的版本中可能会改变。

字段

字段类型默认值说明
max_slotsinteger64最多能存放多少组不同的物品,上限 64。范围:… 到 64
allow_nested_storage_itemsbooleantrue为 false 时,不能把其他存储物品(比如收纳袋)放进去。
banned_itemsItem Descriptor[]无永远不能放进去的物品。
allowed_itemsItem Descriptor[]无设置后,只有这些物品能放进去。留空表示允许所有物品。

示例

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

BP/items/<name>.json
{
  "minecraft:storage_item": {
    "max_slots": 64,
    "allow_nested_storage_items": true,
    "banned_items": [],
    "allowed_items": []
  }
}

物品: 行为包

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