Better Diving

Better Diving

6M Downloads

Terraforged world crash

The-Brandolorian opened this issue ยท 7 comments

commented

Upon loading new chunks in a Terraforged world I received this crash, extremely rare as I have been testing different world settings the last few hours and its only just happened.

Better Diving:1.2.3
Forge:36.1.4
Minecraft:1.16.5

Crash report:
https://gist.github.com/Brandonjaake/648ef379fc949b29917384eebf0ceae6

commented

Fixed in v1.16.5-1.2.4

commented

My oceans are pretty deep but I don't think I've seen any deeper than y=20

commented

It looks like TerraForged generates an empty chunk or a chunk with only one layer of blocks. And that sounds to me like a bug in TerraForged. But maybe you were trying worldgen settings were this can happen?

commented

You're getting the height from the chunk generator instead of the WorldGenRegion (ISeedReader):
https://github.com/Meldexun/BetterDiving/blob/master/src/main/java/meldexun/better_diving/world/gen/feature/RavineOutcropFeature.java#L41

Not sure why the generator would be returning a height of 1 unless it's caused by the custom generator settings they're using. Regardless, it's best to use ISeedReader if you can since it contains precomputed heightmaps - much faster than asking the chunk generator to calculate it from scratch.

A bound check before using the random would improve robustness with other world generators generally ๐Ÿ‘

commented

I'm generating ores at the sides of ravines. That's why I'm using the ChunkGenerator#getHeight. It returns the seafloor y "before" ravines are generated (usually >= 30). And ISeedReader#getHeight returns the seafloor y "after" ravines are generated.

And yes a bound check would fix it. But it still looks like a bug in the TerraForged chunk generator. Since Brandonjaake said the oceans were not deeper than y=20. So I don't see why the it should return something <= 1.

commented

They wouldn't be able to observe a chunk with a very low ocean-floor since they'd crash before getting to see it. I did take a second look to make sure and can confirm the method is reporting height correctly.

The generator settings they're using are very much at the extremes compared to what we test + ship TF with so it is possible that what they have configured could produce weird results like a sharp fall-off of height.

I guess it's not so unreasonable to assume the ocean floor goes no lower than y=2, so adding the bounds check is up to you. The only 'solution' we can offer the user from our end would be that they dial their settings back a little + test until the crashing stops

commented

Yeah my oceans do have a drop off pretty sure its unavoidable as I'm trying to create an island survival so the oceans are smaller and the islands y scale is increased. or could it be because I removed deep oceans? but they got replaced by normal ocean so assumed all was fine.