aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0330-Show-blockstate-location-if-we-failed-to-read-it.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2022-09-01 09:51:59 -0700
committerGitHub <[email protected]>2022-09-01 09:51:59 -0700
commit046466f3ba72d6bdaa0213cde64676dd0024ace0 (patch)
tree717d69c8521cac0e4881c009e636891e116c2378 /patches/server/0330-Show-blockstate-location-if-we-failed-to-read-it.patch
parenteff22eb0541559f05cf9a8c370d70c3b346f80f6 (diff)
downloadPaper-046466f3ba72d6bdaa0213cde64676dd0024ace0.tar.gz
Paper-046466f3ba72d6bdaa0213cde64676dd0024ace0.zip
Re-arrange most chunk system patches to front (#8338)
* Re-arrange most chunk system patches to front Co-authored-by: Spottedleaf <[email protected]>
Diffstat (limited to 'patches/server/0330-Show-blockstate-location-if-we-failed-to-read-it.patch')
-rw-r--r--patches/server/0330-Show-blockstate-location-if-we-failed-to-read-it.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/patches/server/0330-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0330-Show-blockstate-location-if-we-failed-to-read-it.patch
new file mode 100644
index 0000000000..f593178909
--- /dev/null
+++ b/patches/server/0330-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 a76cce199acdcecfdd8b998ec08974c2ed0751cf..87c25170fbe8b0591d452612496ee1a627138de7 100644
+--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+@@ -18,6 +18,7 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
+
+ this.tileEntity = tileEntity;
+
++ try { // Paper - show location on failure
+ // Paper start
+ this.snapshotDisabled = DISABLE_SNAPSHOT;
+ if (DISABLE_SNAPSHOT) {
+@@ -30,6 +31,14 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
+ this.load(this.snapshot);
+ }
+ // Paper end
++ // Paper start - show location on failure
++ } 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
+ }
+
+ public void refreshSnapshot() {