Barrel

Barrels are block entities used to store items.

Natural generation
Barrels can generate naturally in fisher cottages in villages.

Usage
Barrels can be moved by pistons, and water and lava will flow around barrels without affecting them. Lava can create fire in air blocks next to barrels as if the barrel were flammable, but the barrel will not actually catch fire (and can't be burned whatsoever).

Container
Barrels have a container inventory similar to a single chest. They can be filled by droppers and both filled and emptied by hoppers. When broken, barrels drop the contents of the container and the barrel item itself.

To open the barrel GUI, use the control. To move items between the barrel inventory and the player inventory or hotbar while the barrel GUI is open, drag or shift-click the items. Holding and double-clicking while holding an item will move all items of the type clicked on in or out of the barrel, to the extent that space is available for them. To exit the barrel GUI, use the control.

Unlike chests, a barrel can be placed below a solid block and still be able to be opened.

By default, the GUI of a barrel is labeled "Barrel". A barrel's GUI label can be changed by naming the barrel in an anvil before placing it, or by using the command (for example, to label a chest at (0,64,0) as "Bonus Barrel!", use ).

In Java Edition, a barrel can be "locked" by setting its  tag using the  command. If a barrel's  tag is not blank, the barrel cannot be opened unless the player is holding an item with the same name as the   tag's text. For example, to lock a barrel at (0,64,0) so that the barrel cannot be opened unless the player is holding an item named "Red Key", use.

Fuel
Barrels can be used as a fuel in furnaces, smelting 1.5 items per block.

Changing profession
If a village has a barrel and there is no fisherman villager in the village, any villager who does not have a chosen job site block has a chance to change their profession into a fisherman.‌

Block entity
A barrel has a block entity associated with it that holds additional data about the block.

Trivia

 * In Java Edition 3D Shareware v1.34, barrels render in 2D, are on fire, and spawn naturally within the world, containing random potions, tipped arrows, weapons and armor. Barrels will also explode when closed while empty or shot at.