From a327d9f1da49d0ede770894d83e33d10fb6c19fd Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 8 Jul 2016 10:55:51 +1000 Subject: [PATCH] SPIGOT-2504: Save structure info for secondary worlds --- nms-patches/WorldServer.patch | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index 5629062e84..a130ece4eb 100644 --- a/nms-patches/WorldServer.patch +++ b/nms-patches/WorldServer.patch @@ -513,21 +513,7 @@ this.worldData.a(this.getWorldBorder().getSize()); this.worldData.d(this.getWorldBorder().getCenterX()); this.worldData.c(this.getWorldBorder().getCenterZ()); -@@ -809,8 +1047,12 @@ - this.worldData.k(this.getWorldBorder().getWarningTime()); - this.worldData.b(this.getWorldBorder().j()); - this.worldData.e(this.getWorldBorder().i()); -+ // CraftBukkit start - save worldMaps once, rather than once per shared world -+ if (!(this instanceof SecondaryWorldServer)) { -+ this.worldMaps.a(); -+ } - this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t()); -- this.worldMaps.a(); -+ // CraftBukkit end - } - - public boolean addEntity(Entity entity) { -@@ -834,7 +1076,7 @@ +@@ -834,7 +1072,7 @@ private boolean i(Entity entity) { if (entity.dead) { @@ -536,7 +522,7 @@ return false; } else { UUID uuid = entity.getUniqueID(); -@@ -846,7 +1088,7 @@ +@@ -846,7 +1084,7 @@ this.f.remove(entity1); } else { if (!(entity instanceof EntityHuman)) { @@ -545,7 +531,7 @@ return false; } -@@ -899,8 +1141,16 @@ +@@ -899,8 +1137,16 @@ } public boolean strikeLightning(Entity entity) { @@ -563,7 +549,7 @@ return true; } else { return false; -@@ -916,10 +1166,20 @@ +@@ -916,10 +1162,20 @@ } public Explosion createExplosion(@Nullable Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) { @@ -584,7 +570,7 @@ if (!flag1) { explosion.clearBlocks(); } -@@ -965,7 +1225,8 @@ +@@ -965,7 +1221,8 @@ BlockActionData blockactiondata = (BlockActionData) iterator.next(); if (this.a(blockactiondata)) { @@ -594,7 +580,7 @@ } } -@@ -988,6 +1249,7 @@ +@@ -988,6 +1245,7 @@ boolean flag = this.W(); super.t(); @@ -602,7 +588,7 @@ if (this.n != this.o) { this.server.getPlayerList().a((Packet) (new PacketPlayOutGameStateChange(7, this.o)), this.worldProvider.getDimensionManager().getDimensionID()); } -@@ -1006,6 +1268,21 @@ +@@ -1006,6 +1264,21 @@ this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.o)); this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.q)); } @@ -624,7 +610,7 @@ } -@@ -1035,10 +1312,20 @@ +@@ -1035,10 +1308,20 @@ } 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) {