diff --git a/Spigot-Server-Patches/0403-Show-blockstate-location-if-we-failed-to-read-it.patch b/Spigot-Server-Patches/0403-Show-blockstate-location-if-we-failed-to-read-it.patch new file mode 100644 index 0000000000..4e6c0af44c --- /dev/null +++ b/Spigot-Server-Patches/0403-Show-blockstate-location-if-we-failed-to-read-it.patch @@ -0,0 +1,35 @@ +From ad642b8a96422599dca0f13e71a00938419c6c86 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +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 7cb4c3e503..ae60e037a5 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +@@ -20,6 +20,8 @@ public class CraftBlockEntityState extends CraftBlockState + public CraftBlockEntityState(Block block, Class tileEntityClass) { + super(block); + ++ try {// Paper - show location on failure ++ + this.tileEntityClass = tileEntityClass; + + // get tile entity from block: +@@ -39,6 +41,12 @@ public class CraftBlockEntityState extends CraftBlockState + this.load(this.snapshot); + } + // Paper end ++ } catch (Throwable thr) { ++ if (thr instanceof ThreadDeath) { ++ throw (ThreadDeath)thr; ++ } ++ throw new RuntimeException("Failed to read block state at location: (" + block.getX() + ", " + block.getY() + ", " + block.getZ() + ")", thr); ++ } + } + + public final boolean snapshotDisabled; // Paper +-- +2.21.0 +