From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: JellySquid Date: Mon, 11 May 2020 22:07:17 +0200 Subject: [PATCH] lithium MixinGoalSelector Only replaces the set type, might want to also port the logic rewrite in the future Original code by JellySquid, licensed under GNU Lesser General Public License v3.0 you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.16.x/fabric (Yarn mappings) diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java index b783028e5526df722d98e4760ffb214d5d2f83dd..0ad38a7b426b8b1e0ae8a98a2cb5b28878ae1249 100644 --- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java +++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java @@ -27,7 +27,7 @@ public class PathfinderGoalSelector { } }; private final Map c = new EnumMap(PathfinderGoal.Type.class); - private final Set d = Sets.newLinkedHashSet(); public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public + private final Set d = new it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet<>();/* Yatopia better set */ public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public private final Supplier e; private final EnumSet f = EnumSet.noneOf(PathfinderGoal.Type.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. private final OptimizedSmallEnumSet goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector