Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package chris.chrispymod.world;
- import chris.chrispymod.config.OreGenConfig;
- import chris.chrispymod.lists.ChrispyBlocks;
- import net.minecraft.world.biome.Biome;
- import net.minecraft.world.gen.GenerationStage.Decoration;
- import net.minecraft.world.gen.feature.ConfiguredFeature;
- import net.minecraft.world.gen.feature.Feature;
- import net.minecraft.world.gen.feature.OreFeatureConfig;
- import net.minecraft.world.gen.feature.OreFeatureConfig.FillerBlockType;
- import net.minecraftforge.registries.ForgeRegistries;
- public class OreGeneration
- {
- public static void setupOreGeneration()
- {
- if(OreGenConfig.generate_overworld.get())
- {
- for(Biome biome : ForgeRegistries.BIOMES)
- {
- // Chance to spawn (how many veins will spawn per chunk), Minimum Height, Maximum Height Base, Maximum Height.
- // 8 is max number of ore blocks that can spawn in a vein.
- biome.addFeature(Decoration.UNDERGROUND_ORES, new ConfiguredFeature<OreFeatureConfig>(Feature.ORE, new OreFeatureConfig(FillerBlockType.NATURAL_STONE, ChrispyBlocks.ruby_ore.getDefaultState(), OreGenConfig.ruby_chance.get())));
- biome.addFeature(Decoration.UNDERGROUND_ORES, new ConfiguredFeature<OreFeatureConfig>(Feature.ORE, new OreFeatureConfig(FillerBlockType.NATURAL_STONE, ChrispyBlocks.opal_ore.getDefaultState(), OreGenConfig.opal_chance.get())));
- biome.addFeature(Decoration.UNDERGROUND_ORES, new ConfiguredFeature<OreFeatureConfig>(Feature.ORE, new OreFeatureConfig(FillerBlockType.NATURAL_STONE, ChrispyBlocks.tangerine_ore.getDefaultState(), OreGenConfig.tangerine_chance.get())));
- biome.addFeature(Decoration.UNDERGROUND_ORES, new ConfiguredFeature<OreFeatureConfig>(Feature.ORE, new OreFeatureConfig(FillerBlockType.NATURAL_STONE, ChrispyBlocks.cobalt_ore.getDefaultState(), OreGenConfig.cobalt_chance.get())));
- biome.addFeature(Decoration.UNDERGROUND_ORES, new ConfiguredFeature<OreFeatureConfig>(Feature.ORE, new OreFeatureConfig(FillerBlockType.NETHERRACK, ChrispyBlocks.ruby_ore_nether.getDefaultState(), OreGenConfig.ruby_chance.get())));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment