This repository has been archived on 2025-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
Files
GamerItems/src/main/java/net/arcmods/ryantlg/worldGeneration/DeepslateOriumOreGen.java
RyanTLG 9e3bc27b2a First release
Removed alterworld json, added lisence, added deepslate ore generation, updated code to be more "family friendly".
2022-04-28 19:04:42 +02:00

49 lines
2.2 KiB
Java

package net.arcmods.ryantlg.worldGeneration;
import net.arcmods.ryantlg.gamermod;
import net.arcmods.ryantlg.blocks.oriumBlocks;
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
import net.minecraft.util.registry.RegistryKey;
import net.minecraft.world.gen.YOffset;
import net.minecraft.world.gen.GenerationStep;
import net.minecraft.world.gen.decorator.CountPlacementModifier;
import net.minecraft.world.gen.decorator.HeightRangePlacementModifier;
import net.minecraft.world.gen.decorator.SquarePlacementModifier;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.OreConfiguredFeatures;
import net.minecraft.world.gen.feature.OreFeatureConfig;
import net.minecraft.world.gen.feature.PlacedFeature;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.Identifier;
public class DeepslateOriumOreGen {
private static ConfiguredFeature<?, ?> ORE_CONFIGURED_FEATURE = Feature.ORE.configure(new OreFeatureConfig(
OreConfiguredFeatures.DEEPSLATE_ORE_REPLACEABLES,
oriumBlocks.DEEPSLATE_ORIUM_ORE.getDefaultState(),
5)); // vein size
public static PlacedFeature ORE_PLACED_FEATURE = ORE_CONFIGURED_FEATURE.withPlacement(
CountPlacementModifier.of(5), // number of veins per chunk
SquarePlacementModifier.of(), // spreading horizontally
HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(35))); // height
public static void register() {
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE,
new Identifier("gamermod", "deepslate_orium_ore"), ORE_CONFIGURED_FEATURE);
Registry.register(BuiltinRegistries.PLACED_FEATURE, new Identifier("gamermod", "deepslate_orium_ore"),
ORE_PLACED_FEATURE);
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES,
RegistryKey.of(Registry.PLACED_FEATURE_KEY,
new Identifier("gamermod", "deepslate_orium_ore")));
gamermod.LOGGER.info("DeepslateOriumOreGen loaded");
}
}