BUG? chunk.getLODSurfaceLevel(bx,bz) don't take in account caves? And strange cave generation in middle of almost all sectors.

  • 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

  • Unfortunately the LOD surface level indeed does not take caves into account yet :/ Usually it's not a big problem (because there shouldn't be many steep caves near the surface), however, there is indeed always a hard-coded steep cave at the center of each island (which goes down straight to hell). Originally we've added it for testing purposes, but decided to keep it in the game for the biomes&caves update. Maybe we will remove it in the future.


    Unfortunately I can't give an ETA when caves will be taken into account for the LOD surface level, however, a workaround would be to take this particular cave into account when teleporting to the center of an island. It has always the same layout. It's definitely not an elegant solution, but could work for now. The surface hole always goes down roughly 32 blocks (but only if the surface of the island at this position is above sea level, i.e. 90).

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!