2019-03-20 01:46:00 +00:00
|
|
|
From 3d463a5ec0887a8c0424ba171b16bd835c64fade Mon Sep 17 00:00:00 2001
|
2017-07-27 03:11:09 +00:00
|
|
|
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
|
2019-03-20 01:46:00 +00:00
|
|
|
index 15736f757..ee09f4c5a 100644
|
2017-07-27 03:11:09 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
2019-01-01 03:15:55 +00:00
|
|
|
@@ -217,6 +217,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
2017-07-27 03:11:09 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
--
|
2019-03-20 01:46:00 +00:00
|
|
|
2.21.0
|
2017-07-27 03:11:09 +00:00
|
|
|
|