diff --git a/Spigot-Server-Patches/0078-Optimize-Chunk-Access.patch b/Spigot-Server-Patches/0078-Optimize-Chunk-Access.patch index 4bfae5f308..42f40e6c31 100644 --- a/Spigot-Server-Patches/0078-Optimize-Chunk-Access.patch +++ b/Spigot-Server-Patches/0078-Optimize-Chunk-Access.patch @@ -1,4 +1,4 @@ -From eb8942dae2dd6dbc8a32b05c0a502a4a507d7233 Mon Sep 17 00:00:00 2001 +From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 27 Aug 2015 01:15:02 -0400 Subject: [PATCH] Optimize Chunk Access @@ -9,7 +9,7 @@ getChunkAt is called for the same chunk multiple times in a row, often from getT Optimize this look up by using a Last Access cache. diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java -index 4b8b77710b..71ddaf591e 100644 +index 7ac07ac07ac0..7ac07ac07ac0 100644 --- a/src/main/java/net/minecraft/server/ChunkMap.java +++ b/src/main/java/net/minecraft/server/ChunkMap.java @@ -15,6 +15,7 @@ public class ChunkMap extends Long2ObjectOpenHashMap { @@ -71,7 +71,7 @@ index 4b8b77710b..71ddaf591e 100644 public Chunk a(Object object) { return this.a(((Long) object).longValue()); diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index d16fc452e3..2d10f4aa37 100644 +index 7ac07ac07ac0..7ac07ac07ac0 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -78,15 +78,16 @@ public class ChunkProviderServer implements IChunkProvider { @@ -112,6 +112,14 @@ index d16fc452e3..2d10f4aa37 100644 } return true; } +@@ -379,6 +380,6 @@ public class ChunkProviderServer implements IChunkProvider { + } + + public boolean isLoaded(int i, int j) { +- return this.chunks.containsKey(ChunkCoordIntPair.a(i, j)); ++ return this.chunks.get(ChunkCoordIntPair.asLong(i, j)) != null; // Paper - use get for last access + } + } -- 2.19.1