跳转至

Equippable

文档版本:1.21.0.24

Defines an entity's behavior for having items equipped to it.

架构

equippable:
{
  array "slots" : opt
  {
    object "<any array element>" : opt
    {
      integer "slot" : opt
      array "accepted_items" : opt
      {
        descriptor "<any array element>"
      }
      descriptor "item"
      string "interact_text" : opt
      event_object "on_equip"
      event_object "on_unequip"
    }
  }
}
slotsarray
List of slots and the item that can be equipped.
slots
<any array element>object
A slot and the item that can be equipped.
<any array element>
slotinteger
The slot number of this slot.
accepted_itemsarray
The list of items that can go in this slot.
accepted_items
<any array element>descriptor
A item name.
identifier:
string
descriptor:
{
  identifier "item"
  object "item" : opt
  {
  }
  0 "tags"
  string "item_tag" : opt
}
itemidentifier
itemobject
An object that describes an item.
item
tags0
[UNDOCUMENTED] A Molang expression ran against item or block to match.
0:
string
item_tagstring
[UNDOCUMENTED] A tag to lookup item or block by.
descriptor:
{
  identifier "item"
  object "item" : opt
  {
    identifier "item"
    object "item" : opt
    {
    }
    0 "tags"
    string "item_tag" : opt
  }
}
itemidentifier
itemobject
An object that describes an item.
item
itemdescriptor
Identifier of the item that can be equipped for this slot.
interact_textstring
Text to be displayed when the entity can be equipped with this item when playing with Touch-screen controls.
on_equipevent_object
Event to trigger when this entity is equipped with this item.
event_object:
{
  filters "filters"
  string "event" : opt
  string "target" : opt
}
filtersfilters
一个过滤器组
eventstring
The event to fire.
targetstring
The target of the event.
on_unequipevent_object
Event to trigger when this item is removed from this entity.