superfluke / hexlands

MIT License
7 stars 10 forks source link

Biome Height Offsets #24

Closed mpevner closed 6 years ago

mpevner commented 6 years ago

So, I've found that biomes from Biomes O' Plenty and Traverse so far do not quite have the right offset for the rim, I think. This is most evidenced with water biomes, in that even after the water offset, the rim is still too high. A presumed proper scenario, River: https://i.imgur.com/o1Xo1BZ.png And incorrect results from Coral Reef (BoP): https://i.imgur.com/VD8YofW.png

Barring code calling out specific biomes for a mod, possibly a Manual Offset list, providing for <biome, offset> tuples? Both of them are in the Sunken and Wet biomes list, without that the Coral Reef is one block higher still.

A related aside, any hope for defaults on Sunken and Wet to handle more common biome mods?

superfluke commented 6 years ago

Yeah I think I see the problem, oceans and rivers were hard coded to be 1 lower. Should be easy enough to fix now that the sunken biome config exists. If you have a list of other biomes like coral reefs that should be lower, that would be helpful for making a default set for sunken biomes.

mpevner commented 6 years ago

So far I've got the following biomes:

minecraft:ocean
minecraft:deep_ocean
minecraft:river
biomesoplenty:coral_reef
biomesoplenty:mangrove
biomesoplenty:marsh
biomesoplenty:quagmire
biomesoplenty:land_of_lakes
biomesoplenty:fen
biomesoplenty:bayou
biomesoplenty:kelp_forest
biomesoplenty:gravel_beach
traverse:green_swamp

That list is probably incomplete though, as I've just been flying around and going 'that looks incorrect' for the heights. I've attached a CSV with all the biomes though, the metadata/names might provide a better guess?

biomes-csv_2018-09-08_05.37.39.txt

mpevner commented 6 years ago

Another possible biome to include: minecraft:swampland

Also, further 'water logic' may be needed -- https://i.imgur.com/RYhVI6c.jpg Both of the biomes in that image are biomesoplenty:woodlands but one is a normal land <little/no water> while the other I presume is a lake \. The edge on land is fine, but the water one also has the air block gap. Maybe it needs to adjust the edging for lakes? Pondering that thought further, I'm wondering if it may be more sane to look underneath: if we hit air, keep looking down until we hit something. If it's water, swap it out, if it's solid, place on top. Extending that, outlineAllDry could instead turn into place blocks on top of ground. If it would be placed in water, dont place. Granted, I could see elevation differences being a problem there.

superfluke commented 6 years ago

Ok should be better now. Rims should be just above the water surface rather than floating. Added the kelp and coral biomes to have sunken rims by default (so they are even with the water).

From the screen shot you posted, if thats a woodland biome with a lake that big then it is most likely below sea level. You can try setting the terrainBaseline config a bit higher to prevent that. Checking to see if there's air or water for where to place the rims doesn't sound like a terrible idea, but like you said, it'd run into problems where hexes have areas both above and below water.