Minecraft requires servers to send registry data during the configuration phase. Void manages this through RegistryDataStore, an ECS resource containing all registries and their entries.
| Method | Description |
|---|---|
get_registry(id) |
Look up a registry by ID (e.g., "minecraft:worldgen/biome") |
get_registry_mut(id) |
Mutable lookup |
add_registry(registry) |
Append a new registry |
remove_registry(id) |
Remove a registry by ID, returning it |
get_entry(registry_id, entry_id) |
Look up a single entry |
get_entry_mut(registry_id, entry_id) |
Mutable entry lookup |
add_entry(registry_id, entry) |
Add an entry to an existing registry |
remove_entry(registry_id, entry_id) |
Remove an entry, returning it |
RegistryDataStore::default() (via default_registry_data()) provides the minimum set of registries required by a vanilla-compatible client:
| Registry ID | Entries | Description |
|---|---|---|
minecraft:dimension_type |
minecraft:overworld |
Dimension properties (skylight, height, min_y, etc.) |
minecraft:worldgen/biome |
minecraft:plains |
Biome data (temperature, precipitation, colors, sounds) |
minecraft:painting_variant |
minecraft:kebab |
Painting textures and dimensions |
minecraft:damage_type |
25 entries | All required damage types (generic, fall, fire, drown, etc.) |
minecraft:wolf_variant |
minecraft:pale |
Wolf textures |
minecraft:wolf_sound_variant |
minecraft:classic |
Wolf sound effects |
minecraft:cat_variant |
minecraft:tabby |
Cat textures |
minecraft:chicken_variant |
minecraft:temperate |
Chicken textures |
minecraft:cow_variant |
minecraft:temperate |
Cow textures |
minecraft:frog_variant |
minecraft:temperate |
Frog textures |
minecraft:pig_variant |
minecraft:temperate |
Pig textures |
Each entry is a RegistryEntry:
The data field contains an NBT compound (ussr_nbt::owned::Nbt) whose tags vary by registry type.
Use ServerBuilder::configure_registries to modify registries before the server starts:
Registries can also be modified in a plugin before clients connect:
Plugins run before the first tick, so registry modifications are applied before any client receives data.
During the configuration phase, when the client sends KnownPacks:
RegistryDataStoreRegistryData is sent as a separate RegistryData configuration packetFinishConfiguration is sentThe client uses this data to set up its local registry state for rendering, gameplay, and validation.
Registry entry data uses ussr_nbt::owned::Nbt. Common patterns:
| Tag | Rust Type | Usage |
|---|---|---|
Tag::Byte(i8) |
i8 |
Boolean-like values (0/1) |
Tag::Int(i32) |
i32 |
Integer properties (height, min_y, etc.) |
Tag::Float(f32) |
f32 |
Float properties (temperature, light) |
Tag::Double(f64) |
f64 |
Double properties (coordinate_scale) |
Tag::String(String) |
String |
String identifiers and paths |
Tag::Compound(Compound) |
Nested object | Nested structures (effects, mood_sound) |