actions:action_types:exchange_item
Table of Contents
minecraft:exchange_item
The minecraft:exchange_item
action exchanges the item stack from the action context with the specified item stack.
If this
entity is a player, it will try to insert the item stack into the player's inventory.
Otherwise, it will drop the item on the ground.
This actual is always successful.
Fields
Name | Description | Type | Default Value |
---|---|---|---|
item | The item to use for the item stack. | An item | |
components | The components for the item. | An optional removeable data component map | {} |
decrement_stack | Whether to decrement the item stack from the action context. | An optional boolean | true |
Example
{ "type": "minecraft:exchange_item", "item": "minecraft:glass_bottle" }
actions/action_types/exchange_item.txt · Last modified: 2024/05/01 15:07 by errorcraft