No description
| .cargo | ||
| potato | ||
| potato-api | ||
| potato-data | ||
| potato-macro | ||
| potato-mod-core | ||
| potato-server | ||
| scripts | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
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:
on_loadis called for all modulesreload_resourcesis called for all moduleson_resources_loadedis called for all modules
On module reload:
on_loadis called for the module being reloadedreload_resourcesis called for the module being reloadedon_resources_loadedis called for the module being reloaded
Registry system
- Modules define their registries
- Content is loaded into registries by the server in a standard way
- Registry entries need to be deserializable
- Either loaded with the exact deserializer or with a
WithRegistryIdhelper which adds theregistry_idkey to force a specific ID for compatibility reasons
- Content can be reloaded by depending on the registry variant.
- Some registries can be changed at runtime (these can't be synced to the client)