Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Coordinates: Difference between revisions

From SAS Gaming Wiki
SyncBot (talk | contribs)
Remove broken links to missing pages
SyncBot (talk | contribs)
Fix template calls: add MC/ prefix
 
Line 1: Line 1:
{{redirect|Direction|the direction an entity is facing|Rotation}}
{{MC/Redirect|Direction|the direction an entity is facing|Rotation}}
{{See also|South-east rule|Distance}}
{{MC/See also|South-east rule|Distance}}


'''Coordinates''' numerically represent a location in a [[Minecraft:dimension]].
'''Coordinates''' numerically represent a location in a [[Minecraft:dimension]].
Line 33: Line 33:


==== ''Java Edition'' ====
==== ''Java Edition'' ====
{{IN|java}}, pressing {{key|F3}} (or {{key|Fn+F3}} on Macs and some laptops or {{key|Alt+Fn+F3}} on newer Macs{{verify|Macbook Air M2 (2022) has fn+f3 keybinding. There's no alt key in macs, corresponding key is option.}}) brings up a debug screen that shows the player's current coordinates (''XYZ'') and rotation in the upper left part of the screen. It also shows other useful in-game information, like the block position of the player, and the position of this block within the current chunk. The debug screen also replaces the [[Minecraft:Heads-up display#Crosshair|crosshair]] with a display of these three directions: +X in red, +Y in green, +Z in blue (eastward, upward, and southward, respectively). Some information can be hidden using {{cmd|/gamerule reducedDebugInfo true}} command.
{{MC/In|java}}, pressing {{MC/Key|F3}} (or {{MC/Key|Fn+F3}} on Macs and some laptops or {{MC/Key|Alt+Fn+F3}} on newer Macs{{MC/Verify|Macbook Air M2 (2022) has fn+f3 keybinding. There's no alt key in macs, corresponding key is option.}}) brings up a debug screen that shows the player's current coordinates (''XYZ'') and rotation in the upper left part of the screen. It also shows other useful in-game information, like the block position of the player, and the position of this block within the current chunk. The debug screen also replaces the [[Minecraft:Heads-up display#Crosshair|crosshair]] with a display of these three directions: +X in red, +Y in green, +Z in blue (eastward, upward, and southward, respectively). Some information can be hidden using {{MC/Cmd|/gamerule reducedDebugInfo true}} command.


<gallery mode="packed">
<gallery mode="packed">
Line 41: Line 41:


==== ''Bedrock Edition'' ====
==== ''Bedrock Edition'' ====
{{IN|bedrock}}, the block position of the player can be displayed by changing the world options. The coordinates are displayed in a box in the top left, if the "Show Coordinates" option is turned on in the game settings screen or {{command|gamerule showcoordinates true}} is used.
{{MC/In|bedrock}}, the block position of the player can be displayed by changing the world options. The coordinates are displayed in a box in the top left, if the "Show Coordinates" option is turned on in the game settings screen or {{MC/Command|gamerule showcoordinates true}} is used.


The coordinates can also be shown in the chat by enabling "Copy Coordinate UI" in the [[Minecraft:Settings#Creator|creator settings]], which is independent from the world options. The player's coordinates are shown with two decimals, and the player can also choose to show the coordinates of the block the player is currently facing. Both coordinates can also be copied with a customizable hotkey, {{Keys|Ctr+Alt+C}} for the player's coordinates and {{Keys|Ctr+Alt+X}} for the facing coordinates by default.
The coordinates can also be shown in the chat by enabling "Copy Coordinate UI" in the [[Minecraft:Settings#Creator|creator settings]], which is independent from the world options. The player's coordinates are shown with two decimals, and the player can also choose to show the coordinates of the block the player is currently facing. Both coordinates can also be copied with a customizable hotkey, {{MC/Keys|Ctr+Alt+C}} for the player's coordinates and {{MC/Keys|Ctr+Alt+X}} for the facing coordinates by default.


<gallery mode="packed">
<gallery mode="packed">
Line 53: Line 53:
Some [[Minecraft:commands]] use require the player to specify coordinates. They can be expressed explicitly, using absolute world coordinates, or relative to the command source, using relative world coordinates or local coordinates.
Some [[Minecraft:commands]] use require the player to specify coordinates. They can be expressed explicitly, using absolute world coordinates, or relative to the command source, using relative world coordinates or local coordinates.


{{anchor|Tilde notation|Tilde and caret notation}}
{{MC/Anchor|Tilde notation|Tilde and caret notation}}


=== Relative world coordinates ===
=== Relative world coordinates ===
When specifying coordinates, each coordinate can alternatively be expressed as a '''relative world coordinate''', written in '''tilde notation''' (<code>~ΔX ~ΔY ~ΔZ</code>). A number following a tilde (~) describes an offset from execution position along one of the world axes, and a lone tilde assumes an offset of 0.
When specifying coordinates, each coordinate can alternatively be expressed as a '''relative world coordinate''', written in '''tilde notation''' (<code>~ΔX ~ΔY ~ΔZ</code>). A number following a tilde (~) describes an offset from execution position along one of the world axes, and a lone tilde assumes an offset of 0.
For example, the position {{distdir|10|-30}} <code>~10 ~ ~-30</code> means "10 blocks east (+X) and 30 blocks north (–Z) of here." And <code>~ ~ ~</code> means the command's current position.
For example, the position {{MC/Distdir|10|-30}} <code>~10 ~ ~-30</code> means "10 blocks east (+X) and 30 blocks north (–Z) of here." And <code>~ ~ ~</code> means the command's current position.


Relative world coordinates can mix with absolute coordinates; for example, {{cmd|tp ~ 64 ~}} keeps the sender's X and Z positions unchanged but teleports them to an absolute height of 64 blocks.
Relative world coordinates can mix with absolute coordinates; for example, {{MC/Cmd|tp ~ 64 ~}} keeps the sender's X and Z positions unchanged but teleports them to an absolute height of 64 blocks.


The {{Command|execute}} command can update a command's current position, changing the meaning of <code>~ ~ ~</code>.
The {{MC/Command|execute}} command can update a command's current position, changing the meaning of <code>~ ~ ~</code>.


=== Local coordinates ===
=== Local coordinates ===
The other way to describe positions is with '''local coordinates''', written in '''caret notation''' (<code>{{Local frame}}</code>).
The other way to describe positions is with '''local coordinates''', written in '''caret notation''' (<code>{{MC/Local frame}}</code>).


Like relative coordinates, these describe positions relative to where a command is executed from, but with different directions. A number following a caret (^) is an offset within a moving, entity-centric frame: This coordinate system is centered at the executor's position, with +X<sub>local</sub> directed to its left, +Y<sub>local</sub> directed upward, and +Z<sub>local</sub> directed in the direction the sender faces. (Note that an entity with rotation <code>0 0</code> has its local frame aligned with the world frame.)
Like relative coordinates, these describe positions relative to where a command is executed from, but with different directions. A number following a caret (^) is an offset within a moving, entity-centric frame: This coordinate system is centered at the executor's position, with +X<sub>local</sub> directed to its left, +Y<sub>local</sub> directed upward, and +Z<sub>local</sub> directed in the direction the sender faces. (Note that an entity with rotation <code>0 0</code> has its local frame aligned with the world frame.)
Line 70: Line 70:
Described in other terms, these coordinates express ^ΔSway ^ΔHeave ^ΔSurge
Described in other terms, these coordinates express ^ΔSway ^ΔHeave ^ΔSurge


For example, {{cmd|tp ^ ^ ^5}} teleports the player 5 blocks forward. If they turn around and repeat the command, they are teleported back to where they started.
For example, {{MC/Cmd|tp ^ ^ ^5}} teleports the player 5 blocks forward. If they turn around and repeat the command, they are teleported back to where they started.


{{IN|java}}, pressing {{key|F3}}+{{key|B}} displays the +Z<sub>local</sub> direction for all entities as a blue ray centered on their heads.
{{MC/In|java}}, pressing {{MC/Key|F3}}+{{MC/Key|B}} displays the +Z<sub>local</sub> direction for all entities as a blue ray centered on their heads.


Local coordinates cannot be mixed with world coordinates (e.g. <code>^ 0 ^</code>, <code> ^ 0 ~1</code>), and attempting so alerts the typist, "Cannot mix world & local coordinates (everything must either use ^ or not)." So such a command fails to be parsed. However, this effect can be achieved using {{cmd|execute rotated ~ 0}} to "globalize" the y coordinate, and {{cmd|execute rotated 0 ~}} to "globalize" the x and z coordinates. For example, {{cmd|execute rotated ~ 0 run tp ^ ^ ^3}} teleports the player 3 blocks in forward, but at the same Y level.
Local coordinates cannot be mixed with world coordinates (e.g. <code>^ 0 ^</code>, <code> ^ 0 ~1</code>), and attempting so alerts the typist, "Cannot mix world & local coordinates (everything must either use ^ or not)." So such a command fails to be parsed. However, this effect can be achieved using {{MC/Cmd|execute rotated ~ 0}} to "globalize" the y coordinate, and {{MC/Cmd|execute rotated 0 ~}} to "globalize" the x and z coordinates. For example, {{MC/Cmd|execute rotated ~ 0 run tp ^ ^ ^3}} teleports the player 3 blocks in forward, but at the same Y level.


A command's execution position, rotation, dimension, and anchor all can change the effect of using <code>^ ^ ^</code>. These can be updated by the {{Command|execute}} command.
A command's execution position, rotation, dimension, and anchor all can change the effect of using <code>^ ^ ^</code>. These can be updated by the {{MC/Command|execute}} command.


== History ==
== History ==
=== ''Java Edition'' ===
=== ''Java Edition'' ===
{{HistoryTable
{{HistoryTable
|{{HistoryLine|java infdev}}
|{{MC/HistoryLine|java infdev}}
|{{HistoryLine||20100630-1835|Spawn Y is now set to 64 if it is at or below 0.}}
|{{MC/HistoryLine||20100630-1835|Spawn Y is now set to 64 if it is at or below 0.}}
|{{HistoryLine|java alpha}}
|{{MC/HistoryLine|java alpha}}
|{{HistoryLine||v1.2.3|Coordinates now appear on the debug screen.}}
|{{MC/HistoryLine||v1.2.3|Coordinates now appear on the debug screen.}}
|{{HistoryLine|java}}
|{{MC/HistoryLine|java}}
|{{HistoryLine||1.0.0|dev=Beta 1.9 Prerelease 4|Postive X is changed from west to east}}
|{{MC/HistoryLine||1.0.0|dev=Beta 1.9 Prerelease 4|Postive X is changed from west to east}}
|{{HistoryLine||1.13|dev=17w50a|Local coordinates can now be specified in commands using {{cd|^}}.}}
|{{HistoryLine||1.13|dev=17w50a|Local coordinates can now be specified in commands using {{MC/Cd|^}}.}}
}}
}}


=== ''Bedrock Edition'' ===
=== ''Bedrock Edition'' ===
{{HistoryTable
{{HistoryTable
|{{HistoryLine|bedrock}}
|{{MC/HistoryLine|bedrock}}
|{{HistoryLine||1.2.0|dev=beta 1.2.0.31|Added coordinates as a world toggle.
|{{HistoryLine||1.2.0|dev=beta 1.2.0.31|Added coordinates as a world toggle.
|Coordinates can now be enabled from the command {{cd|/gamerule showCoordinates}} and appear in the top left corner of the screen.}}
|Coordinates can now be enabled from the command {{MC/Cd|/gamerule showCoordinates}} and appear in the top left corner of the screen.}}
|{{HistoryLine||1.8.0|dev=beta 1.8.0.8|Showing coordinates no longer requires cheats to be enabled.}}
|{{MC/HistoryLine||1.8.0|dev=beta 1.8.0.8|Showing coordinates no longer requires cheats to be enabled.}}
}}
}}


=== Legacy Console Edition ===
=== Legacy Console Edition ===
{{HistoryTable
{{HistoryTable
|{{HistoryLine|console}}
|{{MC/HistoryLine|console}}
|{{HistoryLine||xbox=TU2|xbone=CU1|ps3=1.00|psvita=1.00|ps4=1.00|wiiu=Patch 1|switch=1.0.1|Coordinates are displayed at the top corner of a [[Minecraft:map]].}}
|{{MC/HistoryLine||xbox=TU2|xbone=CU1|ps3=1.00|psvita=1.00|ps4=1.00|wiiu=Patch 1|switch=1.0.1|Coordinates are displayed at the top corner of a [[Minecraft:map]].}}
}}
}}


=== ''New Nintendo 3DS Edition'' ===
=== ''New Nintendo 3DS Edition'' ===
{{HistoryTable
{{HistoryTable
|{{HistoryLine|3ds}}
|{{MC/HistoryLine|3ds}}
|{{HistoryLine||0.1.0|Coordinates are displayed at the bottom Touch Screen alongside the map and hotbar.}}
|{{MC/HistoryLine||0.1.0|Coordinates are displayed at the bottom Touch Screen alongside the map and hotbar.}}
}}
}}


== Issues ==
== Issues ==
{{Issue list}}
{{MC/Issue list}}


== Navigation ==
== Navigation ==
{{Navbox Java Edition technical|general}}
{{MC/Navbox Java Edition technical|general}}
{{Navbox Bedrock Edition}}
{{MC/Navbox Bedrock Edition}}


[[Category:Game terms]]
[[Category:Game terms]]

Latest revision as of 20:16, 9 April 2026

Template:Hatnote {{#vardefine:params|2 }}Template:Hatnote

Coordinates numerically represent a location in a Minecraft:dimension.

World coordinates

File:Coordinates.png
X, Y and Z coordinate on a Minecraft map.
North is upward, at *negative* z and 180 degrees. Moving clockwise, East is to the right at positive X and -90 degrees. South is down, at *positive* Z and 0 degrees. West is left, at negative X and +90 degrees.
X and Z axes with directions shown, from a birds-eye view. Red highlights where these axes are different than standard.

World coordinates are expressed as a set of three absolute world coordinates (X Y Z), each number representing a distance along an axis from the world origin.

Coordinate system

World coordinates are based on a grid where three lines or axes intersect at the origin point.

  • The x-axis indicates the player's distance east (positive) or west (negative) of the origin point—i.e., the longitude,
  • The z-axis indicates the player's distance south (positive) or north (negative) of the origin point—i.e., the latitude,
  • The y-axis indicates how high or low (from -64 to 320, with 63 being sea level) the player is—i.e., the elevation,
  • The unit length of the three axes equals the side of one block. And, in terms of real-world measurement, one block equals 1 cubic meter.

The origin point marks the zero point for the x and z coordinates. Hence, it may be thought of as the 0,0 coordinate:

  • X-axis = 0
  • Z-axis = 0

As the player travels south, the z-axis number increases; travel north and it decreases. Similarly, the x-axis number increases as the player travels east and decreases as they travel west. As the player's elevation rises, the y-axis number increases, and as the player's elevation lowers, that number decreases.

An entity's coordinates are actually the coordinates of the center at the bottom of entity's collision box. When the display shows that the player is at position Y=63, then the player's feet are at Y=63.0, and their eyes are at Y=64.62.

Block position

The position of a block is actually the coordinates of the point at the lower northwest corner of the block, that is, the integer coordinates obtained by rounding down the coordinates inside the block.

In Minecraft, decimal coordinates usually needs to be converted into integer coordinates by rounding down, which is called the block position of the coordinate. Note that for positive coordinates a block position starts with 0 (it's so-called 0-based), and for negative coordinates it starts with -1.

There are available interactive calculators (hosted on this wiki) that may be used to convert between different types of coordinate values.

Displaying coordinates

Java Edition

in Template:Editions, pressing

  1. REDIRECT Template:Keys

Template:Redr (or

  1. REDIRECT Template:Keys

Template:Redr on Macs and some laptops or

  1. REDIRECT Template:Keys

Template:Redr on newer Macs{{

 #vardefine: verifyedition | 

}}<verify for {{#var:verifyedition}}></verify for {{#var:verifyedition}}>{{

 #vardefine: verifyedition | 

}}) brings up a debug screen that shows the player's current coordinates (XYZ) and rotation in the upper left part of the screen. It also shows other useful in-game information, like the block position of the player, and the position of this block within the current chunk. The debug screen also replaces the crosshair with a display of these three directions: +X in red, +Y in green, +Z in blue (eastward, upward, and southward, respectively). Some information can be hidden using

  1. REDIRECT Template:Command

Template:Redr command.

Bedrock Edition

in Template:Editions, the block position of the player can be displayed by changing the world options. The coordinates are displayed in a box in the top left, if the "Show Coordinates" option is turned on in the game settings screen or Script error: No such module "command". is used.

The coordinates can also be shown in the chat by enabling "Copy Coordinate UI" in the creator settings, which is independent from the world options. The player's coordinates are shown with two decimals, and the player can also choose to show the coordinates of the block the player is currently facing. Both coordinates can also be copied with a customizable hotkey, Script error: No such module "keys". for the player's coordinates and Script error: No such module "keys". for the facing coordinates by default.

Commands

Some Minecraft:commands use require the player to specify coordinates. They can be expressed explicitly, using absolute world coordinates, or relative to the command source, using relative world coordinates or local coordinates.

Relative world coordinates

When specifying coordinates, each coordinate can alternatively be expressed as a relative world coordinate, written in tilde notation (~ΔX ~ΔY ~ΔZ). A number following a tilde (~) describes an offset from execution position along one of the world axes, and a lone tilde assumes an offset of 0. For example, the position 32 blocks NNE ~10 ~ ~-30 means "10 blocks east (+X) and 30 blocks north (–Z) of here." And ~ ~ ~ means the command's current position.

Relative world coordinates can mix with absolute coordinates; for example,

  1. REDIRECT Template:Command

Template:Redr keeps the sender's X and Z positions unchanged but teleports them to an absolute height of 64 blocks.

The Script error: No such module "command". command can update a command's current position, changing the meaning of ~ ~ ~.

Local coordinates

The other way to describe positions is with local coordinates, written in caret notation (^ΔXlocal ^ΔYlocal ^ΔZlocal).

Like relative coordinates, these describe positions relative to where a command is executed from, but with different directions. A number following a caret (^) is an offset within a moving, entity-centric frame: This coordinate system is centered at the executor's position, with +Xlocal directed to its left, +Ylocal directed upward, and +Zlocal directed in the direction the sender faces. (Note that an entity with rotation 0 0 has its local frame aligned with the world frame.)

Described in other terms, these coordinates express ^ΔSway ^ΔHeave ^ΔSurge

For example,

  1. REDIRECT Template:Command

Template:Redr teleports the player 5 blocks forward. If they turn around and repeat the command, they are teleported back to where they started.

in Template:Editions, pressing

  1. REDIRECT Template:Keys

Template:Redr+

  1. REDIRECT Template:Keys

Template:Redr displays the +Zlocal direction for all entities as a blue ray centered on their heads.

Local coordinates cannot be mixed with world coordinates (e.g. ^ 0 ^, ^ 0 ~1), and attempting so alerts the typist, "Cannot mix world & local coordinates (everything must either use ^ or not)." So such a command fails to be parsed. However, this effect can be achieved using

  1. REDIRECT Template:Command

Template:Redr to "globalize" the y coordinate, and

  1. REDIRECT Template:Command

Template:Redr to "globalize" the x and z coordinates. For example,

  1. REDIRECT Template:Command

Template:Redr teleports the player 3 blocks in forward, but at the same Y level.

A command's execution position, rotation, dimension, and anchor all can change the effect of using ^ ^ ^. These can be updated by the Script error: No such module "command". command.

History

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

Legacy Console Edition

Template:HistoryTable

New Nintendo 3DS Edition

Template:HistoryTable

Issues

Script error: No such module "Issue list".

Navigation

Concepts
General format
World
Legacy
Level format
Legacy
.minecraft
Tools
Sound
Commands

All commands

Launching
Legacy
Protocol
Server
Protocols
Legacy
Components
Tag
GameTest
World generation
Noise settings
Structures
Removed
Data packs
Tutorials
Content
World generation

Template:Article other

Editions
Merged
Ports to consoles
Discontinued
Development
Version history
Technical
Creator
Add-ons
Multiplayer
Exclusive features
Blocks
Mobs
Effects
Unused
Removed

de:Koordinaten es:Coordenadas fr:Coordonnées ja:座標 ko:좌표 nl:Coördinaten pt:Coordenadas ru:Координаты uk:Координати zh:坐标