From ff6da1142675122db93f38c92cddeddf5b8a1f17 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 1 May 2019 06:59:38 +1000 Subject: [PATCH] SPIGOT-4825: Clearly error on asynchronous tile access By: md_5 --- paper-server/nms-patches/World.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/paper-server/nms-patches/World.patch b/paper-server/nms-patches/World.patch index fe43a7511..4bd60fff4 100644 --- a/paper-server/nms-patches/World.patch +++ b/paper-server/nms-patches/World.patch @@ -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)) {