mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-23 11:06:51 +01:00
5f55124016
This update had major internal changes, which took us 8 hours to figure out and resolve all things untill we have a successful build. YatopiaMC members wish you happy playing using Yatopia for your server software MAKE A BACKUP OF YOUR WORLD BEFORE RUNNING IT ON YOUR SERVER. YOU HAVE BEEN WARNED. People have reported to paper that after upgrading villagers are gone. There could be even more issues we are unknown of. MAKE A BACKUP OF YOUR WORLD BEFORE RUNNING IT ON YOUR SERVER. YOU HAVE BEEN WARNED. Co-authored-by: Ovydux <68059159+Ovydux@users.noreply.github.com> Co-authored-by: Simon Gardling <Titaniumtown@gmail.com> Co-authored-by: budgidiere <sgidiere@gmail.com>
32 lines
2.2 KiB
Diff
32 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: JellySquid <jellysquid+atwork@protonmail.com>
|
|
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..9be854ebef1eb23ee4cc5d733e43dfca7d6439f7 100644
|
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
|
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
|
|
@@ -11,6 +11,7 @@ import java.util.function.Supplier;
|
|
import java.util.stream.Stream;
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
+import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet; // Yatopia
|
|
|
|
public class PathfinderGoalSelector {
|
|
|
|
@@ -27,7 +28,7 @@ public class PathfinderGoalSelector {
|
|
}
|
|
};
|
|
private final Map<PathfinderGoal.Type, PathfinderGoalWrapped> c = new EnumMap(PathfinderGoal.Type.class);
|
|
- private final Set<PathfinderGoalWrapped> d = Sets.newLinkedHashSet(); public final Set<PathfinderGoalWrapped> getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public
|
|
+ private final Set<PathfinderGoalWrapped> d = new ObjectLinkedOpenHashSet<>();/* Yatopia better set */ public final Set<PathfinderGoalWrapped> getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public
|
|
private final Supplier<GameProfilerFiller> e;
|
|
private final EnumSet<PathfinderGoal.Type> 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<PathfinderGoal.Type> goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector
|