mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
Show blockstate location if we failed to read it
This commit is contained in:
parent
3084b4ce9b
commit
dee5102404
@ -32,6 +32,7 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
|||||||
|
|
||||||
this.tileEntity = tileEntity;
|
this.tileEntity = tileEntity;
|
||||||
|
|
||||||
|
try { // Paper - Show blockstate location if we failed to read it
|
||||||
// Paper start
|
// Paper start
|
||||||
this.snapshotDisabled = DISABLE_SNAPSHOT;
|
this.snapshotDisabled = DISABLE_SNAPSHOT;
|
||||||
if (DISABLE_SNAPSHOT) {
|
if (DISABLE_SNAPSHOT) {
|
||||||
@ -44,6 +45,14 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
|||||||
this.load(this.snapshot);
|
this.load(this.snapshot);
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
// Paper start - Show blockstate location if we failed to read it
|
||||||
|
} 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 - Show blockstate location if we failed to read it
|
||||||
}
|
}
|
||||||
|
|
||||||
protected CraftBlockEntityState(CraftBlockEntityState<T> state, Location location) {
|
protected CraftBlockEntityState(CraftBlockEntityState<T> state, Location location) {
|
||||||
|
Loading…
Reference in New Issue
Block a user