Make falling sand disappear when it lands
I have a slime riding a falling sand block that is flying through the air. I need the falling sand block to disappear when it hits the ground so that only the slime remains. Is there a way to do this?
Best Answer
If you place a torch beneath the falling sand, the sand block will "break" and become a sand block item that can be picked up or ignored until it despawns.
Pictures about "Make falling sand disappear when it lands"



How do you keep Fall sand from Despawning?
To prevent it from falling down, you can use the NoGravity tag. "sand" can be replaced by any block ID.How do you make sand stay in the air in minecraft?
Falling blocks now drop their item form when falling onto blocks they cannot replace. Added red sand, which creates falling blocks. Added anvils, which create falling blocks.How do you make a falling block?
@Dmitry is correct; if you, for example, drop sand on a piston that's moving several times a second, the sand will eventually decide that it can't stay there and break.How to build an automatic gravel and sand spreader in Minecraft - Tutorial E12
More answers regarding make falling sand disappear when it lands
Answer 2
Create a scoreboard objective named onGround
/scoreboard objectives add onGround dummy
Set all entity's onGround scores whose OnGround tag equals 1 to 1; kill all FallingSand entity's with onGround score of 1
/scoreboard players set @e onGround 1 {OnGround:1b}
/kill @e[type=FallingSand,score_onGround_min=1]
Put the last two commands on a 20Hz clock
If the ground is only made op of a certain material, for example, stone
You can use an execute with detect and test for the block below the FallingSand
/execute @e[type=FallingSand] ~ ~ ~ detect ~ ~-1 ~ stone 0 kill @e[type=FallingStand,r=0]
the r=0 at the end is to make sure that the fallingsand only targets itself.
Answer 3
I already have a slime riding my block, but if you just have a block, you can make an invisible mob ride it and this will still work.
NOTE: All commands here, unless specified, should be run on a 20hz clock.
The solution I found was to let the falling sand become a block, then use the slime to destroy the block. First you need to detect slimes that have only just touched the ground, so they don't destroy other blocks. A scoreboard can be used to track this. First, create the scoreboard objective manually:
/scoreboard objectives add onGroundTicks dummy
Then add to the score for slimes on the ground:
/scoreboard players add @e[type=Slime] onGroundTicks 1 {OnGround:1b}
Any slime that has only just touched the ground for the first time will have a score of 1. Slimes that have never touched the ground have a score of 0. Slimes that have touched the ground before have a score that is greater than 1.
Next, you need to remove the extra blocks around the slimes with a score of 1. I am using barriers, but whatever block you are using, you must replace minecraft:barrier with that block. Only the barrier blocks in this example are destroyed.
/execute @e[type=Slime,score_onGroundTicks=1] ~ ~ ~ /fill ~1 ~ ~1 ~-1 ~ ~-1 minecraft:air 0 replace minecraft:barrier 0
You may or may not want to kill the slimes after that:
/kill @e[type=Slime,score_onGroundTicks_min=2]
Answer 4
If you had a fast redstone clock hooked up to a command block with the following command in it:
/setblock <x> <y> <z> air
Then when the sand falls down the /setblock will change the sand to air ans the slime block will still remain.
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: RODNAE Productions, Kindel Media, Eriks Cistovs, jie ccs
