3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

ChunkMapDistance-CME

Dieser Commit ist enthalten in:
Shane Freeder 2019-05-29 04:25:08 +01:00
Ursprung eb5951cd1c
Commit c605be20c7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
3 geänderte Dateien mit 81 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 6608e2ef74ee495cca724bfe80cc943c33981653 Mon Sep 17 00:00:00 2001
From cf11aafeb1a4dbcca311cf32504a70ae4dfed163 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
@ -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
@@ -79,7 +79,7 @@ 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);
@@ -143,7 +143,7 @@ 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));
});
});
@@ -367,7 +367,7 @@ 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);
@@ -376,7 +376,7 @@ 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

Datei anzeigen

@ -1,4 +1,4 @@
From ac63e7e69a76ece9487793c7fd88d96c54d51f9e Mon Sep 17 00:00:00 2001
From f35d09dad58c40e66449cc78b81e80771c5f46c8 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Mon, 27 May 2019 17:35:39 -0500
Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative
@ -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
@@ -163,6 +163,12 @@ public class EntityAreaEffectCloud extends Entity {
@ -40,5 +40,5 @@ index 418c638d3..2eaed1cd6 100644
this.setRadius(f);
}
--
2.20.1
2.21.0

Datei anzeigen

@ -0,0 +1,37 @@
From f48fe8c4496fd1625f481df4d088f8938dde05c3 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
@@ -39,7 +39,7 @@ 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;
@@ -117,8 +117,12 @@ 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();
--
2.21.0