fix chunk y rendering
This commit is contained in:
parent
26c71df542
commit
5e2b36dc82
1 changed files with 19 additions and 0 deletions
|
@ -752,6 +752,7 @@ public class RenderGlobal
|
||||||
double d0 = viewEntity.posX - this.frustumUpdatePosX;
|
double d0 = viewEntity.posX - this.frustumUpdatePosX;
|
||||||
double d1 = viewEntity.posY - this.frustumUpdatePosY;
|
double d1 = viewEntity.posY - this.frustumUpdatePosY;
|
||||||
double d2 = viewEntity.posZ - this.frustumUpdatePosZ;
|
double d2 = viewEntity.posZ - this.frustumUpdatePosZ;
|
||||||
|
int prev = this.frustumUpdatePosChunkY;
|
||||||
|
|
||||||
if (this.frustumUpdatePosChunkX != viewEntity.chunkCoordX || this.frustumUpdatePosChunkY != viewEntity.chunkCoordY || this.frustumUpdatePosChunkZ != viewEntity.chunkCoordZ || d0 * d0 + d1 * d1 + d2 * d2 > 16.0D)
|
if (this.frustumUpdatePosChunkX != viewEntity.chunkCoordX || this.frustumUpdatePosChunkY != viewEntity.chunkCoordY || this.frustumUpdatePosChunkZ != viewEntity.chunkCoordZ || d0 * d0 + d1 * d1 + d2 * d2 > 16.0D)
|
||||||
{
|
{
|
||||||
|
@ -904,6 +905,24 @@ public class RenderGlobal
|
||||||
}
|
}
|
||||||
|
|
||||||
this.chunksToUpdate.addAll(set);
|
this.chunksToUpdate.addAll(set);
|
||||||
|
|
||||||
|
if(prev != Integer.MIN_VALUE && viewEntity.chunkCoordY != prev) {
|
||||||
|
for (int j = -this.renderDistanceChunks; j <= this.renderDistanceChunks; ++j)
|
||||||
|
{
|
||||||
|
for (int k = -this.renderDistanceChunks; k <= this.renderDistanceChunks; ++k)
|
||||||
|
{
|
||||||
|
for (int i = -this.renderDistanceChunks; i <= this.renderDistanceChunks; ++i)
|
||||||
|
{
|
||||||
|
RenderChunk renderchunk1 = this.viewFrustum.getRenderChunk(new BlockPos((j << 4) + 8, (i << 4) + 8, (k << 4) + 8));
|
||||||
|
|
||||||
|
if (renderchunk1 != null)
|
||||||
|
{
|
||||||
|
renderchunk1.setNeedsUpdate(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isPositionInRenderChunk(BlockPos pos, RenderChunk renderChunkIn)
|
private boolean isPositionInRenderChunk(BlockPos pos, RenderChunk renderChunkIn)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue