Open BrekiTomasson opened 4 years ago
Yeah this is an old issue that's been plaguing the mod for a long time. I'm not entirely sure how to fix it, but I'm gonna try a few things. I think part of the problem is that the normal world generator smooths the land around the village but I didn't include that in simplex terrain because that code is horribly obtuse. That being said I think I know a workaround; I'll keep you posted if I fix it.
I can think of a couple possible avenues for fixing this:
In addition, village fields often generate in odd patterns or replace the wrong blocks.
farm tree bottom text Jokes aside, I'm going to look into this very soon. Seems like village fields use the wrong heightmap or something, causing them to replace the topmost block. I'll look into a fix.
Ideally you should be using the height value used by structure placement computed directly from noise here, not the actual heightmap (and possibly just force this to be flat instead of following terrain shape to make it more efficient)...
And you probably need to implement whatever vanilla does to make terrain around structures flat. There is special code for that in the chunk generator.
Yeah, that's true. I've avoided that code for now because the math scares me :P
It honestly doesn't seem very complicated to me once you deobfuscate it. It essentially has a lookup table by x/y/z distance of the "weight" (may be "reversed"?) of the structure's Y coordinate vs real noise. Should be even simpler than vanilla if you don't have 3d noise.
Has there been any movement on this issue? I would love to use Simplex in the modpack I'm putting together, and this issue with villages (and structures in general) is the only thing stopping me.
I would love to see this issue fixed. Makes exploring structures a pain.
I might be mistaken about something, but it seems like half of this problem could be resolved by editing the data for village structures such that the interior of buildings is filled with "minecraft:air" blocks where necessary. Has anyone looked into this?
This is an issue with several mods that affect terrain generation, but as yours is the one I prefer (by far!), I'm raising this issue here.
Very often when encountering a village in a Simplex world - even with the default settings - houses can appear as floating in mid-air, supported only in a single corner, or they spawn with terrain inside of them, sometimes suffocating the villager that spawns inside.
I'm not sure how best to fix the problem of floating houses, unless there's some way to modify the terrain generation to raise the terrain to meet the bottom of houses and then somehow (re-)iterate terrain generation from there once the village has been placed, but I'm sure you know the code better than me and can think of something there. As for the buildings spawning with stuff inside of them, the best solution that I can think of is to somehow iterate through the structures, block by block and forcing anything not already dedicated to be a specific block to be set to minecraft:air instead of whatever the terrain generation has placed there.
Here's an an image illustrating a desert village spawning with sand inside the house.