Skip to main content
Version: Next

Daemon Mode

Usage

Amethyst comes with the ability to run data packs from the command line. It installs a local Minecraft Fabric server and runs it when requested by amethyst run. Java must be installed already and the path can be set with the --java flag.

Example:

amethyst setup --eula --java java --memory 2G --port 25600 --timeout 30
amethyst run test.zip

# Or
amethyst build examples/test.ame -o test.zip --run

Once started with amethyst run or amethyst build --run, the Minecraft server will stay alive for a specified amount of time (default 30 minutes) before automatically shutting down.

Running amethyst daemon starts the server without the timeout in the current shell.

The server is installed to the %AppData%/Local/Amethyst folder (or equivalent on other operating systems, see .NET's Environment.SpecialFolder.LocalApplicationData for more information).

note

Multiple data packs cannot be run at the same time.

Running

When using amethyst run or amethyst build --run, any /tellraw commands will be logged to the console. By default, the command will never end. However it will end if it encounters a message that says "[exit]" which can be sent by calling amethyst:exit after your program has completed. For example:

#load
void main() {
    print("I'm in the console :)");
    amethyst:exit();
}

amethyst:exit can be put anywhere in case your program uses multiple ticks.

Amethyst will attempt to detect any errors generated during /reload and display them in the console. For now, errors will not cause amethyst run to stop.

If an issue arises, try deleting the whole server folder and reinstalling.

tip

Since no players are on the server by default, no chunks and therefore no entities are loaded either. You can forceload chunks using a program or by calling amethyst daemon -c "forceload ...". The default port used for the server is 25600 but this can be configured using amethyst setup --eula. Running amethyst setup --eula again will preserve your world, mods, server.properties, and more. Only the server jar and the default mods will be reset.