WorldGen Indicators

The WorldGen Indicators mod provides the ability to create additional blocks depending on existing world generation. A great example of application is adding special indicator flowers that appear on the surface when ore is present in the chunk. Configuration is done using the CraftTweaker system.
![]()
Main Features
The mod's functionality includes checking any blocks in the chunk and generating corresponding blocks on the surface. You can configure various placement parameters:
- Generation at a specific height relative to the checked block
- Placement at a defined height from the surface
- Creation of structures based on Minecraft NBT format
- Biome-dependent checks
![]()
Configuration via CraftTweaker
![]()
To get started, create a BlockChecker using the BlockChecker.create(1) command, where the number indicates the trigger probability. Then add blocks to check via addValid(IBlock block) and indicators via addIndicator(IIndicator indicator). Within the indicator, you can place multiple blocks using the add(IBlock block) method. (Blocks in indicators and the indicators themselves are selected randomly)
![]()
Surface Indicator
The following script adds a 10% chance of a redstone torch appearing on the surface when redstone ore is detected:
import mods.worldgenindicators.BlockChecker;
import mods.worldgenindicators.WorldGenManager;
import mods.worldgenindicators.SurfaceIndicator;
import crafttweaker.block.IBlock;
var redstoneOre = <minecraft:redstone_ore>.asBlock();
var redstoneTorch = <minecraft:redstone_torch>.asBlock();
var surfaceIndicator = SurfaceIndicator.create().add(redstoneTorch);
var blockChecker = BlockChecker.create(0.1).addValid(redstoneOre).addIndicator(surfaceIndicator);
WorldGenManager.addChecker(blockChecker);
Relative Surface Indicator
The relative surface indicator requires specifying a parameter during creation - the number of blocks above the surface for generation:
import mods.worldgenindicators.BlockChecker;
import mods.worldgenindicators.WorldGenManager;
import mods.worldgenindicators.RelativeSurfaceIndicator;
import crafttweaker.block.IBlock;
var grass = <minecraft:grass>.asBlock();
var glass = <minecraft:glass>.asBlock();
var surfaceIndicator = RelativeSurfaceIndicator.create(20).add(glass);
var blockChecker = BlockChecker.create(1).addValid(grass).addIndicator(surfaceIndicator);
WorldGenManager.addChecker(blockChecker);
Whitelist and Blacklist
import mods.worldgenindicators.BlockChecker;
import mods.worldgenindicators.WorldGenManager;
import mods.worldgenindicators.SurfaceIndicator;
import mods.worldgenindicators.RelativeSurfaceIndicator;
import crafttweaker.block.IBlock;
import crafttweaker.item.IItemStack;
WorldGenManager.addChecker(
BlockChecker.create(0.5d)
.addWhitelistEntry(<minecraft:sand>.asBlock())
.addValid(<minecraft:gold_ore>.asBlock())
.addIndicator(SurfaceIndicator.create().add( <minecraft:gold_block>.asBlock()) )
);
WorldGenManager.addChecker(
BlockChecker.create(0.5d)
.addBlacklistEntry(<minecraft:grass>.asBlock())
.addBlacklistEntry(<blockstate:minecraft:air>.block)
.addValid(<minecraft:iron_ore>.asBlock())
.addIndicator(RelativeSurfaceIndicator.create(2).add(<minecraft:diamond_block>.asBlock()))
);