跳转至

minecraft:repairable

文档版本:1.21.0.24

The repairable item component specifies which items can be used to repair this item, along with how much durability is gained.

架构

minecraft:repairable:
{
  array "repair_items" : opt
  {
    array "<any array element>" : opt
    {
      item_descriptor "<any array element>"
    }
    object "<any array element>" : opt
    {
      array "items" : opt
      {
        item_descriptor "<any array element>"
      }
      expression_node "repair_amount"
    }
    string "<any array element>" : opt
  }
}
repair_itemsarray
List of repair item entries. Each entry needs to define a list of strings for items that can be used for the repair and an optional repair_amount for how much durability is gained.
repair_items
<any array element>array
<any array element>
<any array element>item_descriptor
item_descriptor:
string
item_descriptor:
{
  string "<any object property>" : opt
}
<any object property>string
<any array element>object
<any array element>
itemsarray
Items that may be used to repair an item.
items
<any array element>item_descriptor
repair_amountexpression_node
How much the item is repaired.
expression_node:
string
expression_node:
number
expression_node:
{
  string "expression" : opt
  integer "version" : opt
}
expressionstring
versioninteger
<any array element>string