mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-27 03:27:56 +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 neighborX = blockPosition.blockX() + offsetX;
|
||||||
final int neighborY = blockPosition.blockY() + offsetY;
|
final int neighborY = blockPosition.blockY() + offsetY;
|
||||||
final int neighborZ = blockPosition.blockZ() + offsetZ;
|
final int neighborZ = blockPosition.blockZ() + offsetZ;
|
||||||
|
if (neighborY < getDimensionType().getMinY() || neighborY > getDimensionType().getTotalHeight())
|
||||||
|
continue;
|
||||||
final Chunk chunk = getChunkAt(neighborX, neighborZ);
|
final Chunk chunk = getChunkAt(neighborX, neighborZ);
|
||||||
if (chunk == null) continue;
|
if (chunk == null) continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user