Cactus

"What do you reckon is the most embarrassing way to die in Minecraft? Hugging a Creeper you mistook for a loved one? Skinny dipping in a pool of lava? For us, it's the idea of the humble cactus block getting the finishing blow. When you touch their spiky skin, they only deal a half heart of damage at a time. That means you'd have to fall on a cactus block twenty times to perish to their prickles. Oh, the shame..."

- Tom Stone

A cactus is a plant block that generates naturally in dry areas.

Obtaining
Cactus can be mined by hand without taking damage. The tool used to mine the cactus does not affect the speed at which it is mined.

When the spot a cactus is placed in becomes unsuitable, such as when a solid block is placed next to them or their supporting block is removed, the cactus block will uproot and will drop as an item.

A cactus will also be removed and drop itself as an item, if a piston tries to push it (trying to pull it does nothing) or moves a block into its space.

Using a sign on the side of a cactus will cause both the sign and the cactus to drop as items.

Natural generation
Cacti naturally occur in desert and badlands biomes. They generate as one ($11/18$ chance), two ($5/18$ chance), or three ($2/18$ chance) blocks tall. Rarely taller cacti can be found if generation chooses to generate another on top of one already generated (although not as commonly as sugar cane).

A potted cactus can also be found in an igloo with a basement. Potted cacti also found in some desert village buildings.

Farming
Cacti naturally grow to a height of three blocks, adding a block of height when the top cactus block has received 16 random ticks (i.e. on average every 18 minutes, but the actual rate can vary widely). Bone meal does not work on cacti to speed its growth. A cactus does not need light to grow and is non-flammable. If a cactus has space directly above it, it will grow even if the newly-grown block will immediately break due to adjacent blocks.

Usage
A cactus block may only be placed on sand or another cactus block. A cactus will break itself (and drop as an item), if any block with a solid material, or lava, is in any of the 4 blocks horizontally adjacent. It will also break if on sand and the block above is water or lava. In the Legacy Console Edition, a cactus will also break if a bed is placed next to it.

When any entity, including players and mobs, touches a cactus, damage is taken every 0.5 seconds. Damage from touching a cactus is reduced by armor, but touching it also damages the armor. Mobs will not avoid cacti when they pathfind, making them good for trap and farm design.

Cacti will also destroy any items that come into contact with them, including cactus blocks harvested above them.

When a minecart hits a cactus block, the minecart is dropped as an item - this item is often destroyed as a result, although a hopper will pick it up faster.

A cactus can also be placed in a flower pot, where it is rendered harmless.

Cactus (excluding its spines) is $7/8$ of a block in width (the same as chests) and a full block in height, however the collision box is $15/16$ of a block high.

Composting
Placing a cactus into a composter has a 20% chance of raising the compost level by 1.

Block data
In Bedrock Edition, cacti use the following data values:

Trivia

 * The bottom of a cactus block does not damage the player.
 * Cacti can be placed underwater, provided they are placed on sand, and will grow if they break the surface.
 * Cacti can be placed next to saplings, but the cactus will break when the tree grows.
 * Endermen can move and place cacti. Thus, they can increase the cactus population in deserts by moving cactus blocks as they grow.
 * Signs can be placed on top of cacti.
 * It is possible for cacti to generate on blocks other than sand due to generated structures; refer to the gallery for examples.
 * Cactus can be used in the desert to see if the player is in a newly generated area. If most of the cacti around the player is only one block high, then it is most likely new land.
 * Death to a cactus will display "[playername] was pricked to death" in the chat messages.
 * It is possible to place blocks on top of a cactus.
 * It is possible to place redstone next to a cactus block and the block won't be destroyed.
 * By placing more cactus blocks on top of a cactus, it is possible to create an arbitrarily tall cactus. However, it will not naturally grow.