Build scripts for the server
The only real dependency is Nix with flakes enabled.
Make a server directory, then run update-and-start.sh using its relative path. Example:
$ mkdir erisia
$ cd erisia
$ jj git clone https://github.com/Erisia/builder.git builder
$ builder/update-and-start.sh
Common build targets:
$ nix build .#e34_5-server
$ nix build .#e35-server
$ nix build .#vanilla-server
$ nix build .#serverPackLocal
Legacy nix-build -f . entry points are still supported for the main builder attributes,
including nested targets such as packs.e35.server.
To build and serve the website locally:
# Hugo version (default)
$ nix build .#web && cd result && python -m http.server
# Hugo development server (with live reload)
$ cd web && ./serve.sh
Minecraft, Fabric, and Forge-like launchers are pinned in launcher-lock.json.
Direct launcher jars use fixed fetchurl hashes. Forge-like installers are fixed-output
derivations with recursive output hashes, because the installer downloads its own
Maven/Mojang dependency graph during installation.
To refresh a Forge-like launcher, set its outputHash in launcher-lock.json to a
fake hash such as sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=, then build
the launcher:
$ nix build .#e34_5-launcherDir
Nix will report the real recursive hash in the fixed-output mismatch error; copy that
value back into launcher-lock.json.
The .json files used for building the modpack are generated by modestly-modular-modpack-modifier
from the .yaml files in manifest/, and should always be updated after
any change to the .yaml files.
$ nix run ./modestly-modular-modpack-modifier -- -o manifest manifest/e32.yaml
If the current pack uses any mods from Curse, you will need to configure the Curse API client or mod resolution will fail. See Modestly Modular Modpack Modifier README for instructions.
Requires nix package manager and a unix environment (You can also use nixos!) of your choice to run it in.
-
Clone this repository
-
Create a directory to house the server
-
Navigate into it and run
../path/to/repository/update-and-start.sh. Choose the server you intend to build. -
Assuming all this succeeds, you can use any text editor to edit the files under manifest and base in the builder folder. These files are the ones that influence what mods the server is running as well as the configs that get deployed to the client.
Changing the manifest will not automatically change the running mods. See
Updating Manifestsfor how to do that, and how to update mods to newer versions.
Once you've updated with cursetool and tried your changes with update_and_start.sh you can push your changes back up to the repo (use a branch or a fork please) and open a pull request against master. At that point an admin can pull your changes into the server.
- Dynmap quickly creates gigabytes of rendered map tiles. You might want to disable it while debugging.
- You aren't limited to running only the server. To test a new client configuration, build
.#serverPackLocal.
Everything in this Git repository is MIT-licensed, with the exception
of the third_party directory and mods/configuration data in the base
directory; see third_party/README.md for details.
It isn't currently in shape for reuse, but if you wish to do so, make sure to expunge base and third_party.