MCHPR/MCHPRS

A multithreaded Minecraft server built for redstone.

Rust

2,326

1,219 commits

updated Sep 28, 2026

See the code

README

Minecraft High-Performance Redstone Server

Build Status License: MIT Discord Banner 2

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".

Table of Contents

Building

If the Rust compiler is not already installed, you can find out how on their official website.

git clone https://github.com/MCHPR/MCHPRS.git
cd MCHPRS
cargo build --release

Once complete, the optimized executable will be located at ./target/release/mchprs or ./target/release/mchprs.exe depending on your operating system.

Configuration

MCHPRS will generate a Config.toml file in the current working directory when starting the server if it does not exist.

The following options are available at the toplevel (under no header):

FieldDescriptionDefault
bind_addressBind address and port0.0.0.0:25565
motdMessage of the day"Minecraft High Performance Redstone Server"
chat_formatHow to format chat message interpolating username and message with curly braces<{username}> {message}
max_playersMaximum number of simultaneous players99999
view_distanceMaximal distance (in chunks) between players and loaded chunks8
whitelistWhether or not the whitelist (in whitelist.json) should be enabledfalse
schematiMimic the verification and directory layout used by the Open Redstone Engineers Schemati pluginfalse
block_in_hitboxAllow placing blocks inside of players (hitbox logic is simplified)true
auto_redpilerUse redpiler automaticallyfalse

To change the plot size edit the constants defined in plot/mod.rs.

Velocity

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>"

LuckPerms

MCHPRS has basic support for LuckPerms with MySQL or MariaDB remote database storage. This implementation has no commands or interface and would have to be managed through LuckPerms running on a proxy (/lpb) or other server (/lp)

To use LuckPerms, append this to your Config.toml:

[luckperms]
# Define the address for the database.
host = "localhost"
# The name of the database the LuckPerms data is in.
db_name = "minecraft"
# Credentials for the database.
username = "minecraft"
password = "minecraft"
# The name of the server, used for server specific permissions.
# See: https://luckperms.net/wiki/Context
server_context = "global"

Usage

General Commands

CommandAliasDescription
/rtps [rtps|unlimited]NoneSet redstone ticks/s (fractional or unlimited). Default: 10. There are two game ticks per redstone tick.
/radvance <ticks>/radvAdvances the plot by <ticks> redstone ticks.
/teleport <player>/tpTeleports you to <player>.
/teleport <x> <y> <z>/tpTeleports you to <x> <y> <z>. Supports relative coordinates. Floats can be expressed as described here.
/speed <speed>NoneSets your flyspeed.
/gamemode <mode>/gmc, /gmspSets your gamemode.
/container <type> <power>NoneGives you a container (e.g. barrel) which outputs a specified amount of power when used with a comparator.
/worldsendrate [hertz]/wsrWorld updates/s (0-1000, fractional; 0 disables periodic sends). Default: 60.
/toggleautorpNoneToggles automatic redpiler compilation.
/stopNoneStops the server.

Plot Ownership

The plot ownership system in MCHPRS is very incomplete. These are the commands that are currently implemented:

CommandAliasDescription
/plot info/p iGets the owner of the plot you are in.
/plot claim/p cClaims the plot you are in if it is not already claimed.
/plot auto/p aAutomatically finds an unclaimed plot and claims.
/plot middleNoneTeleports you to the center of the plot you are in.
/plot visit <player> [index]/p vTeleports you to a player's plot.
/plot tp <x> <z>NoneTeleports you to the plot at <x> <z>. Supports relative coordinates.
/plot lockNoneLocks the player into the plot so moving outside of the plot bounds does not transfer you to other plots.
/plot unlockNoneReverses the locking done by /plot lock.
/plot select/p selUses WorldEdit to select the entire plot.

Worldedit

MCHPRS provides its own implementation of WorldEdit. Visit their documentation for more information. These are the commands that are currently implemented:

CommandAliasDescription
/up/uGo upwards some distance
/ascend/ascGo up a floor
/descend/descGo down a floor
//pos1//1Set position 1
//pos2//2Set position 2
//hpos1//h1Set position 1 to targeted block
//hpos2//h2Set position 2 to targeted block
//selNoneClears your worldedit first and second positions.
//setNoneSets all the blocks in the region
//replaceNoneReplace all blocks in a selection with another
//copy//cCopy the selection to the clipboard
//cut//xCut the selection to the clipboard
//paste//vPaste the clipboard's contents (-a to ignore air, -u to also update)
//undoNoneUndoes the last action (from history)
//redoNoneRedoes the last action (from history)
//rstack//rsStack with more options, Refer to RedstoneTools
//stack//sRepeat the contents of the selection
//moveNoneMove the contents of the selection
//countNoneCounts the number of blocks matching a mask
//loadNoneLoads a schematic from the ./schems/ folder. Make sure the schematic in the Sponge format if there are any issues.
//saveNoneSave a schematic to the ./schems/ folder.
//expand//eExpand the selection area
//contractNoneContract the selection area
//shiftNoneShift the selection area
//flip//fFlip the contents of the clipboard across the origin
//rotate//rRotate the contents of the clipboard
//updateNoneUpdates all blocks in the selection (-p to update the entire plot)
//helpNoneDisplays help for WorldEdit commands

Redpiler

MCHPRS provides Redpiler, the redstone compiler. This allows redstone simulation much faster than otherwise possible. While redpiler is running, all redstone connections are pre-computed, thus interaction with the world is limited in this state. Placing or breaking blocks while redpiler is running will cause a reset and disable redpiler.

CommandAliasDescription
/redpiler compile/rp cManually starts redpiler compilation. There are several flags available, described below.
/redpiler reset/rp rStops redpiler.
FlagShortDescription
--optimize-oEnable redpiler optimizations. WARNING: This can, and will, break the state of your build. Use backups when using this flag.
--io-only-iOnly send blocks updates of relevant input/output blocks. This includes trapdoors, lamps, note blocks, buttons, levers, and pressure plates. Using this flag can significantly reduce lag and improve simulation speed.
--wire-dot-out-dConsider wires in the dot shape as an output block for -i. Useful, for example, for color displays.
--illegal-states-out-lConsider wires in so-called "illegal" states as an output block for -i. Useful, for example, for sprite displays.
--wire-cross-out-cConsider a redstone cross to be an output block (for sprite screens without illegal wire states)
--update-uUpdate all blocks after redpiler resets.
--export-eExport the compile graph using a binary format. This can be useful for developing out-of-tree uses of redpiler graphs.
--export-dotNoneCreate a graphvis dot file of backend graph. Used for debugging/development.
--print-after-allNonePrint out the RIL circuit after every redpiler pass. Used for debugging/development.
--print-before-backendNonePrint out the RIL circuit before starting backend compilation. Used for debugging/development.

Acknowledgments

  • @AL1L for his contributions to worldedit and other various features.
  • @DavidGarland for a faster and overall better implementation of get_entry in the in-memory storage. This simple function runs 30% of the runtime for redstone.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

hacktoberfest
minecraft
redstone
rust

MCHPR/MCHPRS

A multithreaded Minecraft server built for redstone.

Rust

2,326

1,219 commits

updated Sep 28, 2026

See the code

README

Minecraft High-Performance Redstone Server

Build Status License: MIT Discord Banner 2

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".

Table of Contents

Building

If the Rust compiler is not already installed, you can find out how on their official website.

git clone https://github.com/MCHPR/MCHPRS.git
cd MCHPRS
cargo build --release

Once complete, the optimized executable will be located at ./target/release/mchprs or ./target/release/mchprs.exe depending on your operating system.

Configuration

MCHPRS will generate a Config.toml file in the current working directory when starting the server if it does not exist.

The following options are available at the toplevel (under no header):

FieldDescriptionDefault
bind_addressBind address and port0.0.0.0:25565
motdMessage of the day"Minecraft High Performance Redstone Server"
chat_formatHow to format chat message interpolating username and message with curly braces<{username}> {message}
max_playersMaximum number of simultaneous players99999
view_distanceMaximal distance (in chunks) between players and loaded chunks8
whitelistWhether or not the whitelist (in whitelist.json) should be enabledfalse
schematiMimic the verification and directory layout used by the Open Redstone Engineers Schemati pluginfalse
block_in_hitboxAllow placing blocks inside of players (hitbox logic is simplified)true
auto_redpilerUse redpiler automaticallyfalse

To change the plot size edit the constants defined in plot/mod.rs.

Velocity

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>"

LuckPerms

MCHPRS has basic support for LuckPerms with MySQL or MariaDB remote database storage. This implementation has no commands or interface and would have to be managed through LuckPerms running on a proxy (/lpb) or other server (/lp)

To use LuckPerms, append this to your Config.toml:

[luckperms]
# Define the address for the database.
host = "localhost"
# The name of the database the LuckPerms data is in.
db_name = "minecraft"
# Credentials for the database.
username = "minecraft"
password = "minecraft"
# The name of the server, used for server specific permissions.
# See: https://luckperms.net/wiki/Context
server_context = "global"

Usage

General Commands

CommandAliasDescription
/rtps [rtps|unlimited]NoneSet redstone ticks/s (fractional or unlimited). Default: 10. There are two game ticks per redstone tick.
/radvance <ticks>/radvAdvances the plot by <ticks> redstone ticks.
/teleport <player>/tpTeleports you to <player>.
/teleport <x> <y> <z>/tpTeleports you to <x> <y> <z>. Supports relative coordinates. Floats can be expressed as described here.
/speed <speed>NoneSets your flyspeed.
/gamemode <mode>/gmc, /gmspSets your gamemode.
/container <type> <power>NoneGives you a container (e.g. barrel) which outputs a specified amount of power when used with a comparator.
/worldsendrate [hertz]/wsrWorld updates/s (0-1000, fractional; 0 disables periodic sends). Default: 60.
/toggleautorpNoneToggles automatic redpiler compilation.
/stopNoneStops the server.

Plot Ownership

The plot ownership system in MCHPRS is very incomplete. These are the commands that are currently implemented:

CommandAliasDescription
/plot info/p iGets the owner of the plot you are in.
/plot claim/p cClaims the plot you are in if it is not already claimed.
/plot auto/p aAutomatically finds an unclaimed plot and claims.
/plot middleNoneTeleports you to the center of the plot you are in.
/plot visit <player> [index]/p vTeleports you to a player's plot.
/plot tp <x> <z>NoneTeleports you to the plot at <x> <z>. Supports relative coordinates.
/plot lockNoneLocks the player into the plot so moving outside of the plot bounds does not transfer you to other plots.
/plot unlockNoneReverses the locking done by /plot lock.
/plot select/p selUses WorldEdit to select the entire plot.

Worldedit

MCHPRS provides its own implementation of WorldEdit. Visit their documentation for more information. These are the commands that are currently implemented:

CommandAliasDescription
/up/uGo upwards some distance
/ascend/ascGo up a floor
/descend/descGo down a floor
//pos1//1Set position 1
//pos2//2Set position 2
//hpos1//h1Set position 1 to targeted block
//hpos2//h2Set position 2 to targeted block
//selNoneClears your worldedit first and second positions.
//setNoneSets all the blocks in the region
//replaceNoneReplace all blocks in a selection with another
//copy//cCopy the selection to the clipboard
//cut//xCut the selection to the clipboard
//paste//vPaste the clipboard's contents (-a to ignore air, -u to also update)
//undoNoneUndoes the last action (from history)
//redoNoneRedoes the last action (from history)
//rstack//rsStack with more options, Refer to RedstoneTools
//stack//sRepeat the contents of the selection
//moveNoneMove the contents of the selection
//countNoneCounts the number of blocks matching a mask
//loadNoneLoads a schematic from the ./schems/ folder. Make sure the schematic in the Sponge format if there are any issues.
//saveNoneSave a schematic to the ./schems/ folder.
//expand//eExpand the selection area
//contractNoneContract the selection area
//shiftNoneShift the selection area
//flip//fFlip the contents of the clipboard across the origin
//rotate//rRotate the contents of the clipboard
//updateNoneUpdates all blocks in the selection (-p to update the entire plot)
//helpNoneDisplays help for WorldEdit commands

Redpiler

MCHPRS provides Redpiler, the redstone compiler. This allows redstone simulation much faster than otherwise possible. While redpiler is running, all redstone connections are pre-computed, thus interaction with the world is limited in this state. Placing or breaking blocks while redpiler is running will cause a reset and disable redpiler.

CommandAliasDescription
/redpiler compile/rp cManually starts redpiler compilation. There are several flags available, described below.
/redpiler reset/rp rStops redpiler.
FlagShortDescription
--optimize-oEnable redpiler optimizations. WARNING: This can, and will, break the state of your build. Use backups when using this flag.
--io-only-iOnly send blocks updates of relevant input/output blocks. This includes trapdoors, lamps, note blocks, buttons, levers, and pressure plates. Using this flag can significantly reduce lag and improve simulation speed.
--wire-dot-out-dConsider wires in the dot shape as an output block for -i. Useful, for example, for color displays.
--illegal-states-out-lConsider wires in so-called "illegal" states as an output block for -i. Useful, for example, for sprite displays.
--wire-cross-out-cConsider a redstone cross to be an output block (for sprite screens without illegal wire states)
--update-uUpdate all blocks after redpiler resets.
--export-eExport the compile graph using a binary format. This can be useful for developing out-of-tree uses of redpiler graphs.
--export-dotNoneCreate a graphvis dot file of backend graph. Used for debugging/development.
--print-after-allNonePrint out the RIL circuit after every redpiler pass. Used for debugging/development.
--print-before-backendNonePrint out the RIL circuit before starting backend compilation. Used for debugging/development.

Acknowledgments

  • @AL1L for his contributions to worldedit and other various features.
  • @DavidGarland for a faster and overall better implementation of get_entry in the in-memory storage. This simple function runs 30% of the runtime for redstone.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

hacktoberfest
minecraft
redstone
rust

Project health

crates.io

Latest release

0.3.0 · Jul 10, 2020

Releases this year

0

Significant stargazers

(top 24 of 43)

Catherine

2,927 followers · starred Oct 2025

Markus Unterwaditzer

744 followers · starred Nov 2025

Johan Euphrosine

594 followers · starred Jul 2023

Jonas Schievink

454 followers · starred Sep 2022