# MCO Goto
MCO Goto is a client-side Fabric mod for MinecraftOnline that adds an automated `/goto` command powered by the MinecraftOnline map marker database.
Instead of manually searching the MinecraftOnline map for a location, finding its coordinates and dimension, and then entering a `/tpto` command, MCO Goto handles the entire process automatically.
Simply use:
`/goto <location>`
MCO Goto retrieves the MinecraftOnline marker database, searches for the requested location, determines its coordinates and dimension, and executes the configured teleport command.
## Features
### Automatic location lookup
MCO Goto retrieves the MinecraftOnline marker database from the configured endpoint and searches through the available map markers.
Exact location names are preferred, and searches are case-insensitive.
### Partial location search and recommendations
If an exact match cannot be found, MCO Goto searches for locations whose names contain the requested text.
For example:
`/goto test`
can return multiple matching locations as recommendations.
If no matching location can be found, MCO Goto reports that the requested location was not found.
### Automatic teleportation
Once a location has been found, MCO Goto automatically generates and sends the configured teleport command.
The default command is:
`/tpto {x} {y} {z} {dimension}`
The `{x}`, `{y}`, `{z}`, and `{dimension}` placeholders are automatically replaced with the marker's coordinates and dimension.
### Dimension support
MCO Goto supports the three standard Minecraft dimensions:
- Overworld
- Nether
- End
The dimension is extracted from the marker database using a configurable regular expression.
The player's current dimension does not affect location searching.
### Distance information
When the destination is in the same dimension as the player, MCO Goto calculates the distance between the player's current position and the destination.
The teleport message displays the approximate distance travelled.
When the destination is in another dimension, the message instead identifies the destination dimension.
### MinecraftOnline Wiki integration
When a marker contains a MinecraftOnline Wiki link, the destination displayed by MCO Goto becomes an interactive link.
The location can be clicked to open its Wiki page, while hovering over it provides additional information about the associated Wiki page and URL.
### Local marker database cache
MCO Goto automatically saves a local copy of the complete marker database whenever it successfully downloads the remote database.
The cache is stored at:
`config/mco-goto/markersDB.js`
When a new copy is successfully downloaded, the existing local copy is replaced with the new one.
### Fallback to the local database
If the MinecraftOnline marker endpoint becomes unavailable or returns an error, MCO Goto first displays the actual endpoint error and then attempts to use the previously saved local marker database.
If a valid local copy is available, location searches can continue using the cached database without requiring the remote endpoint to be available.
If no local copy exists, MCO Goto reports that no local marker database is available.
If the local copy exists but cannot be loaded or parsed, MCO Goto reports that the local database could not be loaded.
### Fully configurable
MCO Goto includes a configuration screen accessible through Mod Menu.
The following options can be configured:
- Enabled
- TP command
- Locations endpoint
- Marker path
- Name path
- X path
- Y path
- Z path
- Dimension regex
The TP command supports the `{x}`, `{y}`, `{z}`, and `{dimension}` placeholders.
The locations endpoint can be changed if the marker database location changes.
The marker, name, coordinate, and dimension settings allow the mod to adapt to changes in the structure of the marker database.
Every configurable field includes its own **Reset** button.
### Persistent configuration
MCO Goto automatically saves its configuration to:
`config/mco-goto.json`
Settings persist between game launches and can be restored to their defaults from the configuration screen.
### Scrollable configuration screen
The configuration interface includes a scrollable settings area so that all available options can be accessed even on smaller screens.
Long values such as URLs, paths, and regular expressions are supported.
### Asynchronous database loading
The marker database is downloaded asynchronously so that waiting for the remote endpoint does not unnecessarily block the Minecraft client.
Once the database has been downloaded and parsed, Minecraft-side actions are returned to the client thread before interacting with the game UI or sending commands.
### Client-side
MCO Goto is a client-side Fabric mod.
The marker database is retrieved by the client, and the resulting teleport command is sent through the player's existing Minecraft connection.
No separate server-side installation is required for the mod itself.
### Enable and disable functionality
MCO Goto can be enabled or disabled from its configuration screen.
When enabled, `/goto` is intercepted by MCO Goto and processed using the marker database.
When disabled, `/goto` is allowed to proceed normally instead of being handled by MCO Goto.
The mod also informs the player whether MCO Goto is currently enabled or disabled when `/goto` is used.
## Summary
MCO Goto provides a complete automated location lookup and teleportation workflow for MinecraftOnline, combining marker searching, coordinate and dimension detection, automatic `/tpto` execution, Wiki integration, configurable database parsing, asynchronous loading, persistent configuration, and a local marker database fallback.

