Fix chunkwrapper null pointer

This commit is contained in:
James Seibel
2023-10-19 07:27:31 -05:00
parent 97e6797fea
commit 1932cf9e76
@@ -169,8 +169,13 @@ public class ChunkWrapper implements IChunkWrapper
LevelChunkSection[] sections = this.chunk.getSections();
for (int index = 0; index < sections.length; index++)
{
if (sections[index] == null)
{
continue;
}
#if MC_1_16_5
if (sections[index] != null && !sections[index].isEmpty())
if (!sections[index].isEmpty())
{
// convert from an index to a block coordinate
return this.chunk.getSections()[index].bottomBlockY() * 16;