geforkt von Mirrors/Paper
276afaa2ea
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: c2d72c82 SPIGOT-3102: Add EXPLOSION SpawnReason CraftBukkit Changes:fca41573
SPIGOT-5136: EntityPortalEvent getting called on interdimensional entity teleports604c8bf0
SPIGOT-3102: Add EXPLOSION SpawnReason375969a6
Re-add chunk GC for plugin chunk loads58151368
SPIGOT-5123: Snapshot tile entities can end up with a non-null world491c8482
SPIGOT-5130: PersistentDataContainer not removing values on TileEntities Spigot Changes: d05d3c1f Rebuild patches
38 Zeilen
1.5 KiB
Diff
38 Zeilen
1.5 KiB
Diff
From e18d697a9b1acbef9dcdd703f013680aed93e13f 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 f6401e2cde..3e22d558ea 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
|
@@ -19,6 +19,8 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
|
public CraftBlockEntityState(Block block, Class<T> tileEntityClass) {
|
|
super(block);
|
|
|
|
+ try {// Paper - show location on failure
|
|
+
|
|
this.tileEntityClass = tileEntityClass;
|
|
|
|
// get tile entity from block:
|
|
@@ -38,6 +40,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 BlockState at: world: " + block.getWorld().getName() + " location: (" + block.getX() + ", " + block.getY() + ", " + block.getZ() + ")", thr);
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
|
|
public final boolean snapshotDisabled; // Paper
|
|
--
|
|
2.22.0
|
|
|