Merge branch '1.16.5' of https://gitlab.com/jeseibel/minecraft-lod-mod into vertical_merging
Conflicts: src/main/java/com/seibel/lod/util/ThreadMapUtil.java
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
package com.seibel.lod.util;
|
||||
|
||||
import com.seibel.lod.enums.DistanceGenerationMode;
|
||||
import com.seibel.lod.wrappers.MinecraftWrapper;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import net.minecraft.client.renderer.texture.NativeImage;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.lang.annotation.Native;
|
||||
import net.minecraft.client.renderer.texture.NativeImage;
|
||||
|
||||
public class DataPointUtil
|
||||
{
|
||||
@@ -171,8 +167,8 @@ public class DataPointUtil
|
||||
|
||||
public static int getColor(long dataPoint)
|
||||
{
|
||||
int color = getBlue(dataPoint) << BLUE_COLOR_SHIFT;
|
||||
color += getRed(dataPoint) << BLUE_COLOR_SHIFT;
|
||||
//int color = getBlue(dataPoint) << BLUE_COLOR_SHIFT;
|
||||
//color += getRed(dataPoint) << BLUE_COLOR_SHIFT;
|
||||
return (int) (dataPoint >>> COLOR_SHIFT);
|
||||
}
|
||||
|
||||
@@ -220,7 +216,6 @@ public class DataPointUtil
|
||||
public static long mergeSingleData(long[] dataToMerge)
|
||||
{
|
||||
int numberOfChildren = 0;
|
||||
int numberOfVoidChildren = 0;
|
||||
|
||||
int tempAlpha = 0;
|
||||
int tempRed = 0;
|
||||
@@ -281,7 +276,7 @@ public class DataPointUtil
|
||||
}
|
||||
}
|
||||
|
||||
public static long[] mergeVerticalData(long[][] dataToMerge)
|
||||
public static long[] mergeMultiData(long[][] dataToMerge)
|
||||
{
|
||||
//new code
|
||||
short[] projection = ThreadMapUtil.getProjectionShort((WORLD_HEIGHT + 1 ) >>> 4);
|
||||
|
||||
@@ -160,9 +160,9 @@ public class DetailDistanceUtil
|
||||
|
||||
public static byte getLodDrawDetail(int detail)
|
||||
{
|
||||
if (detail < minGenDetail)
|
||||
if (detail < minDrawDetail)
|
||||
{
|
||||
return lodGenDetails[minGenDetail].detailLevel;
|
||||
return lodGenDetails[minDrawDetail].detailLevel;
|
||||
} else
|
||||
{
|
||||
return lodGenDetails[detail].detailLevel;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.seibel.lod.util;
|
||||
|
||||
import com.seibel.lod.util.LodUtil;
|
||||
|
||||
public class LevelPosUtil
|
||||
{
|
||||
public static int[] convert(int[] levelPos, byte newDetailLevel)
|
||||
|
||||
@@ -25,10 +25,9 @@ import com.seibel.lod.objects.LodDimension;
|
||||
import com.seibel.lod.objects.RegionPos;
|
||||
import com.seibel.lod.wrappers.MinecraftWrapper;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.ObjectList;
|
||||
import net.minecraft.client.multiplayer.ServerData;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.WorldRenderer.LocalRenderInformationContainer;
|
||||
import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher.CompiledChunk;
|
||||
import net.minecraft.server.integrated.IntegratedServer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
@@ -375,12 +374,12 @@ public class LodUtil
|
||||
|
||||
// go through every RenderInfo to get the compiled chunks
|
||||
WorldRenderer renderer = mc.getLevelRenderer();
|
||||
ObjectList<LocalRenderInformationContainer> chunks = renderer.renderChunks;
|
||||
for (WorldRenderer.LocalRenderInformationContainer worldrenderer$localrenderinformationcontainer : chunks)
|
||||
for (WorldRenderer.LocalRenderInformationContainer worldrenderer$localrenderinformationcontainer : renderer.renderChunks)
|
||||
{
|
||||
if (!worldrenderer$localrenderinformationcontainer.chunk.getCompiledChunk().hasNoRenderableLayers())
|
||||
CompiledChunk compiledChunk = worldrenderer$localrenderinformationcontainer.chunk.getCompiledChunk();
|
||||
if (!compiledChunk.hasNoRenderableLayers())
|
||||
{
|
||||
// add the ChunkPos for every empty compiled chunk
|
||||
// add the ChunkPos for every rendered chunk
|
||||
BlockPos bpos = worldrenderer$localrenderinformationcontainer.chunk.getOrigin();
|
||||
|
||||
loadedPos.add(new ChunkPos(bpos));
|
||||
|
||||
@@ -7,23 +7,23 @@ public class ThreadMapUtil
|
||||
{
|
||||
private static final int NUMBER_OF_DIRECTION = 4;
|
||||
|
||||
public static final ConcurrentMap<String, long[]> threadSingleAddDataMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[]> threadSingleGetDataMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[]> threadSingleUpdateMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[][]> threadBuilderArrayMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[][][]> threadBuilderVerticalArrayMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[]> threadVerticalAddDataMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[]> threadVerticalGetDataMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[][]> threadVerticalUpdateMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, int[]> threadVerticalIndexesMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[]> threadSingleAddDataMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, long[]> threadSingleGetDataMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, long[]> threadSingleUpdateMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, long[][]> threadBuilderArrayMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, long[][][]> threadBuilderVerticalArrayMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, long[]> threadVerticalAddDataMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, long[]> threadVerticalGetDataMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, long[][]> threadVerticalUpdateMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, int[]> threadVerticalIndexesMap = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
public static final ConcurrentMap<String, long[]> threadAdjData = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[]> threadAdjData = new ConcurrentHashMap<>();
|
||||
|
||||
public static final ConcurrentMap<String, boolean[]> projectionMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, short[]> projectionShortMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, int[][]> heightAndDepthMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, long[]> singleDataToMergeMap = new ConcurrentHashMap();
|
||||
public static final ConcurrentMap<String, boolean[]> projectionMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, short[]> projectionShortMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, int[][]> heightAndDepthMap = new ConcurrentHashMap<>();
|
||||
public static final ConcurrentMap<String, long[]> singleDataToMergeMap = new ConcurrentHashMap<>();
|
||||
|
||||
|
||||
public static long[] getSingleAddDataArray()
|
||||
|
||||
Reference in New Issue
Block a user