Drop Inventory
Drops the items from either the entity's inventory or a power that uses the Inventory (Power Type).
Type ID: origins:drop_inventory
Fields
Field | Type | Default | Description |
---|---|---|---|
inventory_type |
Inventory Type | "inventory" |
Determines whether to drop the items from the inventory of the entity or the inventory of a power present in the entity. |
entity_action |
Entity Action Type | optional | If specified, this action will be executed on the entity before the items are dropped. |
item_action |
Item Action Type | optional | If specified, this action will be executed on the affected items before the affected items are dropped. |
item_condition |
Item Condition Type | optional | If specified, only items which fulfill this condition will be dropped. |
slot |
Item Slot | optional | If specified, only items in the designated slot will be dropped. |
slots |
Array of Item Slots | optional | If specified, only items in the designated slots will be dropped. |
power |
Identifier | optional | If specified, the items in the inventory of this power will be dropped instead of the items in the entity's inventory if inventory_type is set to "power" . |
throw_randomly |
Boolean | false |
If true , items will be thrown in random directions instead of being normally dropped, similar to how items are dropped when you die. |
retain_ownership |
Boolean | true |
If true , the dropped items will have their Thrower NBT set as the UUID NBT of the entity that invoked the action. |
amount |
Integer | optional | If specified, the affected items will be split by this amount. |
Examples
"entity_action": {
"type": "origins:drop_inventory"
}
This example will drop all the items from the entity's inventory.
"entity_action": {
"type": "origins:drop_inventory",
"slots": [
"weapon.offhand",
"hotbar.0",
"hotbar.1",
"hotbar.2",
"hotbar.3",
"hotbar.4",
"hotbar.5",
"hotbar.6",
"hotbar.7",
"hotbar.8"
]
}
This example will drop all items located in your offhand, or hotbar.