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

AffectedBlocks/testforblocks will often return a 1or a 0 when counting blocks in the negative x or z axis

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 1.12.2
    • None
    • Overworld
    • Unconfirmed

      Illustrative example:

      Objectives previously added include xPos and is set to 0 to initiate its scoreboard tracking.

      In a mcfunction, running the following lines every tick in a mcfunction via gamerule gameLoopFunction

      execute @a ~ ~ ~ stats entity @a set AffectedBlocks @s xPos
      execute @a ~ ~ ~ testforblocks ~ ~ ~ 0 ~ ~ 0 ~ ~
      execute @a ~ ~ ~ title @s actionbar ["",

      {"text":"x= ","color":"dark_green"}

      ,{"score":

      {"name":"@a","objective":"xPos"}

      ,"color":"dark_green"}]

      So long as the player is in the positive x-axis half of the world, AffectedBlocks testforblocks consistently and reliably returns a proper x-axis block count.

      When the player stands in the negative x half of the world, AffectedBlocks testforblocks intermittently correctly counts the blocks in the x coordinates, and intermittently incorrectly returns a 1 or a 0.

      The same is true for z coordinates. It is not relevant for y as there are no negative y coordinates to contend with in play.

      See attached screen shot illustration of this occurring.

            Unassigned Unassigned
            Gatinh0 Scott Miller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: