Posted January 30, 20232 yr 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
January 31, 20232 yr What version is this for? Also, please provide the code in a block, paste, or repo since this is difficult to understand.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.