Skip to content

Location Presets

Stampede edited this page Aug 14, 2025 · 2 revisions

This page guide through creating a Location Preset and then using the related Molang functions! The locations.json file contains all Location Presets created and is where you can add, edit, or remove existing presets. You can also add them using the related commands, see Commands and Permissions for more info! The locations.json file is a "map" of Preset ID (strings) to a value of options for that location. See the Location Options section below for all of the available options.

{
  "example_location": {
    "world": "minecraft:overworld",
    "x": 100.0,
    "y": 64.0,
    "z": 100.0,
    "yaw": 0.0,
    "pitch": 0.0
  }
}

Locations Options

Listed below are the available options for configuring a Location Preset.

"example_location": {
  "world": "minecraft:overworld", 
  "x": 100.0,
  "y": 64.0,
  "z": 100.0
  "yaw": 0.0,
  "pitch": 0.0
}

World (required)

The world identifier (combination of modid:worldid).

"world": "minecraft:overworld"

X (required)

The X position to teleport the player to in the world provided.

"x": 100.0

Y (required)

The Y position to teleport the player to in the world provided.

"y": 100.0

Z (required)

The Z position to teleport the player to in the world provided.

"z": 100.0

Yaw

The yaw (player view angle, left to right) to set the player to when teleporting. Can be a double 0 to 360. If not provided, the player will keep their existing yaw.

"yaw": 90.0

Pitch

The pitch (player view angle, up and down) to set the player to when teleporting. Can be a double 0 to 180. If not provided, the player will keep their existing pitch.

"pitch": 180.0

Molang Functions

Below are the available Molang functions to use with Location Presets!

Teleport to Location Preset

q.player.teleport_utils_location('<LOCATION_DEF_ID>')

This Molang Function will return teleport the player to the Location Preset ID provided.

Example Uses

  • q.player.teleport_utils_location('example_location')

Clone this wiki locally