User Tools

Site Tools


items:item_components:item_holder

minecraft:item_holder

The minecraft:item_holder item component allows this item to hold other items.

Fields

Name Description Type Default Value
capacity How many items this item can hold with a minecraft:max_stack_size of 64. The occupancy for an item is calculated by the inverse of its minecraft:max_stack_size item stack component, with a few exceptions.1) A positive integer
insert_item_sound The sound event to play when inserting an item stack. A sound event
remove_item_sound The sound event to play when removing an item stack. A sound event
empty_sound The sound event to play when emptying the item holder. A sound event

Example

{
  "capacity": 64,
  "insert_item_sound": "minecraft:item.bundle.insert",
  "remove_item_sound": "minecraft:item.bundle.remove_one",
  "empty_sound": "minecraft:item.bundle.drop_contents"
}
1)
Nested minecraft:item_holders always add an additional 4 to the occupancy alongside the occupancy of its contents, and item stacks with bees inside the minecraft:bees item stack component always use an occupancy of 64.
items/item_components/item_holder.txt · Last modified: 2024/04/25 00:20 by errorcraft