removed commented and now unused code

This commit is contained in:
cola98765
2021-09-19 16:25:53 +02:00
parent 1d687fd1d4
commit c67a5a5e29
2 changed files with 0 additions and 81 deletions
@@ -278,7 +278,6 @@ public class DataPointUtil
public static long[] mergeMultiData(long[][] dataToMerge)
{
//new code
short[] projection = ThreadMapUtil.getProjectionShort((WORLD_HEIGHT + 1) / 16);
short[][] heightAndDepth = ThreadMapUtil.getHeightAndDepth((WORLD_HEIGHT / 2) + 1);
long[] singleDataToMerge = ThreadMapUtil.getSingleAddDataToMerge(dataToMerge.length);
@@ -314,7 +313,6 @@ public class DataPointUtil
}
}
//We check if there is any data that's not empty or void
if (allEmpty)
return new long[]{EMPTY_DATA};
@@ -357,74 +355,6 @@ public class DataPointUtil
heightAndDepth[count][1] = height;
count++;
}
//old code
/*boolean[] projection = ThreadMapUtil.getProjection(WORLD_HEIGHT + 1);
short[][] heightAndDepth = ThreadMapUtil.getHeightAndDepth((WORLD_HEIGHT / 2) + 1);
long[] singleDataToMerge = ThreadMapUtil.getSingleAddDataToMerge(dataToMerge.length);
int genMode = DistanceGenerationMode.SERVER.complexity;
boolean allEmpty = true;
boolean allVoid = true;
long singleData;
for(int k=0; k < projection.length; k++)
projection[k] = false;
short depth = 0;
short height = 0;
//We collect the indexes of the data, ordered by the depth
for (int index = 0; index < dataToMerge.length; index++)
{
for (int dataIndex = 0; dataIndex < dataToMerge[index].length; dataIndex++)
{
singleData = dataToMerge[index][dataIndex];
if (doesItExist(singleData))
{
genMode = Math.min(genMode, getGenerationMode(singleData));
allEmpty = false;
if (!isItVoid(singleData))
{
allVoid = false;
depth = getDepth(singleData);
height = getHeight(singleData);
for (int y = depth; y <= height; y++)
{
projection[y] = true;
}
}
}
}
}
//We check if there is any data that's not empty or void
if (allEmpty)
{
return new long[]{EMPTY_DATA};
}
if (allVoid)
{
return new long[]{createVoidDataPoint(genMode)};
}
int count = 0;
int i = 0;
while (i < projection.length)
{
while (i < projection.length && !projection[i])
{
i++;
}
depth = (short) i;
while (i < projection.length && projection[i])
{
height = (short) i;
i++;
}
if(!(i < projection.length))
break;
heightAndDepth[count][0] = depth;
heightAndDepth[count][1] = height;
count++;
}*/
//end of changes
//As standard the vertical lods are ordered from top to bottom
long[] dataPoint = new long[count];
@@ -20,7 +20,6 @@ public class ThreadMapUtil
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, short[][]> heightAndDepthMap = new ConcurrentHashMap<>();
public static final ConcurrentMap<String, long[]> singleDataToMergeMap = new ConcurrentHashMap<>();
@@ -116,16 +115,6 @@ public class ThreadMapUtil
return threadVerticalIndexesMap.get(Thread.currentThread().getName());
}
public static boolean[] getProjection(int size){
if(!projectionMap.containsKey(Thread.currentThread().getName()) || (projectionMap.get(Thread.currentThread().getName()) == null) || (projectionMap.get(Thread.currentThread().getName()).length != size))
{
projectionMap.put(Thread.currentThread().getName(), new boolean[size]);
}
return projectionMap.get(Thread.currentThread().getName());
}
public static short[] getProjectionShort(int size){
if(!projectionShortMap.containsKey(Thread.currentThread().getName()) || (projectionShortMap.get(Thread.currentThread().getName()) == null) || (projectionShortMap.get(Thread.currentThread().getName()).length != size))
{