mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
18c3716c49
This enables us a fast reference to the entities current chunk instead of having to look it up by hashmap lookups. We also store counts by type to further enable other performance optimizations in later patches.
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From 59b994221ae889c52cdbd1e7fd0be8f8109231e2 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 737ade74d..c06158e02 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -238,6 +238,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.18.0
|
|
|