No description
Find a file
2025-10-27 15:31:05 +01:00
.cargo New module system + blocks + chunks 2025-10-17 13:20:45 +02:00
potato Finish splitting and cleaning up code 2025-10-27 15:31:05 +01:00
potato-api Finish splitting and cleaning up code 2025-10-27 15:31:05 +01:00
potato-data New module system + blocks + chunks 2025-10-17 13:20:45 +02:00
potato-macro Finish splitting and cleaning up code 2025-10-27 15:31:05 +01:00
potato-mod-core Finish splitting and cleaning up code 2025-10-27 15:31:05 +01:00
potato-server Finish splitting and cleaning up code 2025-10-27 15:31:05 +01:00
scripts New module system + blocks + chunks 2025-10-17 13:20:45 +02:00
.envrc Initial commit 2025-03-05 12:21:53 +01:00
.gitignore New module system + blocks + chunks 2025-10-17 13:20:45 +02:00
Cargo.lock Finish splitting and cleaning up code 2025-10-27 15:31:05 +01:00
Cargo.toml Finish splitting and cleaning up code 2025-10-27 15:31:05 +01:00
flake.lock Fix diconnect detection 2025-10-18 13:24:27 +02:00
flake.nix Finish splitting and cleaning up code 2025-10-27 15:31:05 +01:00
README.md WIP: Split code into multiple crates and large cleanup 2025-10-23 19:00:12 +02:00

Potato Minecraft Server

It runs on a potato.

Crates

potato - Binary crate for the main server, handles starting the server from the CLI. potato-server - Main server implementation. potato-api - Defines the api for modules to interact with the server. potato-data - Internal crate holding types and constants generated from minecraft datagen reports. Intended for use by the core module. potato-mod-core - Module implementing the core minecraft mechanics for the server. Compiled into the main binary and can't be unloaded. potato-macro - Macro implementations for both internal and external use.

Module lifecycle

On server startup:

  1. on_load is called for all modules
  2. reload_resources is called for all modules
  3. on_resources_loaded is called for all modules

On module reload:

  1. on_load is called for the module being reloaded
  2. reload_resources is called for the module being reloaded
  3. on_resources_loaded is called for the module being reloaded

Registry system

  1. Modules define their registries
  2. Content is loaded into registries by the server in a standard way
    1. Registry entries need to be deserializable
    2. Either loaded with the exact deserializer or with a WithRegistryId helper which adds the registry_id key to force a specific ID for compatibility reasons
  3. Content can be reloaded by depending on the registry variant.
  4. Some registries can be changed at runtime (these can't be synced to the client)