From 9da2e5eff75e846e6c52004f645b5f74aa88f860 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 7 Jul 2015 13:44:35 -0700 Subject: [PATCH] Load chunks in getCubes() --- ...nks-for-specific-entities-that-fly-thr.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Spigot-Server-Patches/Force-load-chunks-for-specific-entities-that-fly-thr.patch b/Spigot-Server-Patches/Force-load-chunks-for-specific-entities-that-fly-thr.patch index bd9b8f0133..dc9ab03a9d 100644 --- a/Spigot-Server-Patches/Force-load-chunks-for-specific-entities-that-fly-thr.patch +++ b/Spigot-Server-Patches/Force-load-chunks-for-specific-entities-that-fly-thr.patch @@ -140,6 +140,23 @@ diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/m index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java +@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { + { + if ( !this.isChunkLoaded( chunkx, chunkz, true ) ) + { +- entity.inUnloadedChunk = true; // PaperSpigot - Remove entities in unloaded chunks +- continue; ++ // PaperSpigot start ++ if (entity.loadChunks) { ++ ((ChunkProviderServer) entity.world.chunkProvider).getChunkAt(chunkx, chunkz); ++ } else { ++ entity.inUnloadedChunk = true; // PaperSpigot - Remove entities in unloaded chunks ++ continue; ++ } ++ // PaperSpigot end + } + int cz = chunkz << 4; + Chunk chunk = this.getChunkAt( chunkx, chunkz ); @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { int i1 = MathHelper.floor(entity.locZ / 16.0D);