Update from upstream SpigotMC
Fix Corrupted Trapped Chests SpigotMC/Spigot@08de30ca3e Don't time async events SpigotMC/Spigot@c3a9e71da3
This commit is contained in:
@@ -272,9 +272,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (!eventClass.isAssignableFrom(event.getClass())) {
|
if (!eventClass.isAssignableFrom(event.getClass())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
+ timings.startTiming(); // Spigot
|
+ // Spigot start
|
||||||
|
+ boolean isAsync = event.isAsynchronous();
|
||||||
|
+ if (!isAsync) timings.startTiming();
|
||||||
method.invoke(listener, event);
|
method.invoke(listener, event);
|
||||||
+ timings.stopTiming(); // Spigot
|
+ if (!isAsync) timings.stopTiming();
|
||||||
|
+ // Spigot end
|
||||||
} catch (InvocationTargetException ex) {
|
} catch (InvocationTargetException ex) {
|
||||||
throw new EventException(ex.getCause());
|
throw new EventException(ex.getCause());
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
|
|||||||
24
CraftBukkit-Patches/0174-Fix-Corrupted-Trapped-Chest.patch
Normal file
24
CraftBukkit-Patches/0174-Fix-Corrupted-Trapped-Chest.patch
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Aikar <aikar@aikar.co>
|
||||||
|
Date: Fri, 15 Aug 2014 00:56:41 -0400
|
||||||
|
Subject: [PATCH] Fix Corrupted Trapped Chest
|
||||||
|
|
||||||
|
The CraftBukkit code that auto repairs corrupted tile entities never was updated for Trapped Chest.
|
||||||
|
If a Trapped Chest gets its Tile Entity corrupted, it will crash the server every time the chunk is loaded.
|
||||||
|
|
||||||
|
This will now fix Trapped Chests too.
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
|
@@ -0,0 +0,0 @@ public class WorldServer extends World {
|
||||||
|
TileEntity result = super.getTileEntity(i, j, k);
|
||||||
|
Block type = getType(i, j, k);
|
||||||
|
|
||||||
|
- if (type == Blocks.CHEST) {
|
||||||
|
+ if (type == Blocks.CHEST || type == Blocks.TRAPPED_CHEST) { // Spigot
|
||||||
|
if (!(result instanceof TileEntityChest)) {
|
||||||
|
result = fixTileEntity(i, j, k, type, result);
|
||||||
|
}
|
||||||
|
--
|
||||||
Reference in New Issue
Block a user