Prevent NoClassDefError crash and notify on crash
By: David <dmck2b@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
public interface NeighborUpdater {
|
||||
|
||||
@@ -50,6 +56,17 @@
|
||||
@@ -50,7 +56,22 @@
|
||||
|
||||
static void executeUpdate(Level world, BlockState state, BlockPos pos, Block sourceBlock, @Nullable Orientation orientation, boolean notify) {
|
||||
try {
|
||||
@@ -34,5 +34,10 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
state.handleNeighborChanged(world, pos, sourceBlock, orientation, notify);
|
||||
+ // Spigot Start
|
||||
+ } catch (StackOverflowError ex) {
|
||||
+ world.lastPhysicsProblem = new BlockPos(pos);
|
||||
+ // Spigot End
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception while updating neighbours");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Block being updated");
|
||||
|
||||
Reference in New Issue
Block a user