ReGenCWG - World Regeneration for CubicWorldGen
Overview and Requirements
This addon is compatible with CubicChunks version 0.0.938 or higher, CubicWorldGen version 0.0.39 or higher, and requires MinecraftForge 14.23.3.2658 or newer.
The main function of the mod is to regenerate ores and replace specific blocks in already created and saved cubes for cubic-type worlds.
It's important to note that installing the mod on the client is not required. Players without this mod will be able to connect to a server where it is installed.
Ore Regeneration
Usage Instructions
In an existing world, create a folder at the path <world_save_folder>/data/regencwg/ and place a standard CubicWorldGen external settings file (custom_generator_settings.json), where you define only the ores that should be generated in existing cubes. To limit areas for new ore generation, use cubeAreas and define ores in a sub-preset.
How It Works
On the first world load or when executing the command /regencwg reset 0, the addon will scan the world folder for existing cubes and add their coordinates to memory. During subsequent server restarts, the addon will use the saved data. On each CubeWatchEvent (which triggers when a cube needs to be sent to the client), the addon will check if the cube coordinates match those set in memory, remove it from the set, and launch ore generators according to the preset.
Block Replacement
Usage Instructions
In an existing world, create a folder at the path <world_save_folder>/data/regencwg/ and place the replace_config.json file, where you define which blockstate should be replaced with which. Download the provided example to learn the correct syntax.
Alternatively, execute the command /regencwg replace-config <dimension_id> <config_string>.
<config_string> is the same string as in the file, but without spaces. After that, execute the command /regencwg replace <dimension_id> to start the process.
How It Works
When executing the command /regencwg replace <dimension_id>, the addon will scan the world folder for existing cubes. Each cube will be loaded from disk, scanned for the defined blockstate, and if the cube contains this blockstate, it will be replaced with the substitute.
Server Commands
List of server commands added by the mod:
- /regencwg remaining <dimension_id> - shows remaining cubes that need to be populated with ores in <dimension_id>. The Overworld dimension ID is 0.
- /regencwg reset <dimension_id> - rescan the save folder to re-add all saved cube coordinates to the population queue. You don't need to run this command unless the cube repopulation process is already done and you need to start a new one.
- /regencwg stop <dimension_id> - completely stop the population process.
- /regencwg finish <dimension_id> - populate all cubes at once. May hang the server for some time (about 1 minute per 10,000 cubes).
- /regencwg replace-config <dimension_id> <config_string> - overwrite the replacer config for the dimension.
- /regencwg replace <dimension_id> - replace the defined blockstate in every saved cube according to the previously loaded config.