Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
30f02fe6e5
I think its pretty clear that no one uses this given that it didn't work at all before
28 Zeilen
1.1 KiB
Diff
28 Zeilen
1.1 KiB
Diff
From 39ecc8e9af0f15467844d39ef9065aad2d37ce3d Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 2 Mar 2016 23:55:20 -0600
|
|
Subject: [PATCH] Don't create a chunk just to unload it
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index f32d974..40338c0 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -205,7 +205,12 @@ public class CraftWorld implements World {
|
|
return false;
|
|
}
|
|
|
|
- net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z);
|
|
+ // Paper start - Don't create a chunk just to unload it
|
|
+ net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkIfLoaded(x, z);
|
|
+ if (chunk == null) {
|
|
+ return false;
|
|
+ }
|
|
+ // Paper end
|
|
if (chunk.mustSave) { // If chunk had previously been queued to save, must do save to avoid loss of that data
|
|
save = true;
|
|
}
|
|
--
|
|
2.7.2
|
|
|