Posted January 16, 20214 yr In my mod I'm generating a variety of resources. Most of these aren't too fancy, and can be handled using vanilla generation methods. Currently using code similar to the below: //Generate significant clay near the world surface at the shores of plains biomes Biomes.PLAINS.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.DISK.withConfiguration( new SphereReplaceConfig(Blocks.CLAY.getDefaultState(), 7, 5, Lists.newArrayList(new BlockState[]{DIRT, GRASS_BLOCK}))) .withPlacement(Placement.COUNT_TOP_SOLID.configure(new FrequencyConfig(100))) ); //Non-biome specific for (Biome biome : ForgeRegistries.BIOMES) { //Natural Stone is any of stone, andesite, granite, diorite //OreFeatureConfig Target, state, size //CountRangeConfig is count, bottom offset, top offset, maximum (altitude?) //DepthAverageConfig is count, baseline, spread biome.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration( new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, ModBlocks.LIMESTONE.get().getDefaultState(), 120)) .withPlacement(Placement.COUNT_DEPTH_AVERAGE.configure(new DepthAverageConfig(2, 55, 16)))); //COUNT_RANGE.configure(new CountRangeConfig(10, 0, 0, 256)))); } The code above has the following effects: In plains biomes only, many parts of the coast next to rivers generate clumps of clay in large quantities. Intended effect. In all biomes, most of the stone (but not all) around sea level is replaced with limestone using placement generation similar to that of Lapis. However, the vanilla ore has already generated by this point, and the vanilla coal on stone backdrop doesn't blend well on limestone. My goal is to have portions of vanilla stone replaced with limestone, portions of that replaced with carbonate minerals and dolomite (dolomitic limestone), and portions of the dolomite replaced with zinc/lead sulfides. Vanilla ores will remain embedded in vanilla stone only in lower and higher depths, but not in limestone. How would I go about setting a ore generation order (stone->carving?->limestone->vanilla ores)? Would I need to create my own Feature, FeatureConfig, and/or Placement classes to achieve desired functionality? In addition, how would I modify existing generated structures, either through removing/replacing? For example, for fossils to generate with pyrite blocks instead of coal blocks. Edited January 16, 20214 yr by Asleep365
January 16, 20214 yr Author I figured out how to avoid the ore generation timing; by setting GenerationStage.Decoration.UNDERGROUND_ORES to RAW_GENERATION, the ores will only show up on stone. Still can't figure out how to generate over the limestone yet
January 16, 20214 yr Author I think I figured out the problem, for anyone with a similar issue, following the advice from The generation stage should be set to something after raw_generation, for example underground ores. Edited January 16, 20214 yr by Asleep365
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.