Wuzzy2 / MineClone2-Bugs

Bug tracker archive for MineClone 2 (no new posts allowed)
MIT License
7 stars 0 forks source link

Rivers have riverbed out of grass blocks in valleys mapgen #398

Closed Wuzzy2 closed 6 years ago

Wuzzy2 commented 6 years ago

I have no idea why this is happening. I have set node_riverbed and depth_riverbed for all biomes, yet in many biomes the rivers in the valleys mapgen still generate with grass blocks as riverbed instead of sand. Even worse, trees generate in the rivers, probably because it's made of grass blocks. Very weird.

@paramat: What could possibly be the cause for this? Are you aware of any problems in the valleys mapgen with regards to riverbeds? I have also seen the same bug in Lord of the Test.

paramat commented 6 years ago

I've seen this happen sometimes but can't remeber the cause or solution, will investigate your code.

Wuzzy2 commented 6 years ago

@paramat: I think I figured out the reason! I currently use the default water (mcl_core:water_source) for both ocean water and river water. Apparently Minetest seems to get confused when I do that. This node has a liquid flowing distance of 7 (instead of the default 8).

If I add a new separate river water node, and use that for the rivers instead, the riverbeds are generated correctly. But I'm not sure if I want to add a new node.

paramat commented 6 years ago

Sorry i didn't investigate, i intended to then forgot. Yes riverbed nodes are only placed if river water is detected above the river bed. You could add a new liquid node identical to normal water (apart from name) and set the 'river water' mapgen alias to that.

Wuzzy2 commented 6 years ago

You could add a new liquid node identical to normal water (apart from name) and set the 'river water' mpgen alias to that.

Sorry, this solution is too hacky. First, I don't like to add a node only to make the mapgen happy. But this is only a minor problem. Adding the node definition is simple, but handling all the special cases I have to capture now is not. The biggest problem is that this fake river water won't merge with normal water, and water flowing will appear to the player to be completely messed up. For example, if the player empties a “normal water” bucket near a river.

If the mapgen depends on the river water node to be different, then it's a design flaw. Using the same node for river water and normal water is a perfectly reasonable use case.

paramat commented 6 years ago

this solution is too hacky.

It's a bit hacky yes, but if you want to use mapgen in a way that is strongly advised against then you have to accept using a hack.

First, I don't like to add a node only to make the mapgen happy.

That's too bad, it's necessary due to how mapgen has to work.

The biggest problem is that this fake river water won't merge with normal water, and water flowing will appear to the player to be completely messed up. For example, if the player empties a “normal water” bucket near a river.

Good point, in the issue thread i suggest we can add code to buckets that allows liquid A to drop liquid B, similar to and consistent with the 'drop = ' node definition. This will be useful for other uses.

If the mapgen depends on the river water node to be different, then it's a design flaw.

No it's that way for a reason, i explain why in the issue threads.

Using the same node for river water and normal water is a perfectly reasonable use case.

It seems reasonable at first if you don't know about the resulting flooding risk and how mapgen works. If river water could have used normal water it would do so already, adding a new 'base terrain node' is a big step that required a lot of justification. It's also very reasonable (and makes more sense) that river water is a different node to ocean water. One is salt water, the other fresh.

You are trying to emulate MC and MC doesn't have sloping rivers, they are at sea level like in mgv7. If MC had sloping rivers it would have to use a different node for river water too.

Wuzzy2 commented 6 years ago

I have now added river water to this subgame, fixing this issue.

After many months, I have finally decided to no longer try to be 100% strict in cloning Minecraft. After all, this seems to be the more sensible solution.