For anyone who is stuck on ore generation, this is what I've come up with. It works, of course everything is already filled in, the variable effecting the ore spawning is at the top.
Feel free to use code, just make sure you use your blocks instead of mine.
package com.ianite.main.world;
import com.ianite.main.block.IaniteBlocks;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import net.minecraft.world.gen.GenerationStage;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreFeatureConfig;
import net.minecraft.world.gen.placement.CountRangeConfig;
import net.minecraft.world.gen.placement.Placement;
import net.minecraftforge.common.BiomeManager;
public class IaniteOreGeneration {
private static final CountRangeConfig IANITE = new CountRangeConfig(15, 10, 0, 25);
private static final int IANITE_VEINSIZE = 5;
private static final CountRangeConfig TRITANIUM = new CountRangeConfig(25, 10, 0, 128);
private static final int TRITANIUM_VEINSIZE = 8;
public static void setupOreGeneration() {
for (BiomeManager.BiomeType btype : BiomeManager.BiomeType.values()) {
for (BiomeManager.BiomeEntry biomeEntry : BiomeManager.getBiomes(btype)) {
if (IaniteOreConfig.enableIaniteOre) {
biomeEntry.biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE,
IaniteBlocks.ianite_ore.getDefaultState(), IANITE_VEINSIZE), Placement.COUNT_RANGE, IANITE));
}
}
}
}
public static void setupNetherOreGeneration() {
if (IaniteOreConfig.enableTritaniumOre) {
Biomes.NETHER.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createDecoratedFeature(Feature.ORE, new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NETHERRACK,
IaniteBlocks.tritanium_ore.getDefaultState(), TRITANIUM_VEINSIZE), Placement.COUNT_RANGE, TRITANIUM));
}
}
}