From 516a408f4a431a0b53cc7f6e24380843a4b90824 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 5 Jan 2019 16:41:02 +1100 Subject: [PATCH] Remove redundant CraftBukkit change for secondary world data The above loop would always save this data --- nms-patches/WorldServer.patch | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index 150e48d272..7ab5f93c49 100644 --- a/nms-patches/WorldServer.patch +++ b/nms-patches/WorldServer.patch @@ -404,20 +404,7 @@ Iterator iterator = list.iterator(); while (iterator.hasNext()) { -@@ -673,6 +876,12 @@ - } - } - -+ // CraftBukkit start - Save secondary data for nether/end -+ if (this instanceof SecondaryWorldServer) { -+ ((SecondaryWorldServer) this).c(); // As above -+ } -+ // CraftBukkit end -+ - this.worldData.a(this.getWorldBorder().getSize()); - this.worldData.d(this.getWorldBorder().getCenterX()); - this.worldData.c(this.getWorldBorder().getCenterZ()); -@@ -687,9 +896,13 @@ +@@ -687,9 +890,13 @@ this.h().a(); } @@ -433,7 +420,7 @@ public void a(Stream stream) { stream.forEach((entity) -> { -@@ -703,7 +916,7 @@ +@@ -703,7 +910,7 @@ private boolean j(Entity entity) { if (entity.dead) { @@ -442,7 +429,7 @@ return false; } else { UUID uuid = entity.getUniqueID(); -@@ -715,7 +928,7 @@ +@@ -715,7 +922,7 @@ this.g.remove(entity1); } else { if (!(entity instanceof EntityHuman)) { @@ -451,7 +438,7 @@ return false; } -@@ -767,9 +980,21 @@ +@@ -767,9 +974,21 @@ } @@ -474,7 +461,7 @@ return true; } else { return false; -@@ -785,6 +1010,14 @@ +@@ -785,6 +1004,14 @@ } public Explosion createExplosion(@Nullable Entity entity, DamageSource damagesource, double d0, double d1, double d2, float f, boolean flag, boolean flag1) { @@ -489,7 +476,7 @@ Explosion explosion = new Explosion(this, entity, d0, d1, d2, f, flag, flag1); if (damagesource != null) { -@@ -793,6 +1026,8 @@ +@@ -793,6 +1020,8 @@ explosion.a(); explosion.a(false); @@ -498,7 +485,7 @@ if (!flag1) { explosion.clearBlocks(); } -@@ -819,7 +1054,8 @@ +@@ -819,7 +1048,8 @@ BlockActionData blockactiondata = (BlockActionData) this.d.removeFirst(); if (this.a(blockactiondata)) { @@ -508,7 +495,7 @@ } } -@@ -840,6 +1076,7 @@ +@@ -840,6 +1070,7 @@ boolean flag = this.isRaining(); super.w(); @@ -516,7 +503,7 @@ if (this.o != this.p) { this.server.getPlayerList().a((Packet) (new PacketPlayOutGameStateChange(7, this.p)), this.worldProvider.getDimensionManager()); } -@@ -858,6 +1095,21 @@ +@@ -858,6 +1089,21 @@ this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.p)); this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.r)); } @@ -538,7 +525,7 @@ } -@@ -891,13 +1143,20 @@ +@@ -891,13 +1137,20 @@ } public int a(T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {