testserver/Spigot-Server-Patches/0220-Add-missing-coverages-...

29 lines
1.0 KiB
Diff
Raw Normal View History

2018-01-11 05:31:19 +00:00
From 96d42683dd9accbc3584cb21897adc46d703bfbb 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
2018-01-11 05:31:19 +00:00
index 2ac5caaa..c03be509 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -235,6 +235,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;
}
--
2018-01-11 05:31:19 +00:00
2.14.3