Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-134741

Tp with relative y makes a floating glitch

XMLWordPrintable

    • Community Consensus
    • (Unassigned)

      Using commands blocks on repeat, and this command: "/execute as @e[type=villager] at @s run tp @s ~ ~ ~" results in floating Villagers that can't be moved up or down from gravity or knockback. This is also the same with other mobs that I have tested, however, is not similar to a player. If the same command is used on a player, the player moves normally. Any mobs run with this command should fall and be affected in the y-direction, considering that the command is teleporting the mob to the place they are currently located, so any gravity affecting them should pull them down.

      This is also inconsistent with how mobs can be moved in the x/z-direction by knockback, but gravity has no effect on them. If the command was truly meant to keep a mob in the air because the y-value doesn't affect them, then it should also be consistent with how the x and z values work, and that they would be unmovable in those directions. However this is not the case, and mobs should be affected by gravity.

      This becomes a problem when wanting to move mobs with commands such as "/execute as @e[type=villager] at @s run tp @s ~ ~ ~1" (which would move the villager to the side, in order to animate them) but villagers decide they can defy gravity when going off a block.

      Thanks!

      Recreation

      Use a command such as "/execute as @e[type=villager] at @s run tp @s 0.1~ ~ ~" in a repeat command block. Take the block from under the villager. The villager will walk northward, and you will be able to push him to the side, however, he will not move up or down in any way unless teleported.

            Unassigned Unassigned
            TheMCLionSheep Gabriel Iskandar
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: