How to avoid sand/gravel blocks to break when using in Minecraft mechanisms?
When making mechanisms such as elevators based on sand/gravel blocks (and their property of being affected by gravity) how one can avoid those blocks from breaking?
I understand that if blocks bounce there's a higher chance of them breaking. So possibly another take at the question would be: what are the conditions for sand/gravel blocks to break into an item?
Solution 1:
I believe I have determined the algorithm for sand and gravel falling; I previously wrote it up on Minecraft Wiki. I will use "sand" to refer to sand or gravel.
When sand is falling, it is an entity, just like all other freely moving objects. This entity falls under the influence of gravity until it hits something solid on its bottom. This causes an attempt to place a solid block at the cube-grid location containing the bottom-center point of the falling sand. Then, if that cube is occupied by a block (such as a slab or torch), the sand turns into a resource entity (the rotating cube you can pick up) instead.
So, just as conclusions from the above description, some other ways sand can break besides falling on torches:
- A piston head was moving upward through the cube when the sand landed.
- Another sand block landed in that cube while the sand was entering it.
- A piston pushed a block into the cube the sand already partly occupied. (This is what happens in your tower-of-sand example.)
In order to avoid breaking sand with piston mechanisms, don't push blocks into space sand is currently falling into.
Solution 2:
A sand/gravel block will break when falling if the block below is not solid. While moving, the blocks are not considered exactly 'solid', so if the falling block tries to enter a block where there is a moving piston (or block moved by piston), it will likely break.