Jump to content

[1.16.5] Custom Biome Layer part of Vanilla World Generation


killerjdog51

Recommended Posts

Hey, I was wondering how I could add a custom biome layer to vanilla world generation?


I see in IForgeWorldType there is a getBiomeLayer method that takes an IAreaFactory, overworldGenSettings, and a LongFunction (world seed) and returns the same IAreaFactory with bamboo forests.

I was thinking I'd use the WorldTypeEvent.BiomeSize event to seamlessly insert my custom biome layer into vanilla generation since the event occurs within the function that builds the vanilla biome layers. 
Because my understanding is that if I got the vanilla IAreaFactory I would have to return it with my custom biome layer before LayerUtil gives the layer to the OverworldBiomeProvider. 

The issue is I can't figure out how to get the vanilla IAreaFactory, so I was wondering if there was a better way to add a custom biome layer to vanilla world generation?

Link to comment
Share on other sites

1 minute ago, Luis_ST said:

add a custom Biome to the overworld is very simple, just call BiomeManager#addAdditionalOverworldBiomes in FMLCommonSetupEvent

Unfortunately that didn't work the way I wanted it to. What I'm trying to accomplish is to have a rare biome that spawns within another more common biome, similar to how bamboo forests spawn within jungles. I've found that if I just add my custom biome to world generation that it will generate on the outside between different biomes (Like in the middle of a jungle, desert, and plains) rather than within/surrounded by a single specific biome. Like its very jarring and unsatisfying, which is why I want to make it generate as a layer instead since I want my biome to behave more akin to bamboo jungles or sunflower plains.  

Link to comment
Share on other sites

Thats what I was thinking, and unfortunately I don't think theres a good way to accomplish that, which is why I was hoping for an easy way to slip my biome layer into the world generation through some sort of forge manager (like the BiomeManager) or through an event (like one of the WorldEvents or WorldTypeEvent). 

The only other solution I can think of is by generating a feature and inserting my custom biome into the BiomeContainer using reflection, which is possible except I would need to know the exact obfuscated methods/fields (which is like trying to find a needle in a haystack). 

Link to comment
Share on other sites

6 minutes ago, killerjdog51 said:

hats what I was thinking, and unfortunately I don't think theres a good way to accomplish that, which is why I was hoping for an easy way to slip my biome layer into the world generation through some sort of forge manager (like the BiomeManager) or through an event (like one of the WorldEvents or WorldTypeEvent).

forge has no really helpful tool for that

 

6 minutes ago, killerjdog51 said:

The only other solution I can think of is by generating a feature and inserting my custom biome into the BiomeContainer using reflection, which is possible except I would need to know the exact obfuscated methods/fields (which is like trying to find a needle in a haystack).

if you need the mapping names of methods/fields you can use the forge bot on discord

Link to comment
Share on other sites

21 minutes ago, Luis_ST said:

 

if you need the mapping names of methods/fields you can use the forge bot on discord

There's a discord channel and a forge bot? Honestly I'm not as surprised as I thought I'd be. Guess I'll check it out then. I didn't think it was possible since I didn't see anything past 1.15 on the old website. 

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

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