Tutorials/Falling blocks

The falling block entity represents a block with entity physics applied. It has various applications, ranging from simple displays of falling objects to advanced command block creations.

Big text == Commands ==uggvukvfyukgkuyeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyeeeeeeeeeeeeeeeeeeyyyyyyyyyyyyyyeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

The most basic  command can be applied by running the command:

This command summons in a  entity in the chosen (x; y; z) coordinates.

To apply properties to the block, write  in the NBT Tag, where   is an optional list of block states.

Extra data can be inserted in the NBT (Named Binary Tag) to modify the time in seconds the block remains in the air. This NBT is, which stands for the time (in ticks) for how long the   has existed. If 0, the entity despawns, if 1 or greater, will continue ticking up, until it reaches its maximum lifetime of 600 ticks, or 30 seconds, at which point it turns into a dropped item. The least time value you can give a falling_block is  (the lowest number that can be represented as a 32-bit integer). Below this value, the block will immediately despawn. It will also turn into an item if it has existed for more than 100 ticks (5 seconds) and is outside the build limit (above y=256 or below y=1). Adding a value of time for the block will cause the block to assume a physical form when coming in contact with the ground, just like a normal sand block falling downwards. Ensure that the different data values are separated by commas:

If the  block spawns at the same coordinates as an existing block, an error: "Unable to summon object." is thrown.

does not necessarily need to fall. For an explosion-like feel, or even a simple bounce, 's motion path can be altered. Note the use of square brackets for the  tag:

The maximum lifetime – 30 seconds – cannot realistically be reached from  unless the   is riding another entity using the 'Passengers' NBT (in which case it isn't falling, but its time is still ticking). can also reach the maximum lifetime if given the NoGravity tag.

can be used to summon multiple blocks using the 'Passengers' NBT. Summoning multiple command blocks is the way you make 'one block commands'.

The NBT tag  allows the falling block not to be falling.

Example uses

 * Create ghost blocks. With the addition of the  tag, a falling block can float in the air, leaving the player the thought that a solid block is there, but in fact that block can be passed through. This can be used for custom maps to hide stuff or to create secret ways. However, these ghost blocks disappear when enough time passes, so one will need to make a Command Block clock or use a Repeating Command Block to respawn them.


 * Make block shooting animation. One can spawn a falling block that has a velocity vector pointing to the direction that they want it to go, so that it will be "shot" to the desired location. This can be used to make self-building houses or block explosions (blocks fly away in many directions).

summon falling_block ~ ~1 ~ {Time:1,BlockState:{Name:redstone_block},Passengers:[ {id:armor_stand,Health:0,Passengers:[ {id:falling_block,Time:1,BlockState:{Name:activator_rail},Passengers:[ {id:command_block_minecart,Command:'gamerule commandBlockOutput false'}, {id:command_block_minecart,Command:'data merge block ~ ~-2 ~ {auto:0}'}, {id:command_block_minecart,Command:'PUT FIRST COMMAND HERE'}, {id:command_block_minecart,Command:'PUT SECOND COMMAND HERE'}, {id:command_block_minecart,Command:'setblock ~ ~1 ~ command_block{auto:1,Command:"fill ~ ~ ~ ~ ~-2 ~ air"}'}, {id:command_block_minecart,Command:'kill @e[type=command_block_minecart,distance=..1]'}]}]}]}
 * Make 'one block commands' using the command below.

Fallender Block チュートリアル/落下中のブロック 教程/下落的方块