Yatopia/patches/server/0015-lithium-MixinGoalSelector.patch

32 lines
2.2 KiB
Diff
Raw Normal View History

2020-07-17 18:05:50 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
[WIP] Better Patch System (#18) * Update build.yml * Remove 3rd party patches * Add Upsteam Submodules * Fix patches * ? * Fix patches * Add Fast Init script * Lots of stuff also it's broke * more broken * fixes * mor stuff * gfhfgh hg * fix patch * fix up script * update submodule * add papercut * update tuinity * update gitmodules * fix var name * fix more var stuff * some how it's not deleting shit anymore * should now use the branch it just made why are we doing this again? * now it does thing thing * return previous so YAPFA can use it * ok now it really does the thing * for REAL it does the thing * don't do the thing because it causes too many problems * fix api * work * use better patching for YAPFA patches * fix better patching * more fixes * new patches stuff * remove old 3rd parry patches add removed akarin patches * make new branch for making patches * hopefully build patches correctly * fix gitignore and add config patches * remove papercut files * fix some weirdness * fix bug * time to do some fixin' :eyes: * New Patch System Rebased Patches * fix full build * exit 1 * fix * Remove patch * Hopefully fix compile errors * fixes * this might work * don't use rej for our patches * tmp disable cache * some times case sensitivity is dumb * my sanity is at an all time low :) * dfg * readd cahce * fix? * Update Upstream * fix perms * fix * fix api * Redo API * rm folders * fix villager brain patch * emc explosion pref * fixed aikar's shit * betterfix * fix lagggg * Origami * Origami Fixes * Update readme * test async path finding * WIP Async Path Finding * WIP fix async path finding * same as bellow * same * update to newer funcs * fix newer funcs * fix author * Updates, Fixes, and new patches * fixes * possibly async flying path finding * minor asnyc pathfinding fix * test remove non asnyc path finder * WIP make all path finding async * Rename everything * Exec flag * Rebuild hashes * remove dupe patch * fix? * Fix packages, redirect config * old nav class is now async and back * add getchatcolor.getbyid and handle patches with a . in them better Co-authored-by: tr7zw <tr7zw@live.de> Co-authored-by: Unknown <unknown@example.com> Co-authored-by: Ovydux <68059159+Ovydux@users.noreply.github.com>
2020-08-03 18:48:42 +02:00
From: JellySquid <jellysquid+atwork@protonmail.com>
2020-06-27 19:00:18 +02:00
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
2020-08-06 23:02:30 +02:00
you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.16.x/fabric (Yarn mappings)
2020-06-27 19:00:18 +02:00
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
Updated Upstream and Sidestream(s) (Tuinity/Akarin/Purpur) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: ff785fc Updated Upstream (Paper) Akarin Changes: 2dab0a4 Removed gradle 72e3c4a Update README.md bbad638 Update README.md bbdea8e Update Jenkinsfile bb9db8b Updated tuinity to spottedleaf repo 6961481 Updated Tuinity branch de97830 Updated Tuinity 62d4b43 Update SUPPORT.md 21fffd0 Update README.md 4bd120b Merge pull request #186 from adsa562/patch-1 1f8eccf add demo server 630ea72 Updated Tuinity 59fae5a Made 1.15.2 build again bd703ba Allowed building for dirs that have spaces a339866 Update SUPPORT.md db61690 stated that it is not a bedrock server software df7efd2 Added Jenkinsfile 75b7f13 removed broken patch 19387b2 Updated Artifacts URL c5a7778 fixed build 3abf7a7 Fixed Initialize step 2d3ea37 Updated Tuinity and Paper 220d1b8 Removed patch 0019 - breaks upstream 1ccf615 Added tuinity branch to gitmodules c5e73c7 Updated Upstream (Tuinity) 3cd947f Updated Upstream (Tuinity) 14df550 cleanup scripts/importSources.sh 49d9af7 revert a broken patch 630492a revert a broken patch cb5ea51 Fixed build failure 826c0f0 Updated 1.15.2 jenkinsfile to 1.16.1 574b206 Update SUPPORT.md 90e3f89 Update SUPPORT.md c2a5f66 fix b30241b fix 4e06aea fix 284809b 1.16.1 Purpur Changes: 096971d Rename kelp/vines options to make more sense 8ea89f9 Fix broken methods in purpur config c505cf7 Updated Upstream (Paper) 695f3ac Add configurable snowball damage 2d04fb5 Updated Upstream (Paper) badfd60 Rebuild patches f3aff1b Merge branch 'ver/1.16.4' of github.com:pl3xgaming/Purpur into ver/1.16.4 cfcf7d7 Add critical hit check to EntityDamagedByEntityEvent 0b48c6c Add config for allowing Endermen to despawn even while holding a block 1349e72 Updated Upstream (Tuinity) 651105e Kelp weeping and twisting vines configurable max length 058399c Updated Upstream (Tuinity) 3e0a758 Add twisting and weeping vines growth rates
2020-11-26 10:52:33 +01:00
index d3f0327a2a7cdedf3fe8d10df981a9f1cb378d26..fdf9d407f3f1d9aabcd835ed868391c6658eaae0 100644
2020-06-27 19:00:18 +02:00
--- 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 {
2020-06-27 19:00:18 +02:00
}
};
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
2020-06-27 19:00:18 +02:00
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