mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
chore: cleanup annotations in api adventure patch
This commit is contained in:
@@ -74,26 +74,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- this.availableGoals.removeIf((wrappedGoal) -> {
|
||||
- return wrappedGoal.getGoal() == goal;
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- private static boolean goalContainsAnyFlags(WrappedGoal goal, EnumSet<Goal.Flag> controls) {
|
||||
- for(Goal.Flag flag : goal.getFlags()) {
|
||||
- if (controls.contains(flag)) {
|
||||
- return true;
|
||||
+ // Paper start - remove streams from pathfindergoalselector
|
||||
+ for (java.util.Iterator<WrappedGoal> iterator = this.availableGoals.iterator(); iterator.hasNext();) {
|
||||
+ WrappedGoal goalWrapped = iterator.next();
|
||||
+ if (goalWrapped.getGoal() != goal) {
|
||||
+ continue;
|
||||
}
|
||||
+ }
|
||||
+ if (goalWrapped.isRunning()) {
|
||||
+ goalWrapped.stop();
|
||||
+ }
|
||||
+ iterator.remove();
|
||||
}
|
||||
+ }
|
||||
+ // Paper end - remove streams from pathfindergoalselector
|
||||
+ }
|
||||
}
|
||||
|
||||
- private static boolean goalContainsAnyFlags(WrappedGoal goal, EnumSet<Goal.Flag> controls) {
|
||||
- for(Goal.Flag flag : goal.getFlags()) {
|
||||
- if (controls.contains(flag)) {
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return false;
|
||||
+ private static boolean goalContainsAnyFlags(WrappedGoal goal, com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<Goal.Flag> controls) {
|
||||
+ return goal.getFlags().hasCommonElements(controls); // Paper
|
||||
|
Reference in New Issue
Block a user