<location> offset by <x>, <y>, <z>since 1.7.0The place that far away
teleport player to player's location offset by 0, 10, 0Try it← All of the Docs The world
<location> offset by <x>, <y>, <z>since 1.7.0The place that far away
teleport player to player's location offset by 0, 10, 0Try itlocation above <location> / location below <location>since 1.7.0One block up or down
set block at location below player's location to stoneTry itlocation <n> blocks in front of <who>since 1.7.0Where they are looking, that far away
set {_ahead} to location 3 blocks in front of playerTry itlocation <n> blocks behind <who>since 1.7.68That far behind them, on the level, from where they stand. location behind <who> is one block
set {_spot} to location 2 blocks behind player
summon zombie at {_spot}Try itlocation <n> blocks left of <who>since 1.7.68That far to their left, likewise; right of for the other side, and location left of <who> is one block
set {_spot} to location 3 blocks left of player
place stone at {_spot}Try itmidpoint between <a> and <b>since 1.7.0Halfway between two places
set {_middle} to midpoint between {arena.corner1} and {arena.corner2}Try ithighest block at <location>since 1.7.0The top block of that column, as a location
teleport player to location above highest block at player's locationTry itbiome at <location>since 1.7.0The biome's name, e.g. plains
send "&7Biome: &f" + biome at player's locationTry itlight level at <location>since 1.7.00 (dark) to 15 (bright)
if light level at player's location < 8:
send "&7Mobs can spawn here."Try ittarget block of <who>since 1.7.0The block they are looking at, up to 100 blocks away, as a location
set {_looked} to target block of player
if {_looked} is set:
strike fake lightning at {_looked}Try itblock (below/above) <who>since 1.7.45The kind of block under their feet, or over their head, such as gold_block. A location works in place of a player: the block one lower or higher
on player jump:
if block below player is "slime_block":
push player upward with force 2Try itvehicle of <who>since 1.7.45What they are riding, as a creature; unset if they are on foot
set {_mount} to vehicle of playerTry it<location> is within <n> blocks of <location>since 1.7.0A condition
if player's location is within 10 blocks of {spawn}:
send "&aYou are near spawn."Try it<location> is loadedsince 1.7.0Whether that part of the world is loaded
if {arena} is loaded:
summon zombie at {arena}Try itWays to get from one location to another, and to ask about one.
on player sneak:
set {_ahead} to location 3 blocks in front of player
if block at {_ahead} is "air":
set block at {_ahead} to stone
| Syntax | Result |
|---|---|
<location> offset by <x>, <y>, <z> | The place that far away |
location above <location> / location below <location> | One block up or down |
location <n> blocks in front of <who> | Where they are looking, that far away |
location <n> blocks behind <who> | That far behind them, on the level, from where they stand. location behind <who> is one block |
location <n> blocks left of <who> | That far to their left, likewise; right of for the other side, and location left of <who> is one block |
midpoint between <a> and <b> | Halfway between two places |
highest block at <location> | The top block of that column, as a location |
biome at <location> | The biome's name, e.g. plains |
light level at <location> | 0 (dark) to 15 (bright) |
target block of <who> | The block they are looking at, up to 100 blocks away, as a location |
block (below/above) <who> | The kind of block under their feet, or over their head, such as gold_block. A location works in place of a player: the block one lower or higher |
vehicle of <who> | What they are riding, as a creature; unset if they are on foot |
<location> is within <n> blocks of <location> | A condition |
<location> is loaded | Whether that part of the world is loaded |
Coordinates can be written out wherever a line ends with a place: set {spawn} to 0, 64, 0 in "world".