More cases of avoiding marking active for chunks, to stop potential leaks
This commit is contained in:
@@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import javax.annotation.Nullable;
|
||||
+import java.util.regex.Pattern;
|
||||
+
|
||||
+public class MCUtil {
|
||||
+public final class MCUtil {
|
||||
+ private static final Pattern REPLACE_QUOTES = Pattern.compile("\"");
|
||||
+
|
||||
+ private MCUtil() {}
|
||||
@@ -141,6 +141,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ @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
|
||||
@@ -148,8 +149,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * @param z
|
||||
+ * @return
|
||||
+ */
|
||||
+ @Nullable public static Chunk getLoadedChunkWithoutMarkingActive(ChunkProviderServer provider, int x, int z) {
|
||||
+ return provider.chunks.get(ChunkCoordIntPair.a(x, z));
|
||||
+ @Nullable public static Chunk getLoadedChunkWithoutMarkingActive(IChunkProvider provider, int x, int z) {
|
||||
+ return ((ChunkProviderServer)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
|
||||
|
||||
Reference in New Issue
Block a user