Proper paper commenting
This commit is contained in:
parent
61a6d011d9
commit
9a5ec7f21d
1 changed files with 5 additions and 3 deletions
|
@ -1,11 +1,11 @@
|
|||
From ad642b8a96422599dca0f13e71a00938419c6c86 Mon Sep 17 00:00:00 2001
|
||||
From dd703d1aa219e991a2d305e780ed3fba30c12049 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
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
|
||||
index 7cb4c3e503..c3405950d8 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<T extends TileEntity> extends CraftBlockState
|
||||
|
@ -17,16 +17,18 @@ index 7cb4c3e503..ae60e037a5 100644
|
|||
this.tileEntityClass = tileEntityClass;
|
||||
|
||||
// get tile entity from block:
|
||||
@@ -39,6 +41,12 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||
@@ -39,6 +41,14 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||
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 block state at location: (" + block.getX() + ", " + block.getY() + ", " + block.getZ() + ")", thr);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public final boolean snapshotDisabled; // Paper
|
||||
|
|
Loading…
Reference in a new issue