Sand and Gravel Duplication
Sand and gravel duplication is a timing glitch that creates extra sand or gravel by separating a falling block's entity from its original block.
How it works
Unsupported sand and gravel create a falling sand entity when their scheduled fall check runs. Creating the entity does not immediately remove the original block. During each of its updates, the entity removes a block of the same kind at its current position, after moving. A missing original block does not cancel the entity.
A piston can move the original block before the entity removes it. The moved block survives, while the entity remains a separate copy. A sticky piston can pull the original back onto a support. If the falling copy later passes through the preserved block, it removes that block too.
The falling copy lands as a block or drops as an item under the ordinary landing rules. The original can be used again. Duplicated gravel that drops this way gives gravel, not flint.
Timing
Sand and gravel schedule a fall check 3 game ticks after placement or a block update. The block below must allow falling when the check runs.
The piston must separate the original block and the entity after the entity appears, but before its next update removes the original. Moving the block before the fall check prevents that check from creating an entity at the old position. Moving it after the entity has removed it preserves no original.
Scheduled checks due together run in the order they were scheduled. Piston movements triggered by those checks happen immediately. Their order matters when the fall check and the piston movement occur in the same tick.