Fix chunk leak issue with queued light updates
This commit is contained in:
@@ -15,6 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
+
|
||||
+import javax.annotation.Nullable;
|
||||
+import java.util.regex.Pattern;
|
||||
+
|
||||
+public class MCUtil {
|
||||
@@ -129,6 +130,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ final int modZ = pos.getZ() & 15;
|
||||
+ return (modX == 0 || modX == 15 || modZ == 0 || modZ == 15);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets a chunk without changing its boolean for should unload
|
||||
+ * @param world
|
||||
+ * @param x
|
||||
+ * @param z
|
||||
+ * @return
|
||||
+ */
|
||||
+ @Nullable public static Chunk getLoadedChunkWithoutMarkingActive(World world, int x, int z) {
|
||||
+ return ((ChunkProviderServer) world.chunkProvider).chunks.get(ChunkCoordIntPair.a(x, z));
|
||||
+ }
|
||||
+ /**
|
||||
+ * Gets a chunk without changing its boolean for should unload
|
||||
+ * @param provider
|
||||
+ * @param x
|
||||
+ * @param z
|
||||
+ * @return
|
||||
+ */
|
||||
+ @Nullable public static Chunk getLoadedChunkWithoutMarkingActive(ChunkProviderServer provider, int x, int z) {
|
||||
+ return provider.chunks.get(ChunkCoordIntPair.a(x, z));
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
||||
Reference in New Issue
Block a user