Paper/Spigot-Server-Patches/0190-Add-missing-coverages-for-getTileEntity-in-order-to-.patch
Zach Brown 8ed2992da9
Make scan-for-legacy-ender-dragon config work again
Portion of diff was dropped in the mappings update commit.

Also remove the option to remove invalid statistics. The server will
automatically do this now as of... 1.13?, our option wasn't even doing anything.
2018-12-14 20:17:27 -05:00

29 lines
1.1 KiB
Diff

From a9c576e831952dc4651dbad0ca7e64f188a4f94a Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 22 Jul 2017 15:22:59 +0100
Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt
to avoid exeptions when calling getTileEntity
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index b5b1a2637..b80315bc5 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -234,6 +234,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
result = fixTileEntity(pos, type, result);
}
}
+ // Paper Start - add TE fix checks for shulkers, see nms.BlockShulkerBox
+ else if (type instanceof BlockShulkerBox) {
+ if (!(result instanceof TileEntityShulkerBox)) {
+ result = fixTileEntity(pos, type, result);
+ }
+ }
+ // Paper end
return result;
}
--
2.20.0