-
Notifications
You must be signed in to change notification settings - Fork 0
Location Presets
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 } }
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 }
The world identifier (combination of modid:worldid).
"world": "minecraft:overworld"
The X position to teleport the player to in the world provided.
"x": 100.0
The Y position to teleport the player to in the world provided.
"y": 100.0
The Z position to teleport the player to in the world provided.
"z": 100.0
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
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
Below are the available Molang functions to use with Location Presets!
q.player.teleport_utils_location('<LOCATION_DEF_ID>')
This Molang Function will return teleport the player to the Location Preset ID provided.
q.player.teleport_utils_location('example_location')