Jump to content

Kexibq

Members
  • Posts

    1
  • Joined

  • Last visited

Kexibq's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. public static void generateOres(final BiomeLoadingEvent event) { for (OreType ore : OreType.values()) { OreFeatureConfig oreFeatureConfig = new OreFeatureConfig( OreFeatureConfig.FillerBlockType.BASE_STONE_OVERWORLD, ore.getBlock().get().getDefaultState(), ore.getMaxVeinSize()); // bottomOffset -> minimum height for the ore // maximum -> minHeight + maximum = top level (the vertical expansion of the ore, it grows x levels from bottomOffset) // topOffset -> subtracted from the maximum to give actual top level // ore effectively exists from bottomOffset to (bottomOffset + maximum - topOffset) ConfiguredPlacement<TopSolidRangeConfig> configuredPlacement = Placement.RANGE.configure( new TopSolidRangeConfig(ore.getMinHeight(), ore.getMinHeight(), ore.getMaxHeight())); ConfiguredFeature<?, ?> oreFeature = registerOreFeature(ore, oreFeatureConfig, configuredPlacement); RegistryKey<Biome> key = RegistryKey.getOrCreateKey(Registry.BIOME_KEY, event.getName()); Set<BiomeDictionary.Type> types = BiomeDictionary.getTypes(key); if(types.contains(BiomeDictionary.Type.MAGICAL.HOT.DRY.RARE)) event.getGeneration().withFeature(GenerationStage.Decoration.UNDERGROUND_ORES, oreFeature); } } I tried to use BiomeDictionary from my code about FlowersGeneration but this didnt work and ore spawn also in savanna for example. (My biome has type Magical, Hor, Dry, Rare and it is Forest Biome) i have only 5 days experience of modding) Can someone help me with ore gen pls
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.