Shulker Box

A shulker box is a block that can store and transport items.

Breaking
Shulker boxes can be mined with any tool or by hand, but using a pickaxe is the most effective. Shulker boxes drop themselves when mined. Unlike other containers, the contents of shulker boxes are stored within the dropped item, and not dropped separately. When instantly mined in Creative mode, shulker boxes drop as an item if there are items stored within, unless is set to "false".

Usage
A shulker box has 27 inventory slots, the same as a chest.

Shulker boxes are portable chests: they keep their items when broken, which can be retrieved when placed again. This is different from other containers, which drop their contained items as item entities when broken. A shulker box drops itself as an item if pushed by pistons or destroyed by an explosion. When a shulker box with items inside is held or in a container's inventory, the items are listed as properties.



A shulker box's items can be fed or removed by a hopper.

Shulker boxes can be stored in all containers except for other shulker boxes.

When placed on a wall or ceiling, shulker boxes face and open sideways or upside-down, respectively. Shulker boxes cannot be opened if a solid opaque block is on their top surface, similar to a chest. For example, if a shulker box is facing upside-down and a solid opaque block is below it, the shulker box cannot be opened. A shulker box can also be placed using dispensers.

Shulker boxes, unlike chests, can only be opened with a transparent area above them, and will only open if a block's hitbox wouldn't intersect the shulker box's when it is open. This way, a shulker box can be opened with an upside-down slab or an upper trapdoor on top of it. It is also unique in that when opened, its hitbox expands to 1,5 blocks high/wide, physically pushing entities where it is facing.

By default, the GUI of a shulker box is labeled "Shulker Box", which can be changed by naming it in an anvil or by changing the  tag using the  command.

Undyeing
Dyed shulker boxes can be undyed using a cauldron. To do this, a dyed shulker box on a cauldron that has water in it. This causes the cauldron's water level to decrease by 1, and the shulker box loses its dye color.

Piglins
Piglins become hostile toward players who open or mine shulker boxes.

ID




Block data
$$, dyed shulker boxes use the following data values:

Block entity
A shulker box has a block entity associated with it that identifies its contents.

Item data
Shulker boxes, as items, use an NBT tag  to indicate the contents and details of the box when it is placed.

''The following NBT structure is provided to show how the  tag is organized, and is not comprehensive above the   tag. The full NBT for an item can be found here.''


 * Entity data
 * : The item
 * : Additional information about the item. This tag is optional for most items.
 * : The details of the shulker box

to.
 * : An item, including the slot tag. Shulker box slots are numbered 0–26, 0 starts in the top left corner.
 * : Optional. Loot table to be used to fill the shulker box when it is next opened, or the items are otherwise interacted with.
 * : Optional. Seed for generating the loot table. 0 or omitted uses a random seed.
 * : Optional. Seed for generating the loot table. 0 or omitted uses a random seed.
 * Prior to The Flattening, these blocks' numeral IDs were 219 through 234.}}

Trivia

 * One can exploit the expanding hitbox of an open shulker box to create secret passageways using a block above the entity on top.
 * With 37 shulker boxes in a player's inventory, hotbar and off-hand slot, 999 stacks of up to 64 items (up to 63936 total items) can be held. With 36 shulker boxes and an ender chest with 27 shulker boxes in it, 1701 stacks (up to 108864 items) can be held.
 * With strength value 5 llamas, each caravan of 10 llamas with inventories full of shulker boxes can carry up to 4050 stacks (up to 259200 items).
 * When the camera is far enough from a shulker box, the shulker box is invisible, even though it is still within the render distance.