Merge branch '1.16.5' of gitlab.com:jeseibel/minecraft-lod-mod into 1.16.5
This commit is contained in:
@@ -364,15 +364,13 @@ public class LodBufferBuilder
|
||||
{
|
||||
//Other wise we check if this position is
|
||||
data = lodDim.getSingleData(detailLevel, xAdj, zAdj);
|
||||
adjShadeDisabled[Box.DIRECTION_INDEX.get(direction)] = DataPointUtil.getAlpha(data) < 255;
|
||||
adjData.get(direction)[0] = DataPointUtil.EMPTY_DATA;
|
||||
|
||||
/*if (isThisPositionGoingToBeRendered(detailLevel, xAdj, zAdj, playerChunkPos, vanillaRenderedChunks, gameChunkRenderDistance)
|
||||
if (isThisPositionGoingToBeRendered(detailLevel, xAdj, zAdj, playerChunkPos, vanillaRenderedChunks, gameChunkRenderDistance)
|
||||
&& !DataPointUtil.isVoid(data))
|
||||
{
|
||||
adjShadeDisabled[Box.DIRECTION_INDEX.get(direction)] = DataPointUtil.getAlpha(data) < 255;
|
||||
adjData.get(direction)[0] = DataPointUtil.EMPTY_DATA;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -825,20 +825,20 @@ public class LodBuilder
|
||||
{
|
||||
if (nonFullAvoidance)
|
||||
{
|
||||
if(!blockState.getFluidState().isEmpty() || blockState.getBlock() instanceof SixWayBlock)
|
||||
{
|
||||
notFullBlock.put(blockState.getBlock(), false);
|
||||
}
|
||||
if (!notFullBlock.containsKey(blockState.getBlock()) || notFullBlock.get(blockState.getBlock()) == null)
|
||||
{
|
||||
VoxelShape voxelShape = blockState.getShape(chunk, blockPos);
|
||||
if (!blockState.getFluidState().isEmpty())
|
||||
{
|
||||
notFullBlock.put(blockState.getBlock(), false);
|
||||
}
|
||||
VoxelShape voxelShape = blockState.getBlock().defaultBlockState().getShape(chunk, blockPos);
|
||||
|
||||
if (!voxelShape.isEmpty())
|
||||
{
|
||||
AxisAlignedBB bbox = voxelShape.bounds();
|
||||
int xWidth = (int) (bbox.maxX - bbox.minX);
|
||||
int yWidth = (int) (bbox.maxY - bbox.minY);
|
||||
int zWidth = (int) (bbox.maxZ - bbox.minZ);
|
||||
double xWidth = (bbox.maxX - bbox.minX);
|
||||
double yWidth = (bbox.maxY - bbox.minY);
|
||||
double zWidth = (bbox.maxZ - bbox.minZ);
|
||||
if (xWidth < 1 && zWidth < 1 && yWidth < 1)
|
||||
notFullBlock.put(blockState.getBlock(), true);
|
||||
else
|
||||
@@ -851,17 +851,18 @@ public class LodBuilder
|
||||
}
|
||||
|
||||
if (notFullBlock.get(blockState.getBlock()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (noCollisionAvoidance)
|
||||
{
|
||||
if(!blockState.getFluidState().isEmpty() || blockState.getBlock() instanceof SixWayBlock)
|
||||
smallBlock.put(blockState.getBlock(), false);
|
||||
|
||||
if (!smallBlock.containsKey(blockState.getBlock()) || smallBlock.get(blockState.getBlock()) == null)
|
||||
{
|
||||
|
||||
if(!blockState.getFluidState().isEmpty())
|
||||
smallBlock.put(blockState.getBlock(), false);
|
||||
|
||||
VoxelShape voxelShape = blockState.getCollisionShape(chunk, blockPos);
|
||||
if (!blockState.getFluidState().isEmpty())
|
||||
{
|
||||
@@ -873,15 +874,6 @@ public class LodBuilder
|
||||
if (voxelShape.isEmpty())
|
||||
{
|
||||
smallBlock.put(blockState.getBlock(), true);
|
||||
/*AxisAlignedBB bbox = voxelShape.bounds();
|
||||
int xWidth = (int) (bbox.maxX - bbox.minX);
|
||||
int yWidth = (int) (bbox.maxY - bbox.minY);
|
||||
int zWidth = (int) (bbox.maxZ - bbox.minZ);
|
||||
|
||||
if (xWidth < 0.7 && zWidth < 0.7 && yWidth < 0.7)
|
||||
smallBlock.put(blockState.getBlock(), true);
|
||||
else
|
||||
smallBlock.put(blockState.getBlock(), false);*/
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -891,7 +883,9 @@ public class LodBuilder
|
||||
}
|
||||
|
||||
if (smallBlock.get(blockState.getBlock()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ public class DataPointUtil
|
||||
|
||||
public static short getAlpha(long dataPoint)
|
||||
{
|
||||
return (short) (((dataPoint >>> ALPHA_SHIFT) & ALPHA_MASK) << ALPHA_DOWNSIZE_SHIFT);
|
||||
return (short) ((((dataPoint >>> ALPHA_SHIFT) & ALPHA_MASK) << ALPHA_DOWNSIZE_SHIFT) | 0b1111);
|
||||
}
|
||||
|
||||
public static short getRed(long dataPoint)
|
||||
@@ -212,7 +212,7 @@ public class DataPointUtil
|
||||
|
||||
public static int getColor(long dataPoint)
|
||||
{
|
||||
return (int) (((dataPoint >>> COLOR_SHIFT) & COLOR_MASK) | (((dataPoint >>> (ALPHA_SHIFT - ALPHA_DOWNSIZE_SHIFT)) | 0b1111) << 24));
|
||||
return (int) (((dataPoint >>> COLOR_SHIFT) & COLOR_MASK) | (/*((dataPoint >>> (ALPHA_SHIFT - ALPHA_DOWNSIZE_SHIFT)) | 0b1111)*/255 << 24));
|
||||
}
|
||||
|
||||
/** This method apply the lightmap to the color to use */
|
||||
|
||||
Reference in New Issue
Block a user