diff options
Diffstat (limited to 'patches/server/0291-Show-blockstate-location-if-we-failed-to-read-it.patch')
-rw-r--r-- | patches/server/0291-Show-blockstate-location-if-we-failed-to-read-it.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/server/0291-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0291-Show-blockstate-location-if-we-failed-to-read-it.patch new file mode 100644 index 0000000000..c12cf5a95d --- /dev/null +++ b/patches/server/0291-Show-blockstate-location-if-we-failed-to-read-it.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf <[email protected]> +Date: Sat, 15 Jun 2019 10:28:25 -0700 +Subject: [PATCH] Show blockstate location if we failed to read it + + +diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +index 1ca25dfdb9ec5c3a4d26b71484e1326e1f50b40d..302955eed07d3af91f90875583c70a236bbe11b2 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +@@ -32,6 +32,7 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat + + this.tileEntity = tileEntity; + ++ try { // Paper - Show blockstate location if we failed to read it + // Paper start + this.snapshotDisabled = DISABLE_SNAPSHOT; + if (DISABLE_SNAPSHOT) { +@@ -44,6 +45,14 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat + this.load(this.snapshot); + } + // Paper end ++ // Paper start - Show blockstate location if we failed to read it ++ } catch (Throwable thr) { ++ if (thr instanceof ThreadDeath) { ++ throw (ThreadDeath)thr; ++ } ++ throw new RuntimeException("Failed to read BlockState at: world: " + this.getWorld().getName() + " location: (" + this.getX() + ", " + this.getY() + ", " + this.getZ() + ")", thr); ++ } ++ // Paper end - Show blockstate location if we failed to read it + } + + protected CraftBlockEntityState(CraftBlockEntityState<T> state, Location location) { |