33 lines
		
	
	
	
		
			1.5 KiB
			
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			1.5 KiB
			
		
	
	
	
		
			Diff
		
	
	
	
	
	
From 0000000000000000000000000000000000000000 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 | 
						|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
 | 
						|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
 | 
						|
@@ -0,0 +0,0 @@ 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) {
 | 
						|
@@ -0,0 +0,0 @@ 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() {
 |