Jump to content

[1.17][Solved] Custom world biome layer


Luis_ST

Recommended Posts

I am currently working on a mod with custom dimension.
The dimension had only one biome so far, but now i would like to add more biomes to the world, which has already presented me with a few problems,
which i was able to fix myself. but now I'm stuck when it comes to creating a custom biome layer.
I have already looked at the vanilla code and understand it partially, unfortunately not entirely, this leads me to the following questions:

  1. how do I prevent the biome from changing on the y axis?
  2. What is the difference between the IAreaTransformers (e.g. IAreaTransformer0, IAreaTransformer1, IAreaTransformer2, ICastleTransformer, and so on)?
  3. what does the ZoomLayer do?
  4. how do i change the size of the biomes because these are currently changing very often?
  5. how exactly change the value that I put in the long function the biomes which is create/add?
  6. is there also an easy way to generate multiple biomes?

I hope someone can help me because I had to find out that not many people here in the forum are familiar with world generation.
Thanks for replies

Edited by Luis_ST
Link to comment
Share on other sites

  • 3 months later...

1.17

After testing a lot i found a solution for the problem,
for people how have the same error i will explain here how the Layer System from vanilla works in 1.17
itrm: in the run method (of the transformer)

On 5/22/2021 at 6:25 PM, Luis_ST said:

how do I prevent the biome from changing on the y axis?

this was a bug in my code but I just had to ignore the y value in BiomeSource#getNoiseBiome
 

On 5/22/2021 at 6:25 PM, Luis_ST said:

What is the difference between the IAreaTransformers (e.g. IAreaTransformer0, IAreaTransformer1, IAreaTransformer2, ICastleTransformer, and so on)?

AreaTransformer0: can be used as base biome "layer", the parameters are: the LazyAreaContext, x pos in the area, y (z) pos in the area

AreaTransformer1: transformer to add a biome "layer" to an existing AreaFactory, the parameters are: the LazyAreaContext, the Area which is create from the AreaFactory itrm
the x pos in the area, y (z) pos in the area

AreaTransformer2: transformer to combine two AreaFactory for example the current BiomeLayer and a ClimateLayer, the parameters are: the LazyAreaContext, the Area which in create from the first AreaFactory itrm, the Area which is create from the second AreaFactory itrm, the x pos in the area, y (z) pos in the area

BishopTransformer: transformer to add a biome "layer" to an existing AreaFactory with a bit more logic, the parameters are: the LazyAreaContext, the biome id north west from the AreaFactory itrm, the biome id north east from the AreaFactory itrm, the biome id south east from the AreaFactory itrm, the biome id south west from the AreaFactory itrm, the center biome id from the AreaFactory itrm

C0Transformer: can also be used as base biome "layer", the parameters are: the LazyAreaContext, biome id of the x and y (z) pos in the area with offset 0

C1Transformer: can also be used as base biome "layer", the parameters are: the LazyAreaContext, biome id of the x and y (z) pos in the area with offset 1 in x+/y+

CastleTransformer: transformer to add a biome "layer" to an existing AreaFactory with a bit more logic, the parameters are: the LazyAreaContext, the biome id north from the AreaFactory itrm, the biome id east from the AreaFactory itrm, the biome id south from the AreaFactory itrm, the biome id west from the AreaFactory itrm, the center biome id from the AreaFactory itrm
 

On 5/22/2021 at 6:25 PM, Luis_ST said:

what does the ZoomLayer do?

very simple zooms the Area so biomes are larger
 

On 5/22/2021 at 6:25 PM, Luis_ST said:

how do i change the size of the biomes because these are currently changing very often?

this was an error in my Layer, because i used the wrong transformer, and i used BigContext#nextRandom to get the biome
 

On 5/22/2021 at 6:25 PM, Luis_ST said:

how exactly change the value that I put in the long function the biomes which is create/add?

is a simple long value, you can choose a random one or you use scheme like 1, 2, 3, 4, ...
note if you use a value twice it could lead problems (particularly if you used the same Layer)
 

On 5/22/2021 at 6:25 PM, Luis_ST said:

is there also an easy way to generate multiple biomes?

vanilla has only the system which is explained above and forge has unfortunately nothing

I hope my explanation was helpful, if something is wrong let me know this and i will edit the post
i will create soon a Example Mod about the Biome generation and the different Layers and possible implementations, when the mod is finished i will edit this post and add the link to the repo
-> since Minecraft change the Biome generation, I won't publish an Example Mod for the 1.17 anymore, i will wait till the final release for 1.18.x

Edited by Luis_ST
  • Like 1
Link to comment
Share on other sites

  • Luis_ST changed the title to [1.17][Solved] Custom world biome layer
  • 2 weeks later...
On 9/13/2021 at 3:56 PM, Luis_ST said:

i will create soon a Example Mod about the Biome generation and the different Layers and possible implementations, when the mod is finished i will edit this post and add the link to the repo

sorry for the question but when will the example mod be released

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.