Getting Features to only Generate on biome intersections

Started by mopoe on

Topic category: Help with modding (Java Edition)

Last seen on 01:48, 22. Jan 2024
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Getting Features to only Generate on biome intersections

I have been working on a mod that overhauls overworld terrain generation to be more geologically realistic and accurate making use the feature element. While the feature element is currently very limited and cant do very much at the moment or at the very least with my understanding of it. There are things that should only be at where biomes meet within a very limited range from where they are. Mainly River Deltas, I have been unsatisfied with them and getting them too look right as I don't have a proper way or to make them bleed in recreating a mod due to changes in Minecraft's code from 1.12.2 and to terrain generation.

This is what it looked like in 1.12.2 and I cant get it to feel right in 1.20.1 without massive chunk generation lag using old 1.12.2 code. Would there be any real fixes are work arounds for this problem?

 

Last seen on 23:34, 25. Feb 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a fair bit you can…
Fri, 12/08/2023 - 11:58

There is a fair bit you can do with world features. At least as of the latest version, the 'custom generation condition' often goes underappreciated. What I only recently learned is that when you provide the feature with a custom condition, you can also use the condition to run custom code, which runs when the feature is generated. Essentially, you can make a condition that always returns true and runs a custom procedure when the feature generates; or a condition that both checks something and runs additional code if it would return true.

I was able to do a fair bit of stuff with this, from generating custom structures using feature code, to spreading random blocks in situationally aware ways. Specifically for biome border stuff, you could have a condition that checks several positions in a circle around the block, and returns true if at least two of them are different biomes. 

Not as sure about moving to 1.12.2. If you're running into significant lag updating to the latest version, it may be worth creating a new workspace with the same mod identifier/namespace, (so players who already have the mod would be able to safely update to the new version), and rebuilding the mod by importing procedures from the old workspace and seeing if you can identify the issue. 

Last seen on 01:48, 22. Jan 2024
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I am rebuilding it from the…
Sat, 12/09/2023 - 00:51

I am rebuilding it from the ground up from 1.12.2 part of the problem is how i have the generation handled in 1.12.2 where I first have an ore generate then it does a check where if it passes it does its thing and if it fails it reverts to a generic block like stone or dirt and if it passes it does a series of checks to determine what generates, such as mud, coarse gravel, silt, if the biome should have grass or coarse dirt in the delta. during chunk initial gen in the 1.12.2 version of Minecraft it lags for a few frames and then its done. However in 1.20.1 it lags for a noticeable duration longer per chunk generated than in 1.12.2 up to 12 additional frames.