Merge branch '1.16.5' of gitlab.com:jeseibel/minecraft-lod-mod into 1.16.5

This commit is contained in:
James Seibel
2021-10-25 07:21:26 -05:00
8 changed files with 46 additions and 2 deletions
@@ -105,6 +105,7 @@ public class LodRenderer
private int[] previousPos = new int[] { 0, 0, 0 };
public NativeImage lightMap = null;
public NativeImage lastLightMap = null;
// these variables are used to determine if the buffers should be rebuilt
private float prevSkyBrightness = 0;
@@ -131,6 +132,7 @@ public class LodRenderer
*/
public boolean[][] vanillaRenderedChunks;
public boolean vanillaRenderedChunksChanged;
public boolean vanillaRenderedChunksEmptySkip = false;
public int vanillaBlockRenderedDistance;
@@ -872,6 +874,11 @@ public class LodRenderer
prevSkyBrightness = skyBrightness;
}
/*if (lightMap != lastLightMap)
{
fullRegen = true;
lastLightMap = lightMap;
}*/
//================//
// partial regens //
@@ -885,7 +892,6 @@ public class LodRenderer
{
partialRegen = true;
vanillaRenderedChunksChanged = false;
}
prevVanillaChunkTime = newTime;
}
@@ -914,6 +920,8 @@ public class LodRenderer
int zIndex;
for (ChunkPos pos : chunkPosToSkip)
{
vanillaRenderedChunksEmptySkip = false;
xIndex = (pos.x - mc.getPlayer().xChunk) + (chunkRenderDistance + 1);
zIndex = (pos.z - mc.getPlayer().zChunk) + (chunkRenderDistance + 1);
@@ -934,10 +942,11 @@ public class LodRenderer
// if the player is high enough, draw all LODs
if (chunkPosToSkip.isEmpty() && mc.getPlayer().position().y > 256)
if (chunkPosToSkip.isEmpty() && mc.getPlayer().position().y > 256 && !vanillaRenderedChunksEmptySkip)
{
vanillaRenderedChunks = new boolean[vanillaRenderedChunksWidth][vanillaRenderedChunksWidth];
vanillaRenderedChunksChanged = true;
vanillaRenderedChunksEmptySkip = true;
}
}
@@ -0,0 +1,5 @@
package com.seibel.lod.wrappers;
public class BlockWrapper
{
}
@@ -0,0 +1,5 @@
package com.seibel.lod.wrappers;
public class ChunkWrapper
{
}
@@ -0,0 +1,5 @@
package com.seibel.lod.wrappers;
public class DimensionWrapper
{
}
@@ -0,0 +1,5 @@
package com.seibel.lod.wrappers;
public class LigthMapWrapper
{
}
@@ -0,0 +1,5 @@
package com.seibel.lod.wrappers;
public class MutableBlockPosWrapper
{
}
@@ -0,0 +1,5 @@
package com.seibel.lod.wrappers;
public class TextureWrapper
{
}
@@ -0,0 +1,5 @@
package com.seibel.lod.wrappers;
public class WorldWrapper
{
}