Hi.
So i remade my plugin to export some raw data from chunks to use as source data for a map. I need a quick way to navigate in middle of sectors. So i write a custom command /tps x, z who teleport me in middle of sector at surface level.
And now things get started to get strange...
In almost all sector, if not all (well for 0,0 usually i find water here) is a strange cave generated in middle of sector who is big vertically hole around 30 blocks (in some sectors i found hole at few blocks under surface, but usually hole is open). After vertical part cave continue horizontally some blocks to south and after come a very very big vertical section ("death hole") as can see in a few images from different sectors
So here is some strange in generation of cave for this particular position from sector (middle of it). But real problem come when used functionn chunk.getLODSurfaceLevel(bx,bz) to calculate elevation of terrain. getLODSurfaceLevel return Y as cave is non existent. And when i move player in this position, i fall around 30 blocks on first vertical section of cave...
As you see in next image, here i got teleported (over hole, and height i calculated from chunk.getLODSurfaceLevel(bx,bz) ).
I think function getLODSurfaceLevel return wrong result for this case when i go in middle of sector and find this strange generated cave.
As reference this is function to calculate Y height of surface:
PS:
I search other cave (regular one not the one with big vertical entrance) and teleported over it using Y calculated by getLODSurfaceLevel and seems i got at surface of terrain as cave was not here. So i think cave are ignored by this function.
Thx red51