mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 08:27:43 +01:00
exception when the chunk is not loaded in Instance#setBlock
This commit is contained in:
parent
e96aebaaba
commit
271b56aa4c
@ -108,6 +108,7 @@ public class InstanceContainer extends Instance {
|
|||||||
|
|
||||||
private synchronized void setBlock(int x, int y, int z, short blockStateId, CustomBlock customBlock, Data data) {
|
private synchronized void setBlock(int x, int y, int z, short blockStateId, CustomBlock customBlock, Data data) {
|
||||||
final Chunk chunk = getChunkAt(x, z);
|
final Chunk chunk = getChunkAt(x, z);
|
||||||
|
Check.stateCondition(!ChunkUtils.isLoaded(chunk), "The chunk at " + x + " : " + z + " is not loaded!");
|
||||||
synchronized (chunk) {
|
synchronized (chunk) {
|
||||||
|
|
||||||
final boolean isCustomBlock = customBlock != null;
|
final boolean isCustomBlock = customBlock != null;
|
||||||
|
Loading…
Reference in New Issue
Block a user