3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

safety check (and hopeful fix) for chunk saving

Dieser Commit ist enthalten in:
Tahg 2011-08-19 23:17:48 -04:00
Ursprung 90d1afb748
Commit 6e4b12cdf1
2 geänderte Dateien mit 3 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -425,7 +425,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
Vec3D.a(); Vec3D.a();
++this.ticks; ++this.ticks;
((CraftScheduler) this.server.getScheduler()).mainThreadHeartbeat(this.ticks); ((CraftScheduler) this.server.getScheduler()).mainThreadHeartbeat(this.ticks); // CraftBukkit
for (j = 0; j < this.worlds.size(); ++j) { // CraftBukkit for (j = 0; j < this.worlds.size(); ++j) { // CraftBukkit
// if (j == 0 || this.propertyManager.getBoolean("allow-nether", true)) { // CraftBukkit // if (j == 0 || this.propertyManager.getBoolean("allow-nether", true)) { // CraftBukkit
@ -437,10 +437,9 @@ public class MinecraftServer implements Runnable, ICommandListener {
EntityPlayer entityplayer = (EntityPlayer) this.serverConfigurationManager.players.get(i); EntityPlayer entityplayer = (EntityPlayer) this.serverConfigurationManager.players.get(i);
entityplayer.netServerHandler.sendPacket(new Packet4UpdateTime(entityplayer.getPlayerTime())); // Add support for per player time entityplayer.netServerHandler.sendPacket(new Packet4UpdateTime(entityplayer.getPlayerTime())); // Add support for per player time
} }
// CraftBukkit end
} }
// CraftBukkit end
worldserver.doTick(); worldserver.doTick();
while (worldserver.doLighting()) { while (worldserver.doLighting()) {

Datei anzeigen

@ -153,7 +153,7 @@ public class CraftWorld implements World {
net.minecraft.server.Chunk chunk = world.chunkProviderServer.getOrCreateChunk(x, z); net.minecraft.server.Chunk chunk = world.chunkProviderServer.getOrCreateChunk(x, z);
if (save) { if (save && !chunk.isEmpty()) {
chunk.removeEntities(); chunk.removeEntities();
world.chunkProviderServer.saveChunk(chunk); world.chunkProviderServer.saveChunk(chunk);
world.chunkProviderServer.saveChunkNOP(chunk); world.chunkProviderServer.saveChunkNOP(chunk);