mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 17:17:13 +01:00
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
From 77c78866dba86d58c6ae8ea82fdce606b7164a38 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 8a1165c..33d017b 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -126,7 +126,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.4
|
|
|