Configuration System
Voxy World Gen V2 uses a JSON-based configuration system that provides both file-based and in-game configuration options. The mod automatically creates a default configuration file on first run with hardware-optimized settings.Configuration File Location
The configuration file is located at:How Configuration Works
The configuration system is implemented inConfig.java (config/Config.java:12-60) and follows this workflow:
First Run Auto-Configuration
When you launch the mod for the first time, Voxy World Gen V2 automatically:- Detects that no configuration file exists (Config.java:20)
- Analyzes your system hardware:
- CPU core count via
Runtime.getRuntime().availableProcessors() - Available memory via
Runtime.getRuntime().maxMemory()
- CPU core count via
- Creates optimized default settings (Config.java:26-27)
- Saves the configuration file (Config.java:29)
Configuration Loading
On subsequent launches, the mod:- Loads the existing
voxyworldgenv2.jsonfile (Config.java:33-34) - Parses the JSON using Gson with pretty printing enabled
- Populates the
Config.DATAobject with your settings - Applies these settings to the chunk generation system
JSON Format
The configuration uses a simple, human-readable JSON structure:In-Game Configuration (ModMenu)
Voxy World Gen V2 integrates with ModMenu and Cloth Config to provide an in-game configuration screen.Accessing the Config Screen
- Install ModMenu (required dependency)
- Open the Mods menu from the main screen or pause menu
- Find “Voxy World Gen V2” in the mod list
- Click the config button (gear icon)
Features
The in-game config screen provides:- Boolean toggles with tooltips for on/off settings
- Sliders for numeric values with min/max constraints
- Input fields for advanced numeric settings
- Real-time validation to prevent invalid values
- Automatic save when you apply changes
Configuration Reload Mechanism
When you modify settings through ModMenu:- The config screen saves changes to
Config.DATA - Calls
Config.save()to write the JSON file (ModMenuIntegration.java:65) - Triggers
scheduleConfigReload()on the ChunkGenerationManager (ModMenuIntegration.java:66) - On the next tick, the system:
- Reloads configuration from disk (ChunkGenerationManager.java:358)
- Updates the throttle capacity based on new
maxActiveTasks(ChunkGenerationManager.java:359) - Restarts the chunk scanning process with new settings (ChunkGenerationManager.java:360)
Manual Configuration Editing
You can also editconfig/voxyworldgenv2.json directly with a text editor:
- Close Minecraft completely
- Open
config/voxyworldgenv2.jsonin your text editor - Modify the values as needed
- Save the file
- Restart Minecraft
Next Steps
Configuration Settings
Detailed documentation for each configuration option
Advanced Configuration
Performance tuning and advanced optimization