编辑

通过


Entity Documentation - minecraft:giveable

Defines sets of items that can be used to trigger events when used on this entity. The item will also be taken and placed in the entity's inventory.

Giveable Properties

Name Default Value Type Description
cooldown 0 Decimal number An optional cool down in seconds to prevent spamming interactions.
items not set Array of strings The list of items that can be given to the entity to place in their inventory. Can be an array or a single item string.
items (as String) not set String
on_give not set Object Event to fire when the correct item is given. Can be an object with event and target properties, or a simple event string.
on_give (as String) not set String

Samples