diff --git a/Spigot-Server-Patches/ChunkMapDistance-CME.patch b/Spigot-Server-Patches/ChunkMapDistance-CME.patch new file mode 100644 index 0000000000..bcf0ae3e5a --- /dev/null +++ b/Spigot-Server-Patches/ChunkMapDistance-CME.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Wed, 29 May 2019 04:01:22 +0100 +Subject: [PATCH] ChunkMapDistance CME + + +diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java +index ba4b9fa59c..d3c2ad3c40 100644 +--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java ++++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java +@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { + private int entitydistance; + private final ChunkMapDistance.b i = new ChunkMapDistance.b(8); + private final ChunkMapDistance.d j = new ChunkMapDistance.d(33); +- private final Set k = Sets.newHashSet(); ++ private Set k = Sets.newHashSet(); // Paper - -final + private final PlayerChunk.c l; + private final Mailbox> m; + private final Mailbox n; +@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { + ; + } + +- if (!this.k.isEmpty()) { +- this.k.forEach((playerchunk) -> { ++ // Paper start ++ Set currentPending = this.k; ++ this.k = Sets.newHashSet(); ++ if (!currentPending.isEmpty()) { ++ currentPending.forEach((playerchunk) -> { ++ // Paper end + playerchunk.a(playerchunkmap); + }); + this.k.clear(); +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch b/Spigot-Server-Patches/MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch index b4b04722de..5937fda11b 100644 --- a/Spigot-Server-Patches/MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch +++ b/Spigot-Server-Patches/MC-114618-Fix-EntityAreaEffectCloud-from-going-negat.patch @@ -6,7 +6,7 @@ Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative diff --git a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java -index 418c638d3..2eaed1cd6 100644 +index 418c638d31..2eaed1cd63 100644 --- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java +++ b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java @@ -0,0 +0,0 @@ public class EntityAreaEffectCloud extends Entity { diff --git a/Spigot-Server-Patches/MC-Dev-fixes.patch b/Spigot-Server-Patches/MC-Dev-fixes.patch index edbc36415f..e9052feeec 100644 --- a/Spigot-Server-Patches/MC-Dev-fixes.patch +++ b/Spigot-Server-Patches/MC-Dev-fixes.patch @@ -108,6 +108,46 @@ index b4c8722f04..59d86fc66e 100644 String s1 = ((INamable) t0).getName(); if (this.b.containsKey(s1)) { +diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java +index ebfc588539..ba4b9fa59c 100644 +--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java ++++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java +@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { + while (objectiterator.hasNext()) { + Entry>> entry = (Entry) objectiterator.next(); + +- if (((ObjectSortedSet) entry.getValue()).removeIf((ticket) -> { ++ if ((entry.getValue()).removeIf((ticket) -> { // Paper - decompile fix + return ticket.a(this.currentTick); + })) { + this.f.b(entry.getLongKey(), this.a((ObjectSortedSet) entry.getValue()), false); +@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { + + completablefuture.thenAccept((either) -> { + this.p.execute(() -> { +- this.n.a((Object) ChunkTaskQueueSorter.a(() -> { ++ this.n.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix + }, j, false)); + }); + }); +@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { + Ticket ticket = new Ticket<>(TicketType.PLAYER, ChunkMapDistance.b, new ChunkCoordIntPair(i), ChunkMapDistance.this.currentTick); + + if (flag1) { +- ChunkMapDistance.this.m.a((Object) ChunkTaskQueueSorter.a(() -> { ++ ChunkMapDistance.this.m.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix + ChunkMapDistance.this.p.execute(() -> { + ChunkMapDistance.this.a(i, ticket); + ChunkMapDistance.this.o.add(i); +@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance { + return j; + })); + } else { +- ChunkMapDistance.this.n.a((Object) ChunkTaskQueueSorter.a(() -> { ++ ChunkMapDistance.this.n.a(ChunkTaskQueueSorter.a(() -> { // Paper - decompile fix + ChunkMapDistance.this.p.execute(() -> { + ChunkMapDistance.this.b(i, ticket); + }); diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java index c973ab6076..30701fd7f3 100644 --- a/src/main/java/net/minecraft/server/ChunkSection.java