mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 22:14:40 +01:00
SPIGOT-4825: Clearly error on asynchronous tile access
This commit is contained in:
parent
bbd66d2046
commit
5a37f43059
1 changed files with 5 additions and 3 deletions
|
@ -312,7 +312,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -626,6 +838,7 @@
|
@@ -626,14 +838,21 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,9 +320,11 @@
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public TileEntity getTileEntity(BlockPosition blockposition) {
|
public TileEntity getTileEntity(BlockPosition blockposition) {
|
||||||
@@ -634,6 +847,12 @@
|
if (isInsideWorld(blockposition)) {
|
||||||
} else if (!this.isClientSide && Thread.currentThread() != this.c) {
|
|
||||||
return null;
|
return null;
|
||||||
|
} else if (!this.isClientSide && Thread.currentThread() != this.c) {
|
||||||
|
- return null;
|
||||||
|
+ throw new IllegalStateException("Asynchronous tile access"); // CraftBukkit - catch
|
||||||
} else {
|
} else {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ if (capturedTileEntities.containsKey(blockposition)) {
|
+ if (capturedTileEntities.containsKey(blockposition)) {
|
||||||
|
|
Loading…
Reference in a new issue