minetest-mods / nether

Nether mod for Minetest
https://forum.minetest.net/viewtopic.php?f=11&t=5790
19 stars 26 forks source link

Unknown nodes appear below the nether #51

Closed Treer closed 1 year ago

Treer commented 3 years ago

The nodes in question are the "node_stone" of the nether_caverns biome, they just look like unknown nodes because node_stone is set to "nether:native_mapgen" and "nether:native_mapgen" has an empty definition.

I'm unsure whether this is an engine bug, or a constraint I don't understand.

With a biome defined from -5000 to -11000, the entire chunk below the biome ends up with the biome's node_stone appearing at underhangs.

The relevant chunk spans 10992 to 11072, so the node_stone appears down to 11072 even though the biome was defined with a y_min of -11000, and has its vertical_blend set to 0.

This can be hidden by using a biome y_min of -11072 instead (i.e. align the biome boundary to the chunk boundary by setting the bottom of the nether to -11072), but I'd like to understand whether it's an engine bug or blend feature or an oversight in my understanding of biomes.

(Ignore the fact that the node_stone appears as "unknown" in the screenshot, that's unrelated and doesn't affect the issue) screenshot_20210705_225643_small

To "fix"

Set the bottom of the nether to -11072 (or your nearest chunk boundary y value)

0siribix commented 3 years ago

Seems like an engine bug 🤷‍♂️

ronoaldo commented 3 years ago

Is it possible to fix the issue (specially for already generated blocks) with a register_alias definition on the missing nodes? Or will this somewhat break the nether generation altogether? Perhaps using a temporary ABM/LBM?

0siribix commented 3 years ago

either will work. I think an alias would be more efficient and resource friendly

Treer commented 2 years ago

Best workaround is probably setting nether depth to 11072

An alias might prevent new nether chunks from generating correctly, depending on how aliases are implemented. The purpose of nether:native_mapgen is to prevent the C++ mapgen from creating stone in the nether, because IIRC it calls its decoration routines before the nether's on_generate() is invoked, and that causes edge cases I can't recall the details of (perhaps ores or decorations crossing chunk boundaries?). Anything that replaces nether:native_mapgen in a chunk after the chunk has been fully generated should be fine.

Treer commented 1 year ago

Existing out of place neither nodes are hidden by #72, and new nodes will no longer leak due to https://github.com/minetest/minetest/pull/13472 fixing https://github.com/minetest/minetest/issues/13440