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

Debug menu interprets -0 coordinate while commands don't

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.11 Pre-Release 1
    • None
    • macOS Sierra Version 10.12.1
    • Unconfirmed
    • Creative

      I know that this is technically a duplicate of MC-36602, but this is how it should be fixed.

      Make a new Redstone Ready superflat world, and run this command:

      /tp @p 0 56 0

      After that, run this command:

      /setblock 0 55 0 minecraft:red_sandstone

      A red sandstone block will be placed under you. After that, go into the debug menu (F3) and take a step west. Your X coordinate should be `-0`. Run this command to mark this position.

      /setblock ~ 55 ~ minecraft:red_nether_brick

      Now, run this teleportation command. This changes the coordinates to the same ones you are standing on now.

      /tp @p -0 56 0

      Notice anything? It will teleport you back onto the red sandstone, and not keep you on the red nether brick. This is because the debug menu interprets `-0` as a different coordinate than `0`. The debug menu's `-0` are commands' `-1`. In order to fix this, the debug menu has to get rid of `-0` (it isn't a real number). We don't need any savefile changes; you just need to offset the coordinates by -1 if the coordinates are less than 0.

            Unassigned Unassigned
            Purpur Purpur
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: