From 6177f2d61e0f9300e703f0569cd57c9e7d419475 Mon Sep 17 00:00:00 2001 From: Shane Freeder <theboyetronic@gmail.com> Date: Thu, 27 Jul 2017 04:11:09 +0100 Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt to avoid exeptions when calling getTileEntity (#797) --- ...rages-for-getTileEntity-in-order-to-.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Spigot-Server-Patches/0223-Add-missing-coverages-for-getTileEntity-in-order-to-.patch diff --git a/Spigot-Server-Patches/0223-Add-missing-coverages-for-getTileEntity-in-order-to-.patch b/Spigot-Server-Patches/0223-Add-missing-coverages-for-getTileEntity-in-order-to-.patch new file mode 100644 index 0000000000..e48c0be37d --- /dev/null +++ b/Spigot-Server-Patches/0223-Add-missing-coverages-for-getTileEntity-in-order-to-.patch @@ -0,0 +1,28 @@ +From 2b0c67ca443f56e8348ac59c4c17d97904c2529b 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 bde48b692..34a974617 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.13.3 +