From 22ee365ac0b8d43053a9aa2db059eb17738ef115 Mon Sep 17 00:00:00 2001 From: Shane Freeder 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 15736f7575..ee09f4c5a0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -217,6 +217,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.21.0