Added LevelPosUtil, now the node are added using it and not with the LevelPos object

This commit is contained in:
Leonardo
2021-09-01 15:15:23 +02:00
parent 4c7ca395c6
commit 1360edb459
6 changed files with 274 additions and 69 deletions
@@ -773,7 +773,7 @@ public class LodRenderer
//=============//
// full regens //
//=============//
// check if the view distance changed
if (ClientProxy.previousLodRenderDistance != LodConfig.CLIENT.lodChunkRenderDistance.get()
|| mc.options.renderDistance != prevRenderDistance
@@ -787,13 +787,7 @@ public class LodRenderer
//vanillaRenderedChunks.stream().filter(pos -> ((Math.abs(pos.x - player.xChunk) > mc.options.renderDistance) || (Math.abs(pos.z - player.zChunk) > mc.options.renderDistance)));
vanillaRenderedChunks.clear();
}
// did the user change the debug setting?
if (LodConfig.CLIENT.debugMode.get() != previousDebugMode)
{
previousDebugMode = LodConfig.CLIENT.debugMode.get();
fullRegen = true;
}
long newTime = System.currentTimeMillis();
@@ -868,6 +862,14 @@ public class LodRenderer
{
vanillaRenderedChunks.clear();
}
// did the user change the debug setting?
if (LodConfig.CLIENT.debugMode.get() != previousDebugMode)
{
previousDebugMode = LodConfig.CLIENT.debugMode.get();
fullRegen = true;
}
}
}
@@ -121,7 +121,7 @@ public class RenderUtil
{
// convert the vbo position into a direction vector
// starting from the player's position
Vector3d vboVec = new Vector3d(vboCenterPos.getX(), 0, vboCenterPos.getZ());
Vector3d vboVec = new Vector3d(vboCenterPos.getX(), 64, vboCenterPos.getZ());
Vector3d playerVec = new Vector3d(playerBlockPos.getX(), playerBlockPos.getY(), playerBlockPos.getZ());
Vector3d vboCenterVec = vboVec.subtract(playerVec);