3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-17 13:30:06 +01:00
Paper/CraftBukkit-Patches/0173-Fix-Corrupted-Trapped-Chest.patch
Zach Brown a4647a8a71 Update from upstream SpigotMC
Fix empty `ench` tags being wiped by the meta system SpigotMC/Spigot@cc9a1a417f
Add Hunger Config Values SpigotMC/Spigot@2cd515e224
Make debug logging togglable SpigotMC/Spigot@d31b1d616f

Spigot has implemented a system of hunger exhaustion similar to ours, as such a lot of config values have been moved there.
Our exhaustion patch has been trimmed and only a few values for exhaustion remain in paper.yml, the others now sit in spigot.yml
2014-08-17 16:47:36 -05:00

27 Zeilen
1.1 KiB
Diff

From d3ad925d2b1ffcdab030cf892d231596d8493558 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 d93eb8b..f9dc0fc 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -87,7 +87,7 @@ 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);
}
--
1.9.1