1.16.4 Oregen

After much searching i came across an example that explained exactly what had to be done to make oregen in 1.16.4 work.

The source: forums.minecraftforge.net/topic/94945-1164how-to-generate-ores/?do=findComment&comment=434130

How I used it to make Diamond Sand appear as ore again in DiamondGlass.

In the main constructor of the master class for my DiamondGlass mod I now have this. The line where I register ModFeatures is important.

    public DiamondGlass() {
        ConfigHelper.loadConfig(ConfigHelper.SERVER_CONFIG, FMLPaths.CONFIGDIR.get().resolve("diamondglass.toml"));

        //the line that matters immediately follows
        MinecraftForge.EVENT_BUS.register(new ModFeatures());


We only need one file too? Not a bunch all over the place. The file you guessed it is called ModFeatures.java. In that file will be this code, adapted to your mod ofcourse.

@Mod.EventBusSubscriber(modid = DiamondGlass.ModId, bus = Mod.EventBusSubscriber.Bus.MOD)
public class ModFeatures {

    public static ConfiguredFeature<?, ?> DIAMOND_SAND_CONFIG;

    public static void setup(FMLCommonSetupEvent event) {
        DIAMOND_SAND_CONFIG = Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, "diamond_sand",
                        new OreFeatureConfig(
                                InitBlocks.diamondSand.getDefaultState(), 9)

    public void onBiomeLoading(final BiomeLoadingEvent biome) {
        if(biome.getCategory() == Biome.Category.NETHER || biome.getCategory() == Biome.Category.THEEND) return;

                .add(() -> ModFeatures.DIAMOND_SAND_CONFIG);

That’s it. You should have no problems converting this to your needs if you do either reach out to me on my Discord or to the place where I got referenced at the top of this article.