PaperSpigot-Parent/CraftBukkit-Patches/0149-Fix-Corrupted-Trapped-Chest.patch
Zach Brown 28414e7e28 Update from upstream SpigotMC
6669d6ecd2b
b2740df50bb
bf71dc61149
fba27a2ea80
92ee7e7f8ec
b28f0d3de23
4beb4ac3918
0ddb6f3dde8
afe301fe892
b8f6402bbbe
2014-12-07 13:26:30 -06:00

27 lines
1.1 KiB
Diff

From 8a76d65baf9d9591f24ebf008f8e1d96d52ba63b 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 b5627c5..8b4278f 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -114,7 +114,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
TileEntity result = super.getTileEntity(pos);
Block type = getType(pos).getBlock();
- if (type == Blocks.CHEST) {
+ if (type == Blocks.CHEST || type == Blocks.TRAPPED_CHEST) { // Spigot
if (!(result instanceof TileEntityChest)) {
result = fixTileEntity(pos, type, result);
}
--
2.1.0