Merge remote-tracking branch 'origin/1.16.5' into 1.16.5
# Conflicts: # src/main/java/com/seibel/lod/objects/SingleLevelContainer.java
This commit is contained in:
@@ -780,8 +780,8 @@ public class LodBufferBuilder
|
||||
{
|
||||
// NOTE: this will display twice because we are double buffering
|
||||
// (using 1 buffer to generate into and one to draw)
|
||||
ClientProxy.LOGGER.info("vbo (" + xVboIndex + "," + zVboIndex + ") expanded: " + bufferPreviousCapacity[xVboIndex][zVboIndex][iVboIndex] + " -> " + (int)(uploadBuffer.capacity() * BUFFER_EXPANSION_MULTIPLIER));
|
||||
bufferPreviousCapacity[xVboIndex][zVboIndex][iVboIndex] = (int) (uploadBuffer.capacity() * BUFFER_EXPANSION_MULTIPLIER);
|
||||
// ClientProxy.LOGGER.info("vbo (" + xVboIndex + "," + zVboIndex + ") expanded: " + bufferPreviousCapacity[xVboIndex][zVboIndex][iVboIndex] + " -> " + (int)(uploadBuffer.capacity() * BUFFER_EXPANSION_MULTIPLIER));
|
||||
// bufferPreviousCapacity[xVboIndex][zVboIndex][iVboIndex] = (int) (uploadBuffer.capacity() * BUFFER_EXPANSION_MULTIPLIER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ import com.seibel.lod.enums.VerticalQuality;
|
||||
import com.seibel.lod.objects.LodDimension;
|
||||
import com.seibel.lod.objects.LodRegion;
|
||||
import com.seibel.lod.objects.LodWorld;
|
||||
import com.seibel.lod.proxy.ClientProxy;
|
||||
import com.seibel.lod.util.ColorUtil;
|
||||
import com.seibel.lod.util.DataPointUtil;
|
||||
import com.seibel.lod.util.DetailDistanceUtil;
|
||||
@@ -55,8 +54,6 @@ import net.minecraft.block.IGrowable;
|
||||
import net.minecraft.block.LeavesBlock;
|
||||
import net.minecraft.block.TallGrassBlock;
|
||||
import net.minecraft.block.material.MaterialColor;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.color.BlockColors;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
@@ -70,14 +67,11 @@ import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.LightType;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.BiomeColors;
|
||||
import net.minecraft.world.chunk.ChunkSection;
|
||||
import net.minecraft.world.chunk.IChunk;
|
||||
import net.minecraft.world.gen.Heightmap;
|
||||
import net.minecraftforge.client.model.data.ModelDataMap;
|
||||
|
||||
import javax.xml.soap.Text;
|
||||
|
||||
/**
|
||||
* This object is in charge of creating Lod related objects. (specifically: Lod
|
||||
* World, Dimension, and Region objects)
|
||||
@@ -584,7 +578,7 @@ public class LodBuilder
|
||||
|
||||
|
||||
// add to the running averages
|
||||
count = colorMultiplier + count; // TODO shouldn't colorMultiplier be multiplied by?
|
||||
count += colorMultiplier;
|
||||
alpha += ColorUtil.getAlpha(color) * colorMultiplier;
|
||||
red += ColorUtil.getBlue(color) * colorMultiplier;
|
||||
green += ColorUtil.getGreen(color) * colorMultiplier;
|
||||
|
||||
@@ -170,7 +170,7 @@ public class LodNodeGenWorker implements IWorker
|
||||
// only generate LodChunks if they can
|
||||
// be added to the current LodDimension
|
||||
|
||||
/* TODO i must disable this if, i will find a way to replace it */
|
||||
/* TODO I must disable this 'if', if I will find a way to replace it */
|
||||
if (lodDim.regionIsInRange(pos.x / LodUtil.REGION_WIDTH_IN_CHUNKS, pos.z / LodUtil.REGION_WIDTH_IN_CHUNKS))
|
||||
{
|
||||
// long startTime = System.currentTimeMillis();
|
||||
@@ -377,7 +377,7 @@ public class LodNodeGenWorker implements IWorker
|
||||
|
||||
lodBuilder.generateLodNodeFromChunk(lodDim, chunk, new LodBuilderConfig(DistanceGenerationMode.SURFACE));
|
||||
|
||||
/**TODO if we want to use Biome utils and terrain utils for overworld
|
||||
/*TODO if we want to use Biome utils and terrain utils for overworld
|
||||
* lodBuilder.generateLodNodeFromChunk(lodDim, pos ,detailLevel, serverWorld.getSeed());*/
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,8 @@ public class PosToRenderContainer
|
||||
private int regionPosZ;
|
||||
private int numberOfPosToRender;
|
||||
private int[] posToRender;
|
||||
/*TODO this population matrix could be converted to boolean to improve memory use*/
|
||||
/*TODO this population matrix could be converted to boolean to improve memory use
|
||||
* no since bools are stored as bytes anyway - cola*/
|
||||
private byte[][] population;
|
||||
|
||||
public PosToRenderContainer(byte minDetail, int regionPosX, int regionPosZ)
|
||||
|
||||
@@ -174,12 +174,7 @@ public class DataPointUtil
|
||||
return (int) (((dataPoint >>> COLOR_SHIFT) & COLOR_MASK) | (((dataPoint >>> (ALPHA_SHIFT - ALPHA_DOWNSIZE_SHIFT)) | 0b1111) << 24));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method apply the lightmap to the color to use
|
||||
* @param dataPoint
|
||||
* @param lightMap
|
||||
* @return
|
||||
*/
|
||||
/** This method apply the lightmap to the color to use */
|
||||
public static int getLightColor(long dataPoint, NativeImage lightMap)
|
||||
{
|
||||
int lightBlock = getLightBlock(dataPoint);
|
||||
@@ -192,43 +187,25 @@ public class DataPointUtil
|
||||
return ColorUtil.multiplyRGBcolors(getColor(dataPoint), ColorUtil.rgbToInt(red, green, blue));
|
||||
}
|
||||
|
||||
/**
|
||||
* This is used to convert a dataPoint to string (useful for the print function)
|
||||
* @param dataPoint
|
||||
* @return
|
||||
*/
|
||||
/** This is used to convert a dataPoint to string (useful for the print function) */
|
||||
public static String toString(long dataPoint)
|
||||
{
|
||||
StringBuilder s = new StringBuilder();
|
||||
s.append(getHeight(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(getDepth(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(getAlpha(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(getRed(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(getBlue(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(getGreen(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(getLightBlock(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(getLightSky(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(getGenerationMode(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(isVoid(dataPoint));
|
||||
s.append(" ");
|
||||
s.append(doesItExist(dataPoint));
|
||||
s.append('\n');
|
||||
return s.toString();
|
||||
return getHeight(dataPoint) + " " +
|
||||
getDepth(dataPoint) + " " +
|
||||
getAlpha(dataPoint) + " " +
|
||||
getRed(dataPoint) + " " +
|
||||
getBlue(dataPoint) + " " +
|
||||
getGreen(dataPoint) + " " +
|
||||
getLightBlock(dataPoint) + " " +
|
||||
getLightSky(dataPoint) + " " +
|
||||
getGenerationMode(dataPoint) + " " +
|
||||
isVoid(dataPoint) + " " +
|
||||
doesItExist(dataPoint) + '\n';
|
||||
}
|
||||
|
||||
/**
|
||||
* This method merge column of single data together
|
||||
* @param dataToMerge
|
||||
* @return
|
||||
* @deprecated
|
||||
*/
|
||||
public static long mergeSingleData(long[] dataToMerge)
|
||||
{
|
||||
@@ -318,10 +295,10 @@ public class DataPointUtil
|
||||
|
||||
/**
|
||||
* This method merge column of multiple data together
|
||||
* @param dataToMerge
|
||||
* @param dataToMerge one or more columns of data
|
||||
* @param inputVerticalData vertical size of an input data
|
||||
* @param maxVerticalData max vertical size of the merged data
|
||||
* @return
|
||||
* @return 1 column of correctly parsed data
|
||||
*/
|
||||
public static long[] mergeMultiData(long[] dataToMerge, int inputVerticalData, int maxVerticalData)
|
||||
{
|
||||
|
||||
@@ -402,8 +402,8 @@ public class LodUtil
|
||||
|
||||
case DYNAMIC:
|
||||
// only skip positions that are greater than
|
||||
// half the render distance
|
||||
skipRadius = (int) Math.ceil(chunkRenderDist * 4 / 5);
|
||||
// 4/5ths the render distance
|
||||
skipRadius = (int) Math.ceil(chunkRenderDist * (4.0 / 5.0));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user