Replaced hardcoded chunk section out of bounds check (#3136)

This commit is contained in:
RK_01 2022-10-07 23:07:50 +02:00 committed by GitHub
parent 7698ee7683
commit 464a85c52b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -382,7 +382,7 @@ public class WorldPackets {
neighbourY = 15;
}
if (ySection == 16 || ySection == -1) continue;
if (ySection == chunk.getSections().length || ySection == -1) continue;
ChunkSection newSection = chunk.getSections()[ySection];
if (newSection == null) continue;