Java Edition:Cactus Next to Invalid Block
Cacti usually cannot be placed next to a block, and will pop off when a block is placed next to them. However, there are versions where it is possible to place them in invalid positions.
Since Alpha v1.0.14 cacti can grow, so a block needs to be placed above cactus before creating invalid block combination to prevent it from updating.
Obtaining
Full Block Cactus
Between versions Alpha v1.0.6 to Alpha v1.0.10, cacti occupied a full block. In these versions, full block cacti had some unique properties such as hurting the player when interacted with (i.e. right click or left clicking on) and not hurting the player when they walk into the side of the cactus. Because they were a full block, the player was able to place cacti in invalid positions – next to each other, on any block, or in the air.
Block Replacement Bypass
From Alpha v1.0.5 to Beta 1.4_01 it is possible to suppress the breaking of the cactus using water, lava and fire. Placing a block in these blocks causes the blocks to skip the initial update tick. This allows for blocks to be placed in positions where they should not be allowed to.
Enderman Placement
Cactus Growth
15w49a Changes
To do: Breaks if adjacent to lava, refer to MC wiki
Froglight Placement
Mangrove Growth
Generation
Chunk Resetting
Both chunk savestating and regeneration can be used to place any block adjacent to a cactus. This works because chunk resetting does not send a block update, so you can place a cactus on a chunk border and then reset the adjacent chunk. If a block generates in the newly generated chunk this doesn't send an update and thus you can have a cactus next to another block. However, this is limited to cacti localized on the chunk borders.
Update Suppression
Suppressing block updates when placing a block next to a cactus prevents it from breaking.