Start merging in 1.16.5_QuadTree

The mod does compile and render, however distance LODs don't generate or render correctly and there are other problems as well.
This commit is contained in:
James Seibel
2021-08-04 23:07:03 -05:00
30 changed files with 5957 additions and 108 deletions
@@ -20,7 +20,6 @@ package com.seibel.lod.util;
import java.awt.Color;
import java.io.File;
import com.seibel.lod.objects.LodRegion;
import com.seibel.lod.objects.RegionPos;
import net.minecraft.client.Minecraft;
@@ -96,8 +95,8 @@ public class LodUtil
public static RegionPos convertChunkPosToRegionPos(ChunkPos pos)
{
RegionPos rPos = new RegionPos();
rPos.x = pos.x / LodRegion.SIZE;
rPos.z = pos.z / LodRegion.SIZE;
rPos.x = pos.x / 512;
rPos.z = pos.z / 512;
// prevent issues if X/Z is negative and less than 16
if (pos.x < 0)
@@ -109,6 +108,9 @@ public class LodUtil
rPos.z = (Math.abs(rPos.z) * -1) - 1;
}
//rPos.x = (Math.floorDiv(pos.x, (int) (512/Math.pow(LodQuadTreeNode.CHUNK_LEVEL,2))));
//rPos.z = (Math.floorDiv(pos.z, (int) (512/Math.pow(LodQuadTreeNode.CHUNK_LEVEL,2))));
return rPos;
}