mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
9bafd0634e
At the time this was re-added, there was concern around how the JIT would handle the system property that enabled it. This shouldn't be a problem, and as such we no longer need to block access to it. The Vanilla Method Profiler will not provide much to most users however there is no harm in providing it as an option. For most users, the recommended and supported method for determining performance issues with Paper will continue to be Timings.
40 lines
No EOL
1.7 KiB
Diff
40 lines
No EOL
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Riley Park <rileysebastianpark@gmail.com>
|
|
Date: Mon, 18 Sep 2017 13:38:40 -0700
|
|
Subject: [PATCH] Avoid NPE during CraftBlockEntityState load
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
|
|
index 54b719d9..3f2c5b2d 100644
|
|
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
|
|
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
|
|
@@ -0,0 +0,0 @@ public class TileEntitySign extends TileEntity {
|
|
}
|
|
|
|
public MinecraftServer C_() {
|
|
- return TileEntitySign.this.world.getMinecraftServer();
|
|
+ return MinecraftServer.getServer(); // Paper - world may be null
|
|
}
|
|
};
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
|
index 266f87d7..22dcaea7 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 TileEntity> extends CraftBlockState
|
|
|
|
// copy tile entity data:
|
|
this.snapshot = this.createSnapshot(tileEntity);
|
|
+ if(this.snapshot != null) // Paper - avoid NPE during load
|
|
this.load(snapshot);
|
|
}
|
|
|
|
@@ -0,0 +0,0 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
|
|
|
// copy tile entity data:
|
|
this.snapshot = this.createSnapshot(tileEntity);
|
|
+ if(this.snapshot != null) // Paper - avoid NPE during load
|
|
this.load(snapshot);
|
|
}
|
|
|
|
--
|