attempt to fix generation below y=0

This commit is contained in:
cola98765
2021-12-12 00:16:41 +01:00
parent df28d2dc9d
commit 4dd51022fa
@@ -88,6 +88,7 @@ public class ChunkWrapper implements IChunkWrapper
@Override
public IBlockShapeWrapper getBlockShapeWrapper(int x, int y, int z)
{
if (y < 0) y = 0; //TODO replace with value from version specific constants
Block block = chunk.getSections()[y >> CHUNK_SECTION_SHIFT].getBlockState(x & CHUNK_SIZE_MASK, y & CHUNK_SECTION_MASK, z & CHUNK_SIZE_MASK).getBlock();
return BlockShapeWrapper.getBlockShapeWrapper(block, this, x, y, z);
}