1

I am using a repeating command block to repeatedly teleport a falling block with a custom tag called "Debris" 0.125 blocks on the negative z axis causes the falling block to teleport to the command block instead and not moving at all:

tp @e[type=falling_block,distance=..200,tag=Debris]

I decided to fix this by forcing the falling block to run the command itself, instead

execute as @e[type=minecraft:falling_block,distance=..200,tag=Debris] run tp @s ~ ~ ~-.125

and I still got the same result of the block being frozen to the command block instead. I'm not sure what I'm doing wrong here, I summoned a block with a custom tag called "Debris", then used a repeating command block to force the block to run the command itself, but it ends up acting like the repeating command block is running the teleport command instead of the block, which is supposed to be running the command because of the execute as.

1 Answer 1

1

/execute as does not change position, it changes the entity only. In your case, /execute as @e[type=falling_block], the falling block is the executor, but the position hasn't changed.

You need to add at @s in order to move the position to the executing entity. Like this:

execute as @e[...] at @s run ..
2
  • That fixed it, but the falling block's movement is choppy and moves every 1 second when being teleported, is there any way I can fix this? Mar 3, 2021 at 18:55
  • Nevermind, I'll just use the motion tag Mar 3, 2021 at 22:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .