diff --git a/nms-patches/SecondaryWorldServer.patch b/nms-patches/SecondaryWorldServer.patch index 4cbd0717cd..9cd69d5a86 100644 --- a/nms-patches/SecondaryWorldServer.patch +++ b/nms-patches/SecondaryWorldServer.patch @@ -1,6 +1,6 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/SecondaryWorldServer.java 2014-11-28 17:43:43.369707429 +0000 -+++ src/main/java/net/minecraft/server/SecondaryWorldServer.java 2014-11-28 17:38:18.000000000 +0000 -@@ -4,8 +4,10 @@ +--- /home/antony/work/spigot-BuildTools/work/decompile-8eb82bde//net/minecraft/server/SecondaryWorldServer.java 2014-12-03 12:27:34.906671655 +0200 ++++ src/main/java/net/minecraft/server/SecondaryWorldServer.java 2014-12-10 18:20:15.598416391 +0200 +@@ -4,13 +4,15 @@ private WorldServer a; @@ -13,3 +13,9 @@ this.a = worldserver; worldserver.af().a((IWorldBorderListener) (new SecondaryWorldServerInnerClass1(this))); } + +- protected void a() {} ++ // protected void a() {} // CraftBukkit + + public World b() { + this.worldMaps = this.a.T(); diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index 579f5f93f8..61fce35e64 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) {