Minecraft – ny command that makes fallen sand permanent

minecraft-commandsminecraft-java-edition

Is there a command that forces falling sand to stay on the ground as a ghost block forever, and to never break?

The result would be something like the one in this video:

Best Answer

You can force a FallingSand entity to ride an armor stand to prevent it from falling.

1.8:

/summon FallingSand ~ ~1 ~ {Time:1,Riding:{id:"ArmorStand",NoGravity:1,Invisible:1}}

1.9:

/summon ArmorStand ~ ~1 ~ {NoGravity:1,Invisible:1,Passengers:[{id:"FallingSand",Time:1}]}

However, FallingSand will not exist forever. Once its internal timer ticks to 600 while it's within the boundaries of the world, it will despawn. The preventative for that is to periodically set the Time tag back to 1, which will reset the internal timer.

/entitydata @e[type=FallingSand] {Time:1}

Alternatively, you can summon an armor stand that is wearing the desired block on its head without the need for FallingSand, though it will be slightly smaller than a full block.

1.8:

/summon ArmorStand ~ ~1 ~ {NoGravity:1,Invisible:1,Equipment:[{},{},{},{},{id:"minecraft:sand"}]}

1.9:

/summon ArmorStand ~ ~1 ~ {NoGravity:1,Invisible:1,ArmorItems:[{},{},{},{id:"minecraft:sand"}]}