diff --git a/Spigot-Server-Patches/Optimize-Chunk-Access.patch b/Spigot-Server-Patches/Optimize-Chunk-Access.patch index 426d82c5c8..f536a40be1 100644 --- a/Spigot-Server-Patches/Optimize-Chunk-Access.patch +++ b/Spigot-Server-Patches/Optimize-Chunk-Access.patch @@ -4,8 +4,7 @@ Date: Thu, 27 Aug 2015 01:15:02 -0400 Subject: [PATCH] Optimize Chunk Access getting a loaded chunk is one of the most hottest pieces of code in the game. -Often, getChunkAt is called for the same chunk multiple times in a row, often -from getType(); +getChunkAt is called for the same chunk multiple times in a row, often from getType(); Optimize this look up by using a Last Access cache. @@ -46,7 +45,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + if (lastChunkByPos != null && key == lastChunkByPos.chunkKey) { + return lastChunkByPos; + } -+ return super.get(key); ++ return lastChunkByPos = super.get(key); + } + }; // CraftBukkit + // Paper end