aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0407-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0407-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch')
-rw-r--r--patches/server/0407-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch10
1 files changed, 4 insertions, 6 deletions
diff --git a/patches/server/0407-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch b/patches/server/0407-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch
index cf3d7a4259..ff901ed478 100644
--- a/patches/server/0407-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch
+++ b/patches/server/0407-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch
@@ -9,10 +9,10 @@ itself, so the criterion object stores no references - and thus
needs no cleanup.
diff --git a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
-index 4e6d623de07bf1741050a9e899b85cd6c0efcaa0..670e59432979740caf283d839c2f42c9748fe215 100644
+index 9a387d5dc0925304d4163e3caa22206aaa68e3b7..795d1f3e6065baee4cadf71ae0eeabfa5522199b 100644
--- a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
+++ b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java
-@@ -15,34 +15,34 @@ import net.minecraft.server.level.ServerPlayer;
+@@ -15,32 +15,32 @@ import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.level.storage.loot.LootContext;
public abstract class SimpleCriterionTrigger<T extends SimpleCriterionTrigger.SimpleInstance> implements CriterionTrigger<T> {
@@ -21,10 +21,8 @@ index 4e6d623de07bf1741050a9e899b85cd6c0efcaa0..670e59432979740caf283d839c2f42c9
@Override
public final void addPlayerListener(PlayerAdvancements manager, CriterionTrigger.Listener<T> conditions) {
-- this.players.computeIfAbsent(manager, managerx -> {
-+ manager.criterionData.computeIfAbsent(this, managerx -> { // Paper - fix AdvancementDataPlayer leak
- return Sets.newHashSet();
- }).add(conditions);
+- this.players.computeIfAbsent(manager, managerx -> Sets.newHashSet()).add(conditions);
++ manager.criterionData.computeIfAbsent(this, managerx -> Sets.newHashSet()).add(conditions);
}
@Override