Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.15.2] Generating/replacing resources in biomes
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
Asleep365

[1.15.2] Generating/replacing resources in biomes

By Asleep365, January 16 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Asleep365    0

Asleep365

Asleep365    0

  • Tree Puncher
  • Asleep365
  • Members
  • 0
  • 21 posts
Posted January 16 (edited)

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 by Asleep365
  • Quote

Share this post


Link to post
Share on other sites

Asleep365    0

Asleep365

Asleep365    0

  • Tree Puncher
  • Asleep365
  • Members
  • 0
  • 21 posts
Posted January 16

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

  • Quote

Share this post


Link to post
Share on other sites

Asleep365    0

Asleep365

Asleep365    0

  • Tree Puncher
  • Asleep365
  • Members
  • 0
  • 21 posts
Posted January 16 (edited)

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 by Asleep365
  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Pixelovski
      Stuck on "Configuration file X is not correct. Correcting"

      By Pixelovski · Posted 6 minutes ago

      Hello, My friends and I just bought a Minecraft hosting to use with forge. And we're encountering problem where the server starts fine, we can connect, but it just keeps spitting out warnings about incorrect config files and it's really annoying and I think it eats up some resources... When we tried forge by itself without any mods there wasn't any issue. When I try to run the server with the exact same files on my pc it works fine. So is there way to just stop the server from trying to correct the config files (or whatever it is that it is doing) or something? Thank you in advance.   Here is the link to the latest log file: https://www.dropbox.com/s/1ni8tko383q4mlg/2021-03-07-10.log?dl=0
    • Nyko
      [1.16.5] overwriting the maximum build height

      By Nyko · Posted 8 minutes ago

      thanks for the info, since the whole thing sounds pretty complicated, I will probably not change it
    • ChocoCookies33
      Description: Exception in server tick loop

      By ChocoCookies33 · Posted 21 minutes ago

      local server set up not working, help is appreciated.  crash-2021-03-07_00.55.37-server.txt
    • LessyDoggy
      Forge 1.12.2 Installing Bug

      By LessyDoggy · Posted 1 hour ago

      So I used forge 1.16.5 but now I cant change it too 1.12.2 no mather what. I have tried Installing client, Installing server and extract but nothing works. I even removed forge 1.16.5 from my computer but I still have that verison on and idk how to change it.
    • Yourskillx2
      !!Keeps crashing during launch!!

      By Yourskillx2 · Posted 2 hours ago

      I have a decent sized mod pack with around 90 mods and every time I go to launch the game, it loads some stuff then crashes with exit code 0, I cannot figure out if its a mod in the pack doing it, like maybe not a release version or if it just doesn't work with Mc like its supposed to.
  • Topics

    • Pixelovski
      0
      Stuck on "Configuration file X is not correct. Correcting"

      By Pixelovski
      Started 6 minutes ago

    • Nyko
      4
      [1.16.5] overwriting the maximum build height

      By Nyko
      Started 14 hours ago

    • ChocoCookies33
      0
      Description: Exception in server tick loop

      By ChocoCookies33
      Started 21 minutes ago

    • LessyDoggy
      0
      Forge 1.12.2 Installing Bug

      By LessyDoggy
      Started 1 hour ago

    • Yourskillx2
      0
      !!Keeps crashing during launch!!

      By Yourskillx2
      Started 2 hours ago

  • Who's Online (See full list)

    • Pixelovski
    • Kreepydude
    • loordgek
    • Nyko
    • zlappedx3
    • Helios885
    • ChocoCookies33
    • vemerion
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.15.2] Generating/replacing resources in biomes
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community