Overview
Regions Unexplored uses a centralized registration system through theRegionsUnexplored main class and several registry interfaces. All game content (blocks, items, biomes, features, etc.) is registered during mod initialization.
Main initialization
The mod’s entry point isRegionsUnexplored.java, which coordinates all registry initialization:
RegionsUnexplored.java:26-40
The
init() method must be called before Minecraft finishes registry freezing. Additional setup happens in afterRegistriesFreeze() for compatibility and late initialization.Post-registration setup
After registries are frozen, the mod performs additional setup:RegionsUnexplored.java:42-48
Core registries
Registry interfaces
Regions Unexplored organizes content into registry interfaces:RUBlocks
Block registration and wood/natural sets
RUItems
Item registration and food properties
RUBiomes
Biome resource keys and villager types
RUFeatureTypes
World generation features
RUFoliagePlacerTypes
Custom foliage placer types
RUTreeDecoratorTypes
Tree decorator types
RUParticleTypes
Custom particle types
RUSoundEvents
Sound event registration
Utility methods
Resource location helpers
The main class provides helper methods for creating resource identifiers:Method signatures
Creates a namespaced identifier with the mod ID
Creates a string representation of a namespaced identifier
Creates a ResourceKey for a registry entry
Constants
The mod identifier:
"regions_unexplored"SLF4J logger instance for the mod
Registration pattern
All registry interfaces follow a similar pattern:Example registration pattern
Platform abstraction
The mod uses a platform-agnosticRegistrar class for cross-loader compatibility:
Platform registration
The
Registrar class handles differences between Forge, Fabric, and other mod loaders, ensuring the mod works across platforms.