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

Detecting players farther than ~46340 with command blocks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • None
    • Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2
    • Community Consensus

      When trying to use command blocks to detect when a player leaves a square area by detecting them with circles that have very large radii surrounding the area, I discovered very weird results when the player is farther than 46340 blocks from the centre of the detection radius.

      This issue seems to be related to the limitation of the INT data type and how the player's location is calculated because player detection becomes inverted when the square of the radius is grater than 2,147,483,647

      I've attached a world save with an example of this issue using a command block with the command:

      testfor @a[46340,0,0,1]

            Unassigned Unassigned
            fr567ujnbv CirCole
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: