A Minecraft 1.20.4 creative server built for redstone. Each 512x512 plot runs on a separate thread, allowing for less lag, more concurrency, and many awesome extra features!
MCHPRS is very different from traditional servers. Because this server is tailored to the use of computational redstone, many things that are a part of Vanilla Minecraft servers don't exist here. That being said, MCHPRS comes with many of its own unique features.
MCHPRS has made it possible to run programs such as a limited form of Minecraft on CPUs in Minecraft. To accomplish these speeds, we created Redpiler, the "Redstone Compiler".
Semantics lists the supported components and the differences from vanilla.
If the Rust compiler is not already installed, you can find out how on their official website.
git clone https://github.com/Paul1365972/MCHPRS.git
cd MCHPRS
cargo build --releaseOnce complete, the optimized executable will be located at ./target/release/mchprs or ./target/release/mchprs.exe depending on your operating system.
| Feature | Adds |
|---|---|
claims |
/plot claim, /plot auto, /plot info and /plot visit |
whitelist |
/whitelist, and whitelist = true in Config.toml |
cargo build --release --features claims,whitelist enables both.
Prebuilt releases have both enabled, and so does the image the Dockerfile builds.
The image runs the server in the volume /data and exposes port 25565.
The redstone backends also run without the server: see Library.
The server reads and writes its files in the working directory.
| Path | Content |
|---|---|
Config.toml |
The configuration. The server writes the defaults if the file does not exist. |
world/plots |
The plots. If world/plots/pTEMPLATE exists at startup, new plots start as a copy of it. Before a plot file of an older version is replaced, it is kept as p<x>,<z>.v<version>. |
world/plots.db |
The plot claims. Requires the claims feature. |
world/players |
The player data. |
whitelist.json |
The whitelist. The server creates an empty one if the whitelist setting is on and the file does not exist. |
logs |
The logs. logs/latest.log is the log of the current run. At startup the previous one is renamed to logs/<n>.log. |
schems |
The schematics of /schematic. |
MCHPRS has no permissions: every player can use every command and edit every plot.
The environment variable MCHPRS_LOG sets the log level, for example MCHPRS_LOG=debug. The default is info.
mchprs --version prints the version and exits.
cargo run --release -p mchprs_world_exporter -- world <saves> writes the plots of world as a new Minecraft save in the directory <saves>.
MCHPRS will generate a Config.toml file in the current working directory when starting the server if it does not exist.
A missing key takes its default and an unknown key is ignored.
The following options are available at the toplevel (under no header):
| Field | Description | Default |
|---|---|---|
bind_address |
Bind address and port | 0.0.0.0:25565 |
motd |
Message of the day | "Minecraft High Performance Redstone Server" |
chat_format |
How to format chat message interpolating username and message with curly braces |
<{username}> {message} |
max_players |
Maximum number of simultaneous players | 99999 |
view_distance |
Maximal distance (in chunks) between players and loaded chunks | 8 |
whitelist |
Whether or not the whitelist (in whitelist.json) should be enabled. Requires the whitelist feature. |
false |
schemati |
Mimic the verification and directory layout used by the Open Redstone Engineers Schemati plugin | false |
block_in_hitbox |
Allow placing blocks inside of players (hitbox logic is simplified) | true |
autosave_interval_seconds |
Seconds until a changed plot is saved. 0 disables autosave. |
300 |
To change the plot size edit the constants defined in plot/mod.rs.
The command_aliases table maps an alias to a command with its subcommands and flags, without arguments. Both are written as typed in chat, with the leading /.
[command_aliases]
"/rcio" = "/redpiler compile -io"
"//stackair" = "//stack -a"Arguments and flags given to the alias are added to the command: //stackair 5 north runs //stack 5 north -a.
An alias replaces a built-in command or alias of the same name.
An alias cannot run another alias of this table or of the built-in aliases. It can use short names such as /rp c.
MCHPRS has no support for player authentication on its own, but supports Velocity modern ip-forwarding.
To use Velocity ip-forwarding, you must have a Velocity proxy set up and configured. Make sure player-info-forwarding-mode is set to modern in your Velocity config. Then, append this to your Config.toml:
[velocity]
enabled = true
# This is the secret contained within `forwarding-secret-file` from your velocity config,
# NOT the path to the file.
secret = "<secret>"| Key | Description | Default |
|---|---|---|
redpiler.default_backend |
The backend of /redpiler compile, optionally with flags that are added to its configured flags: "direct -o" |
direct |
redpiler.flags.<backend> |
The default flags of a backend, written as in the command | None |
[redpiler]
default_backend = "direct"
[redpiler.flags]
direct = "--optimize --io-only"- Semantics: supported redstone and the differences from vanilla, with and without Redpiler.
- Redpiler: compiling a plot in game, flags, probes and breakpoints.
- The backends, each with its tick order, passes, flags and limits: vanilla, direct.
- Commands: every command.
/helplists them in game. - Circuits: the graph Redpiler compiles, the behaviour of its components and the passes.
- RIL: the text format of a circuit.
- Library: running the backends from a Rust program, and writing one.
- rilc: the development tool that compiles, runs and compares Redpiler setups.
- Adding a Block: the block data generator.
- @AL1L for his contributions to worldedit and other various features.
- @DavidGarland for a faster and overall better implementation of
get_entryin the in-memory storage. This simple function runs 30% of the runtime for redstone.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
