summaryrefslogtreecommitdiffstats
path: root/nms-patches/WorldServer.patch
diff options
context:
space:
mode:
authorAntony Riley <antony@cyberiantiger.org>2014-12-10 18:45:44 +0200
committerAntony Riley <antony@cyberiantiger.org>2014-12-10 18:45:44 +0200
commit88366173d8281e8a7c6f6464f5784cdfdf87ee2b (patch)
tree9b3f160e7ab6f99645cd1cd8255b66e553a11d65 /nms-patches/WorldServer.patch
parent262c7779fe1193489e27b48cbc3800bfa4f3f1ab (diff)
downloadcraftbukkit-88366173d8281e8a7c6f6464f5784cdfdf87ee2b.tar
craftbukkit-88366173d8281e8a7c6f6464f5784cdfdf87ee2b.tar.gz
craftbukkit-88366173d8281e8a7c6f6464f5784cdfdf87ee2b.tar.lz
craftbukkit-88366173d8281e8a7c6f6464f5784cdfdf87ee2b.tar.xz
craftbukkit-88366173d8281e8a7c6f6464f5784cdfdf87ee2b.zip
SPIGOT-169: Save level.dat for non-primary worlds.
Diffstat (limited to 'nms-patches/WorldServer.patch')
-rw-r--r--nms-patches/WorldServer.patch25
1 files changed, 15 insertions, 10 deletions
diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch
index 579f5f93..61fce35e 100644
--- a/nms-patches/WorldServer.patch
+++ b/nms-patches/WorldServer.patch
@@ -1,5 +1,5 @@
---- ../decompile-8eb82bde//net/minecraft/server/WorldServer.java 2014-12-03 14:34:52.705563806 -0500
-+++ src/main/java/net/minecraft/server/WorldServer.java 2014-12-03 14:34:43.665563938 -0500
+--- /home/antony/work/spigot-BuildTools/work/decompile-8eb82bde//net/minecraft/server/WorldServer.java 2014-12-10 18:45:26.490705797 +0200
++++ src/main/java/net/minecraft/server/WorldServer.java 2014-12-10 18:45:11.770706183 +0200
@@ -16,6 +16,20 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -445,20 +445,25 @@
this.checkSession();
this.worldData.a(this.af().h());
this.worldData.d(this.af().f());
-@@ -692,7 +905,11 @@
+@@ -691,8 +904,15 @@
+ this.worldData.k(this.af().p());
this.worldData.b(this.af().j());
this.worldData.e(this.af().i());
- this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().u());
+- this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().u());
- this.worldMaps.a();
+ // CraftBukkit start - save worldMaps once, rather than once per shared world
++ // Only save players for the primary world.
+ if (!(this instanceof SecondaryWorldServer)) {
+ this.worldMaps.a();
++ this.dataManager.saveWorldData(this.worldData);
++ } else {
++ this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().u());
+ }
+ // CraftBukkit end
}
protected void a(Entity entity) {
-@@ -724,8 +941,16 @@
+@@ -724,8 +944,16 @@
}
public boolean strikeLightning(Entity entity) {
@@ -476,7 +481,7 @@
return true;
} else {
return false;
-@@ -737,10 +962,20 @@
+@@ -737,10 +965,20 @@
}
public Explosion createExplosion(Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) {
@@ -497,7 +502,7 @@
if (!flag1) {
explosion.clearBlocks();
}
-@@ -786,7 +1021,8 @@
+@@ -786,7 +1024,8 @@
BlockActionData blockactiondata = (BlockActionData) iterator.next();
if (this.a(blockactiondata)) {
@@ -507,7 +512,7 @@
}
}
-@@ -809,6 +1045,7 @@
+@@ -809,6 +1048,7 @@
boolean flag = this.S();
super.p();
@@ -515,7 +520,7 @@
if (this.o != this.p) {
this.server.getPlayerList().a(new PacketPlayOutGameStateChange(7, this.p), this.worldProvider.getDimension());
}
-@@ -827,7 +1064,21 @@
+@@ -827,7 +1067,21 @@
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.p));
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.r));
}
@@ -538,7 +543,7 @@
}
protected int q() {
-@@ -855,10 +1106,17 @@
+@@ -855,10 +1109,17 @@
}
public void a(EnumParticle enumparticle, boolean flag, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, int... aint) {