Datapack Codex

Advancement/Conditions/distance

Minecraft Wiki article. Categories: Top-level_data_pages

📌 Mirrored from Minecraft Wiki

This article is reproduced from Advancement/Conditions/distance on the Minecraft Wiki. Mirrored from revision 3327662. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

    • [Double] absolute: Test the distance between the two points in 3D space.
    • [NBT Compound / JSON Object] absolute:
      • [Double] max: The maximum value.
      • [Double] min: The minimum value.
    • [Double] horizontal: Test the distance between the two points, ignoring the Y value.
    • [NBT Compound / JSON Object] horizontal:
      • [Double] max: The maximum value.
      • [Double] min: The minimum value.
    • [Double] x: Test the absolute difference between the X-coordinates of the two points.
    • [NBT Compound / JSON Object] x:
      • [Double] max: The maximum value.
      • [Double] min: The minimum value.
    • [Double] y: Test the absolute difference between the Y-coordinates of the two points.
    • [NBT Compound / JSON Object] y:
      • [Double] max: The maximum value.
      • [Double] min: The minimum value.
    • [Double] z: Test the absolute difference between the Z-coordinates of the two points.
    • [NBT Compound / JSON Object] z:
      • [Double] max: The maximum value.
      • [Double] min: The minimum value.

Sources