mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-26 11:07:53 +01:00
Fixed ArrayIndexOutOfBoundsException when placing or breaking a block close to max / min InstanceContainer height (#569)
This commit is contained in:
parent
627bc14b56
commit
dcc079ed9c
@ -493,6 +493,8 @@ public class InstanceContainer extends Instance {
|
||||
final int neighborX = blockPosition.blockX() + offsetX;
|
||||
final int neighborY = blockPosition.blockY() + offsetY;
|
||||
final int neighborZ = blockPosition.blockZ() + offsetZ;
|
||||
if (neighborY < getDimensionType().getMinY() || neighborY > getDimensionType().getTotalHeight())
|
||||
continue;
|
||||
final Chunk chunk = getChunkAt(neighborX, neighborZ);
|
||||
if (chunk == null) continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user