Builderb0y / BigGlobe

This is my worldgen mod for Minecraft. There are many like it, but this one is mine.
Other
14 stars 0 forks source link

Vanilla igloo floor with basement generated above terrain. #11

Open alexander4308 opened 4 days ago

alexander4308 commented 4 days ago

I tried to find any information about this bug, but i failed. It is generated above the ground at the middle of the hill. So i suggest to keep an eye on any flying structures.

Builderb0y commented 2 days ago

Igloos look fine to me, including ones with and without basements. Can you give the world seed + coordinates of an igloo with this issue, along with a screenshot of the issue? A log file might also help.

alexander4308 commented 2 days ago

Found another one {9BADFA26-59B5-4A7E-B0E0-84B4ED2B37F2}

Builderb0y commented 2 days ago

Oh, it spawned in a lake. That explains it. What's happening here is that the igloo tries to position itself on the surface, but it doesn't know there's a lake there. Meanwhile, the lake decreases the Y level of terrain around it, without knowing there's an igloo there. The net result is that the igloo spawns where the surface would have been if the lake hadn't been there, which is a higher Y level than with the lake there. The igloo also tries to flatten the ground around it so that it's not floating, but the lake probably decreases the Y level afterwards, which negates that effect.

There is not much I can do about this, since minecraft doesn't have any good systems in place to make structures avoid spawning on top of each other. The only system minecraft has to avoid structure collisions at all is not good, as it's prone to crashing if used incorrectly, and only works for structures that are on the surface. Underground structure collisions can cause problems too.

Maybe what I could do is make lakes decrease the surface Y level first, before any other structures try to spawn. The igloo still wouldn't know about the lake, and would try to spawn higher, but it would also manipulate the surface after the lake does, and hopefully be on flat ground again. You might see an ugly hill in the middle of a lake when this happens, but at least the igloo wouldn't be floating mid-air anymore. I will try this.

Builderb0y commented 10 hours ago

I'm not sure if this is an improvement or not, but this is what it looks like when lakes decrease the surface Y level first, before igloos do anything. image

alexander4308 commented 5 hours ago

Shouldn't be a problem since you've got the custom chunk generator?

Builderb0y commented 4 hours ago

Having a custom chunk generator doesn't automatically mean everything is easy to make work without bugs. There's still a lot of things I don't have control over, and this is one of them. Minecraft's structure placement logic is something that has caused a lot of annoyances for me in the past, so believe me when I say if there was an easy way to make structures behave themselves and stop colliding with each other, I'd've done that by now.

alexander4308 commented 29 minutes ago

This igloo facing at? {5929A508-4DF1-42D6-832E-871117AE9FD6}