Updated Timings to better detail saves

This commit is contained in:
Aikar 2016-10-20 00:21:35 -04:00
parent 64e537e63c
commit 874c7a2ef8
12 changed files with 179 additions and 80 deletions

View File

@ -1,4 +1,4 @@
From a500af740a3d0d36fbcd5e0b3f1558e14d6a7f0d Mon Sep 17 00:00:00 2001 From 816dc32418ed79b5a38e7a4b5bc58bddc8123af1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600 Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
@ -23,7 +23,7 @@ index 4ae34c8..63aaa7a 100644
<version>3.0.3</version> <version>3.0.3</version>
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644 new file mode 100644
index 0000000..2dff5e3 index 0000000..29838de
--- /dev/null --- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,114 @@ @@ -0,0 +1,114 @@
@ -45,7 +45,7 @@ index 0000000..2dff5e3
+ public static final Timing chunkIOTickTimer = Timings.ofSafe("ChunkIOTick"); + public static final Timing chunkIOTickTimer = Timings.ofSafe("ChunkIOTick");
+ public static final Timing timeUpdateTimer = Timings.ofSafe("Time Update"); + public static final Timing timeUpdateTimer = Timings.ofSafe("Time Update");
+ public static final Timing serverCommandTimer = Timings.ofSafe("Server Command"); + public static final Timing serverCommandTimer = Timings.ofSafe("Server Command");
+ public static final Timing worldSaveTimer = Timings.ofSafe("World Save"); + public static final Timing savePlayers = Timings.ofSafe("Save Players");
+ +
+ public static final Timing tickEntityTimer = Timings.ofSafe("## tickEntity"); + public static final Timing tickEntityTimer = Timings.ofSafe("## tickEntity");
+ public static final Timing tickTileEntityTimer = Timings.ofSafe("## tickTileEntity"); + public static final Timing tickTileEntityTimer = Timings.ofSafe("## tickTileEntity");
@ -275,10 +275,10 @@ index 0000000..2bf5b66
+} +}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644 new file mode 100644
index 0000000..36aafb2 index 0000000..e778911
--- /dev/null --- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,91 @@ @@ -0,0 +1,101 @@
+package co.aikar.timings; +package co.aikar.timings;
+ +
+import net.minecraft.server.World; +import net.minecraft.server.World;
@ -325,6 +325,11 @@ index 0000000..36aafb2
+ public final Timing chunkGeneration; + public final Timing chunkGeneration;
+ public final Timing chunkIOStage1; + public final Timing chunkIOStage1;
+ public final Timing chunkIOStage2; + public final Timing chunkIOStage2;
+ public final Timing worldSave;
+ public final Timing worldSaveChunks;
+ public final Timing worldSaveLevel;
+ public final Timing chunkSaveNop;
+ public final Timing chunkSaveData;
+ +
+ public WorldTimingsHandler(World server) { + public WorldTimingsHandler(World server) {
+ String name = server.worldData.getName() +" - "; + String name = server.worldData.getName() +" - ";
@ -363,6 +368,11 @@ index 0000000..36aafb2
+ chunkGeneration = Timings.ofSafe(name + "chunkGeneration"); + chunkGeneration = Timings.ofSafe(name + "chunkGeneration");
+ chunkIOStage1 = Timings.ofSafe(name + "ChunkIO Stage 1 - DiskIO"); + chunkIOStage1 = Timings.ofSafe(name + "ChunkIO Stage 1 - DiskIO");
+ chunkIOStage2 = Timings.ofSafe(name + "ChunkIO Stage 2 - Post Load"); + chunkIOStage2 = Timings.ofSafe(name + "ChunkIO Stage 2 - Post Load");
+ worldSave = Timings.ofSafe(name + "World Save");
+ worldSaveLevel = Timings.ofSafe(name + "World Save - Level");
+ worldSaveChunks = Timings.ofSafe(name + "World Save - Chunks");
+ chunkSaveNop = Timings.ofSafe(name + "Chunk Save - NOP");
+ chunkSaveData = Timings.ofSafe(name + "Chunk Save - Data");
+ +
+ tracker1 = Timings.ofSafe(name + "tracker stage 1"); + tracker1 = Timings.ofSafe(name + "tracker stage 1");
+ tracker2 = Timings.ofSafe(name + "tracker stage 2"); + tracker2 = Timings.ofSafe(name + "tracker stage 2");
@ -482,6 +492,28 @@ index b651edc..5807bb8 100644
} }
private void z() { private void z() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 5682f03..1380815 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -194,7 +194,7 @@ public class ChunkProviderServer implements IChunkProvider {
}
public void saveChunkNOP(Chunk chunk) {
- try {
+ try (co.aikar.timings.Timing timed = world.timings.chunkSaveNop.startTiming()) {
this.chunkLoader.b(this.world, chunk);
} catch (Exception exception) {
ChunkProviderServer.a.error("Couldn\'t save entities", exception);
@@ -203,7 +203,7 @@ public class ChunkProviderServer implements IChunkProvider {
}
public void saveChunk(Chunk chunk) {
- try {
+ try (co.aikar.timings.Timing timed = world.timings.chunkSaveData.startTiming()) {
chunk.setLastSaved(this.world.getTime());
this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index f604639..17dd7bb 100644 index f604639..17dd7bb 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@ -695,7 +727,7 @@ index 5432e70..72cd51a 100644
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 26f8467..891c7ea 100644 index 26f8467..4814643 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -45,7 +45,7 @@ import org.bukkit.Bukkit; @@ -45,7 +45,7 @@ import org.bukkit.Bukkit;
@ -724,25 +756,23 @@ index 26f8467..891c7ea 100644
long i = System.nanoTime(); long i = System.nanoTime();
++this.ticks; ++this.ticks;
@@ -681,7 +682,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -681,7 +682,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
} }
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
- SpigotTimings.worldSaveTimer.startTiming(); // Spigot - SpigotTimings.worldSaveTimer.startTiming(); // Spigot
+ MinecraftTimings.worldSaveTimer.startTiming(); // Spigot
this.methodProfiler.a("save"); this.methodProfiler.a("save");
this.v.savePlayers(); this.v.savePlayers();
// Spigot Start // Spigot Start
@@ -696,7 +697,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -696,7 +696,6 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// this.saveChunks(true); // this.saveChunks(true);
// Spigot End // Spigot End
this.methodProfiler.b(); this.methodProfiler.b();
- SpigotTimings.worldSaveTimer.stopTiming(); // Spigot - SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
+ MinecraftTimings.worldSaveTimer.stopTiming(); // Spigot
} }
this.methodProfiler.a("tallying"); this.methodProfiler.a("tallying");
@@ -713,15 +714,16 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -713,15 +712,16 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.b(); this.methodProfiler.b();
@ -763,7 +793,7 @@ index 26f8467..891c7ea 100644
this.methodProfiler.a("jobs"); this.methodProfiler.a("jobs");
Queue queue = this.j; Queue queue = this.j;
@@ -732,22 +734,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -732,22 +732,23 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
SystemUtils.a(entry, MinecraftServer.LOGGER); SystemUtils.a(entry, MinecraftServer.LOGGER);
} }
// Spigot end // Spigot end
@ -792,7 +822,7 @@ index 26f8467..891c7ea 100644
// Send time updates to everyone, it will get the right time from the world the player is in. // Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) { if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) { for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -755,7 +758,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -755,7 +756,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean("doDaylightCycle"))); // Add support for per player time
} }
} }
@ -801,7 +831,7 @@ index 26f8467..891c7ea 100644
int i; int i;
@@ -812,9 +815,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -812,9 +813,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.a("tracker"); this.methodProfiler.a("tracker");
@ -811,7 +841,7 @@ index 26f8467..891c7ea 100644
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.b(); this.methodProfiler.b();
// } // CraftBukkit // } // CraftBukkit
@@ -823,20 +824,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -823,20 +822,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
} }
this.methodProfiler.c("connection"); this.methodProfiler.c("connection");
@ -986,6 +1016,30 @@ index f47c5fc..ae576f0 100644
// this.minecraftServer.getCommandHandler().a(this.player, s); // this.minecraftServer.getCommandHandler().a(this.player, s);
// CraftBukkit end // CraftBukkit end
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6bd7151..1b2cc01 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
package net.minecraft.server;
+import co.aikar.timings.MinecraftTimings;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1167,10 +1168,11 @@ public abstract class PlayerList {
}
public void savePlayers() {
+ MinecraftTimings.savePlayers.startTiming(); // Paper
for (int i = 0; i < this.players.size(); ++i) {
this.savePlayerFile((EntityPlayer) this.players.get(i));
}
-
+ MinecraftTimings.savePlayers.stopTiming(); // Paper
}
public void addWhitelist(GameProfile gameprofile) {
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index 8dd434c..c965af1 100644 index 8dd434c..c965af1 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java --- a/src/main/java/net/minecraft/server/StructureGenerator.java
@ -1155,7 +1209,7 @@ index e649435..b73f64e 100644
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 50fad7c..769d55b 100644 index 50fad7c..3d98392 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -246,13 +246,13 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -246,13 +246,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -1244,6 +1298,49 @@ index 50fad7c..769d55b 100644
// CraftBukkit end // CraftBukkit end
} }
@@ -1007,6 +1015,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (chunkproviderserver.e()) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
+ timings.worldSave.startTiming(); // Paper
if (iprogressupdate != null) {
iprogressupdate.a("Saving level");
}
@@ -1016,7 +1025,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
iprogressupdate.c("Saving chunks");
}
+ timings.worldSaveChunks.startTiming(); // Paper
chunkproviderserver.a(flag);
+ timings.worldSaveChunks.stopTiming(); // Paper
// CraftBukkit - ArrayList -> Collection
Collection arraylist = chunkproviderserver.a();
Iterator iterator = arraylist.iterator();
@@ -1028,7 +1039,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.unload(chunk);
}
}
-
+ timings.worldSave.stopTiming(); // Paper
}
}
@@ -1041,6 +1052,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
protected void a() throws ExceptionWorldConflict {
+ timings.worldSaveLevel.startTiming(); // Paper
this.checkSession();
WorldServer[] aworldserver = this.server.worldServer;
int i = aworldserver.length;
@@ -1070,6 +1082,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.worldData.e(this.getWorldBorder().i());
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t());
this.worldMaps.a();
+ timings.worldSaveLevel.stopTiming(); // Paper
}
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e7e9941..5f2a9b0 100644 index e7e9941..5f2a9b0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java

View File

@ -1,4 +1,4 @@
From 6758ff9e302ca3dc0b004c9724d49d831026dcc2 Mon Sep 17 00:00:00 2001 From dfa1dfa903a53268c050cd0be90ed38d288c26c7 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600 Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -20,10 +20,10 @@ index a8b5079..ebbc1fc 100644
EULA.a.warn("Failed to save {}", new Object[] { this.b, exception}); EULA.a.warn("Failed to save {}", new Object[] { this.b, exception});
} finally { } finally {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 891c7ea..062cfd6 100644 index 4814643..41f560f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1030,7 +1030,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -1028,7 +1028,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
} }
public String getServerModName() { public String getServerModName() {
@ -80,5 +80,5 @@ index 94a3d42..3ed983c 100644
log.log( Level.SEVERE, "------------------------------" ); log.log( Level.SEVERE, "------------------------------" );
// //
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,4 +1,4 @@
From 92e46c6a80210fe9152b447e7dc2275dadb8e575 Mon Sep 17 00:00:00 2001 From fa2e0c1e868ffb94b3748ffbd75b60a5b6ce38fc Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 00:52:31 -0600 Date: Wed, 2 Mar 2016 00:52:31 -0600
Subject: [PATCH] Lighting Queue Subject: [PATCH] Lighting Queue
@ -6,19 +6,19 @@ Subject: [PATCH] Lighting Queue
This provides option to queue lighting updates to ensure they do not cause the server lag This provides option to queue lighting updates to ensure they do not cause the server lag
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
index 36aafb2..90bdbf0 100644 index e778911..f90f5bf 100644
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -45,6 +45,8 @@ public class WorldTimingsHandler { @@ -50,6 +50,8 @@ public class WorldTimingsHandler {
public final Timing chunkIOStage1; public final Timing chunkSaveNop;
public final Timing chunkIOStage2; public final Timing chunkSaveData;
+ public final Timing lightingQueueTimer; + public final Timing lightingQueueTimer;
+ +
public WorldTimingsHandler(World server) { public WorldTimingsHandler(World server) {
String name = server.worldData.getName() +" - "; String name = server.worldData.getName() +" - ";
@@ -87,5 +89,7 @@ public class WorldTimingsHandler { @@ -97,5 +99,7 @@ public class WorldTimingsHandler {
tracker2 = Timings.ofSafe(name + "tracker stage 2"); tracker2 = Timings.ofSafe(name + "tracker stage 2");
doTick = Timings.ofSafe(name + "doTick"); doTick = Timings.ofSafe(name + "doTick");
tickEntities = Timings.ofSafe(name + "tickEntities"); tickEntities = Timings.ofSafe(name + "tickEntities");
@ -85,7 +85,7 @@ index 445419f..76130c9 100644
TileEntity tileentity; TileEntity tileentity;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 5682f03..5eeefe8 100644 index 1380815..466cd49 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -279,6 +279,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -279,6 +279,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -97,7 +97,7 @@ index 5682f03..5eeefe8 100644
// Update neighbor counts // Update neighbor counts
for (int x = -2; x < 3; x++) { for (int x = -2; x < 3; x++) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1363472..d0060d0 100644 index 029a6c3..f0dcb9f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -709,7 +709,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -709,7 +709,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@ -109,7 +109,7 @@ index 1363472..d0060d0 100644
++this.ticks; ++this.ticks;
if (this.S) { if (this.S) {
@@ -769,6 +769,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -767,6 +767,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.methodProfiler.b(); this.methodProfiler.b();
org.spigotmc.WatchdogThread.tick(); // Spigot org.spigotmc.WatchdogThread.tick(); // Spigot
@ -235,5 +235,5 @@ index 8fb8176..672167a 100644
} }
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,4 +1,4 @@
From 428b111b0dd4542d55db721110adf33e7feead76 Mon Sep 17 00:00:00 2001 From b543f01f64b3f40cf217d22ba12d5d9d23ad1b71 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 11:59:48 -0600 Date: Wed, 2 Mar 2016 11:59:48 -0600
Subject: [PATCH] Optimize explosions Subject: [PATCH] Optimize explosions
@ -124,10 +124,10 @@ index f4765d3..caf29c7 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d0060d0..d1d268f 100644 index f0dcb9f..885fc80 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -872,6 +872,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -870,6 +870,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
worldserver.getTracker().updatePlayers(); worldserver.getTracker().updatePlayers();
this.methodProfiler.b(); this.methodProfiler.b();
this.methodProfiler.b(); this.methodProfiler.b();
@ -156,5 +156,5 @@ index 672167a..e8cfe2b 100644
public CraftWorld getWorld() { public CraftWorld getWorld() {
return this.world; return this.world;
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,4 +1,4 @@
From e6aac3fdbf9ad18ef5a42c10511f2eb1849fbe5e Mon Sep 17 00:00:00 2001 From 01731b5d0db283d9319b44123c70162f64d8f06c Mon Sep 17 00:00:00 2001
From: Steve Anton <anxuiz.nx@gmail.com> From: Steve Anton <anxuiz.nx@gmail.com>
Date: Thu, 3 Mar 2016 00:09:38 -0600 Date: Thu, 3 Mar 2016 00:09:38 -0600
Subject: [PATCH] Add PlayerInitialSpawnEvent Subject: [PATCH] Add PlayerInitialSpawnEvent
@ -6,10 +6,10 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent
For modifying a player's initial spawn location as they join the server For modifying a player's initial spawn location as they join the server
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 6bd7151..e88e918 100644 index 1b2cc01..28bcef8 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -100,6 +100,21 @@ public abstract class PlayerList { @@ -101,6 +101,21 @@ public abstract class PlayerList {
} }
// CraftBukkit end // CraftBukkit end
@ -32,5 +32,5 @@ index 6bd7151..e88e918 100644
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world); entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
String s1 = "local"; String s1 = "local";
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,4 +1,4 @@
From 236c046bc5e75574bc47475a4969553a0830b522 Mon Sep 17 00:00:00 2001 From 53c6f8cabb78c2f2b965fd952f410afefd78780f Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600 Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event Subject: [PATCH] Add exception reporting event
@ -89,7 +89,7 @@ index 989d510..9118e4d 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 5eeefe8..299cc91 100644 index 466cd49..cbc93a8 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -11,6 +11,7 @@ import java.util.Iterator; @@ -11,6 +11,7 @@ import java.util.Iterator;
@ -114,7 +114,7 @@ index 5eeefe8..299cc91 100644
} }
} }
@@ -197,7 +202,11 @@ public class ChunkProviderServer implements IChunkProvider { @@ -197,7 +202,11 @@ public class ChunkProviderServer implements IChunkProvider {
try { try (co.aikar.timings.Timing timed = world.timings.chunkSaveNop.startTiming()) {
this.chunkLoader.b(this.world, chunk); this.chunkLoader.b(this.world, chunk);
} catch (Exception exception) { } catch (Exception exception) {
- ChunkProviderServer.a.error("Couldn\'t save entities", exception); - ChunkProviderServer.a.error("Couldn\'t save entities", exception);
@ -372,5 +372,5 @@ index 198c37c..cdb836a 100644
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
} }
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,14 +1,14 @@
From 027f133012b8a6625b8188ad57a7a007a7c377db Mon Sep 17 00:00:00 2001 From 190292d03cc0488c8792f1aa51881aa4839d26a2 Mon Sep 17 00:00:00 2001
From: DemonWav <demonwav@gmail.com> From: DemonWav <demonwav@gmail.com>
Date: Wed, 30 Mar 2016 01:20:11 -0500 Date: Wed, 30 Mar 2016 01:20:11 -0500
Subject: [PATCH] Add getEntity by UUID API Subject: [PATCH] Add getEntity by UUID API
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d1d268f..35a8602 100644 index 885fc80..7bb6033 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1508,6 +1508,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -1506,6 +1506,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.Y = 0L; this.Y = 0L;
} }
@ -16,7 +16,7 @@ index d1d268f..35a8602 100644
@Nullable @Nullable
public Entity a(UUID uuid) { public Entity a(UUID uuid) {
WorldServer[] aworldserver = this.worldServer; WorldServer[] aworldserver = this.worldServer;
@@ -1521,7 +1522,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -1519,7 +1520,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
if (worldserver != null) { if (worldserver != null) {
Entity entity = worldserver.getEntity(uuid); Entity entity = worldserver.getEntity(uuid);
@ -53,5 +53,5 @@ index 15bef42..703aff1 100644
// Paper end // Paper end
} }
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,14 +1,14 @@
From 3ebce7ad05c9d5960572e7674e531ee57e45ca3b Mon Sep 17 00:00:00 2001 From db122f3419edb02fe2f4dc8b826aec71207d2ac1 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com> From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 2 Apr 2016 20:37:03 -0400 Date: Sat, 2 Apr 2016 20:37:03 -0400
Subject: [PATCH] Fix reducedDebugInfo not initialized on client Subject: [PATCH] Fix reducedDebugInfo not initialized on client
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index e88e918..a41bc5f 100644 index 28bcef8..d26da3a 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -152,6 +152,7 @@ public abstract class PlayerList { @@ -153,6 +153,7 @@ public abstract class PlayerList {
playerconnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition)); playerconnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition));
playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities)); playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities));
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
@ -17,5 +17,5 @@ index e88e918..a41bc5f 100644
entityplayer.getStatisticManager().d(); entityplayer.getStatisticManager().d();
entityplayer.getStatisticManager().updateStatistics(entityplayer); entityplayer.getStatisticManager().updateStatistics(entityplayer);
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,4 +1,4 @@
From 67f26ad0e1b64b12230b9fdd7dfd2374f7b88707 Mon Sep 17 00:00:00 2001 From 49407d9d80719c50b8ec3eb8083a5265f63c9837 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400 Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision Subject: [PATCH] Configurable Player Collision
@ -37,7 +37,7 @@ index 8e5419d..64a3495 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8e364de..a5ebb17 100644 index e35341b..01325b3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -324,6 +324,14 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -324,6 +324,14 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@ -69,10 +69,10 @@ index d8ec504..eb45d3c 100644
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index a41bc5f..ea4c7ee 100644 index d26da3a..eb846cf 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -67,6 +67,7 @@ public abstract class PlayerList { @@ -68,6 +68,7 @@ public abstract class PlayerList {
// CraftBukkit start // CraftBukkit start
private CraftServer cserver; private CraftServer cserver;
private final Map<String,EntityPlayer> playersByName = new org.spigotmc.CaseInsensitiveMap<EntityPlayer>(); private final Map<String,EntityPlayer> playersByName = new org.spigotmc.CaseInsensitiveMap<EntityPlayer>();
@ -80,7 +80,7 @@ index a41bc5f..ea4c7ee 100644
public PlayerList(MinecraftServer minecraftserver) { public PlayerList(MinecraftServer minecraftserver) {
this.cserver = minecraftserver.server = new CraftServer(minecraftserver, this); this.cserver = minecraftserver.server = new CraftServer(minecraftserver, this);
@@ -234,6 +235,12 @@ public abstract class PlayerList { @@ -235,6 +236,12 @@ public abstract class PlayerList {
} }
entityplayer.syncInventory(); entityplayer.syncInventory();
@ -93,7 +93,7 @@ index a41bc5f..ea4c7ee 100644
// CraftBukkit - Moved from above, added world // CraftBukkit - Moved from above, added world
PlayerList.f.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "]" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")"); PlayerList.f.info(entityplayer.getName() + "[" + s1 + "] logged in with entity id " + entityplayer.getId() + " at ([" + entityplayer.world.worldData.getName() + "]" + entityplayer.locX + ", " + entityplayer.locY + ", " + entityplayer.locZ + ")");
} }
@@ -404,6 +411,16 @@ public abstract class PlayerList { @@ -405,6 +412,16 @@ public abstract class PlayerList {
entityplayer.k_();// SPIGOT-924 // PAIL: rename - playerTick entityplayer.k_();// SPIGOT-924 // PAIL: rename - playerTick
// CraftBukkit end // CraftBukkit end
@ -110,7 +110,7 @@ index a41bc5f..ea4c7ee 100644
this.savePlayerFile(entityplayer); this.savePlayerFile(entityplayer);
if (entityplayer.isPassenger()) { if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getVehicle(); Entity entity = entityplayer.getVehicle();
@@ -1302,7 +1319,13 @@ public abstract class PlayerList { @@ -1304,7 +1321,13 @@ public abstract class PlayerList {
player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
} }
// CraftBukkit end // CraftBukkit end
@ -126,5 +126,5 @@ index a41bc5f..ea4c7ee 100644
// CraftBukkit start // CraftBukkit start
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,4 +1,4 @@
From a47d239dfc2f8dcf30bf36ef6d228b20fb8f78b6 Mon Sep 17 00:00:00 2001 From 4d88a9833dba3f9449be3f9bc0a9d8f773024fc7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 28 Apr 2016 00:57:27 -0400 Date: Thu, 28 Apr 2016 00:57:27 -0400
Subject: [PATCH] remove null possibility for getServer singleton Subject: [PATCH] remove null possibility for getServer singleton
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a5ebb17..6fbe9e6 100644 index 01325b3..9455475 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -49,6 +49,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -49,6 +49,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
@ -25,7 +25,7 @@ index a5ebb17..6fbe9e6 100644
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
this.e = proxy; this.e = proxy;
this.U = yggdrasilauthenticationservice; this.U = yggdrasilauthenticationservice;
@@ -1605,7 +1607,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -1603,7 +1605,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// CraftBukkit start // CraftBukkit start
@Deprecated @Deprecated
public static MinecraftServer getServer() { public static MinecraftServer getServer() {
@ -35,5 +35,5 @@ index a5ebb17..6fbe9e6 100644
// CraftBukkit end // CraftBukkit end
} }
-- --
2.10.0.windows.1 2.10.1

View File

@ -1,4 +1,4 @@
From ac5e6492e7395bfff150b85781fe9d0e82ef72a4 Mon Sep 17 00:00:00 2001 From efc5e2a80cc31881a2438fdf57211cb36aadd74d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 19 Sep 2016 23:16:39 -0400 Date: Mon, 19 Sep 2016 23:16:39 -0400
Subject: [PATCH] Auto Save Improvements Subject: [PATCH] Auto Save Improvements
@ -55,7 +55,7 @@ index 683a6dd..547628a 100644
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 1ba02f1..65de280 100644 index 3828da7..7e53fee 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -75,7 +75,7 @@ index 1ba02f1..65de280 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8ca8fbf..c19bde9 100644 index a4f7e4d..fb06496 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -114,6 +114,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -114,6 +114,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@ -86,12 +86,11 @@ index 8ca8fbf..c19bde9 100644
// CraftBukkit end // CraftBukkit end
public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) { public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
@@ -745,24 +746,28 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -745,22 +746,26 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.q.b().a(agameprofile); this.q.b().a(agameprofile);
} }
- if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit - if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
MinecraftTimings.worldSaveTimer.startTiming(); // Spigot
this.methodProfiler.a("save"); this.methodProfiler.a("save");
+ +
+ serverAutoSave = (autosavePeriod > 0 && this.ticks % autosavePeriod == 0); // Paper + serverAutoSave = (autosavePeriod > 0 && this.ticks % autosavePeriod == 0); // Paper
@ -112,31 +111,34 @@ index 8ca8fbf..c19bde9 100644
// this.saveChunks(true); // this.saveChunks(true);
// Spigot End // Spigot End
this.methodProfiler.b(); this.methodProfiler.b();
MinecraftTimings.worldSaveTimer.stopTiming(); // Spigot
- } - }
+ //} // Paper - Incremental Auto Saving + //} // Paper - Incremental Auto Saving
this.methodProfiler.a("tallying"); this.methodProfiler.a("tallying");
this.h[this.ticks % 100] = System.nanoTime() - i; this.h[this.ticks % 100] = System.nanoTime() - i;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 24b79d3..9e38304 100644 index fc33575..81712ff 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1017,12 +1017,12 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1017,8 +1017,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
ChunkProviderServer chunkproviderserver = this.getChunkProviderServer(); ChunkProviderServer chunkproviderserver = this.getChunkProviderServer();
if (chunkproviderserver.e()) { if (chunkproviderserver.e()) {
- org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit - org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
+ if (flag) org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit // Paper - Incremental Auto Saving - Only fire event on full save + if (flag) org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit // Paper - Incremental Auto Saving - Only fire event on full save
timings.worldSave.startTiming(); // Paper
+ if (flag || server.serverAutoSave) { // Paper
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.a("Saving level"); iprogressupdate.a("Saving level");
} }
@@ -1027,6 +1028,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
- this.a();
+ if (flag || server.serverAutoSave) this.a(); // Paper
if (iprogressupdate != null) { if (iprogressupdate != null) {
iprogressupdate.c("Saving chunks"); iprogressupdate.c("Saving chunks");
} }
+ } // Paper
timings.worldSaveChunks.startTiming(); // Paper
chunkproviderserver.a(flag);
-- --
2.10.1 2.10.1

View File

@ -1,4 +1,4 @@
From 115f50ab9b7570f7a78ad397d5bf5fe6fce2840b Mon Sep 17 00:00:00 2001 From 2341f19c681ecd15a3326ba292a20828b9685bae Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 26 Sep 2016 01:51:30 -0400 Date: Mon, 26 Sep 2016 01:51:30 -0400
Subject: [PATCH] Disable Vanilla Chunk GC Subject: [PATCH] Disable Vanilla Chunk GC
@ -6,26 +6,26 @@ Subject: [PATCH] Disable Vanilla Chunk GC
Bukkit has its own system for this. Bukkit has its own system for this.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9e38304..7c91625 100644 index 81712ff..5c07180 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1029,7 +1029,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1034,7 +1034,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.a(flag); chunkproviderserver.a(flag);
timings.worldSaveChunks.stopTiming(); // Paper
// CraftBukkit - ArrayList -> Collection // CraftBukkit - ArrayList -> Collection
- Collection arraylist = chunkproviderserver.a(); - Collection arraylist = chunkproviderserver.a();
+ /* //Paper start Collection arraylist = chunkproviderserver.a(); + /* //Paper start Collection arraylist = chunkproviderserver.a();
Iterator iterator = arraylist.iterator(); Iterator iterator = arraylist.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -1038,7 +1038,8 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -1043,7 +1043,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) { if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) {
chunkproviderserver.unload(chunk); chunkproviderserver.unload(chunk);
} }
- } - }
+ }*/ + }*/
+ // Paper end + // Paper end
timings.worldSave.stopTiming(); // Paper
} }
} }
-- --