mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
SPIGOT-4825: Clearly error on asynchronous tile access
By: md_5 <git@md-5.net>
This commit is contained in:
parent
1596138194
commit
ff6da11426
@ -312,7 +312,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -626,6 +838,7 @@
|
||||
@@ -626,14 +838,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -320,9 +320,11 @@
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity getTileEntity(BlockPosition blockposition) {
|
||||
@@ -634,6 +847,12 @@
|
||||
} else if (!this.isClientSide && Thread.currentThread() != this.c) {
|
||||
if (isInsideWorld(blockposition)) {
|
||||
return null;
|
||||
} else if (!this.isClientSide && Thread.currentThread() != this.c) {
|
||||
- return null;
|
||||
+ throw new IllegalStateException("Asynchronous tile access"); // CraftBukkit - catch
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ if (capturedTileEntities.containsKey(blockposition)) {
|
||||
|
Loading…
Reference in New Issue
Block a user