The Heart Container is a recovery item which, similar to a Heart Piece, is used to increase player health and health capacity. The default starting number of heart containers is 3, which is equal to 12 hitpoints. Each additional Heart Container picked up by a player will both increase the capacity by a full heart (4 hitpoints), and will fill their hitpoints to the player's new max capacity.
The Heart Container can be spawned from Customizable Mob Spawners or dropped from a dispenser. If a player receives a Heart Container directly into their inventory, from a chest or even another container, the player must drop it on the ground and pick it up for it to be added to their health.
Heart Container Hotbar Icon
There is no limit to the number of Heart Containers a player can add, which means they can add enough Heart Containers that a player's health bar will be longer than the screen.
However, be careful when dropping multiple Heart Containers, as the game may glitch and not count all of them. Take your time between dropping and picking up these hearts one by one.
An example of a player picking up a Heart Container