Minecraft – How to walk around regularly while in the ground

minecraft-commandsminecraft-java-edition

I'm a Minecrafter who enjoys using and experimenting with command blocks. For a server, I'm trying to create a sort of shrinking ability. I'm pretty sure this is related to "/tp" somehow but to begin, I need a player to be able to walk one block deep in the ground. Here are some examples:

I understand that in the first one, command blocks are creating falling sand around the player. However, I don't want there to be any falling sand because other players and mobs can fall into the ground that is replaced by falling sand. If you think this is impossible, watch the last video or try the one-command-mod used in it yourself. You can clearly see that there are no falling sand entities around the player with this mod because…

  1. …there is a black frame around the blocks you look at, proving that these are solid blocks that you can break or place other blocks on.
  2. …other entities will not fall into the block like the player will.

So how exactly is the player walking around down there? Shouldn't they be stuck on every block they run into? If a "/tp" command block is teleporting the player, how does it know when to be activated?

Best Answer

I didn't run the command, i just read the OOC and guessing the the principle, hope that i am right.

The command is just teleport the player ~ ~-1 ~ first, so that the player is in the ground. Then, it is teleporting the player ~.00002 and ~-0.00002 in x and z direction repeatedly(positive for 1 time, in the next tick negative...), thus the player can pass through the border between each block.