mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 06:02:12 -07:00
ChunkMapDistance-CME
This commit is contained in:
35
Spigot-Server-Patches/ChunkMapDistance-CME.patch
Normal file
35
Spigot-Server-Patches/ChunkMapDistance-CME.patch
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||||||
|
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<PlayerChunk> k = Sets.newHashSet();
|
||||||
|
+ private Set<PlayerChunk> k = Sets.newHashSet(); // Paper - -final
|
||||||
|
private final PlayerChunk.c l;
|
||||||
|
private final Mailbox<ChunkTaskQueueSorter.a<Runnable>> m;
|
||||||
|
private final Mailbox<ChunkTaskQueueSorter.b> n;
|
||||||
|
@@ -0,0 +0,0 @@ public abstract class ChunkMapDistance {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!this.k.isEmpty()) {
|
||||||
|
- this.k.forEach((playerchunk) -> {
|
||||||
|
+ // Paper start
|
||||||
|
+ Set<PlayerChunk> currentPending = this.k;
|
||||||
|
+ this.k = Sets.newHashSet();
|
||||||
|
+ if (!currentPending.isEmpty()) {
|
||||||
|
+ currentPending.forEach((playerchunk) -> {
|
||||||
|
+ // Paper end
|
||||||
|
playerchunk.a(playerchunkmap);
|
||||||
|
});
|
||||||
|
this.k.clear();
|
||||||
|
--
|
@@ -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
|
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
|
--- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
|
||||||
+++ b/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 {
|
@@ -0,0 +0,0 @@ public class EntityAreaEffectCloud extends Entity {
|
||||||
|
@@ -108,6 +108,46 @@ index b4c8722f04..59d86fc66e 100644
|
|||||||
String s1 = ((INamable) t0).getName();
|
String s1 = ((INamable) t0).getName();
|
||||||
|
|
||||||
if (this.b.containsKey(s1)) {
|
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<ObjectSortedSet<Ticket<?>>> 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
|
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
index c973ab6076..30701fd7f3 100644
|
index c973ab6076..30701fd7f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
|
Reference in New Issue
Block a user