mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Add missing coverages for getTileEntity in order to attempt to avoid exeptions when calling getTileEntity (#797)
This commit is contained in:
parent
e021202107
commit
cdcfbbe285
1 changed files with 26 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
|||
From 0000000000000000000000000000000000000000 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
|
||||
@@ -0,0 +0,0 @@ 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;
|
||||
}
|
||||
--
|
Loading…
Reference in a new issue