mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-26 01:43:51 -07:00
Move around patches again
This commit is contained in:
@@ -6,8 +6,6 @@ Subject: [PATCH] Optimize GoalSelector Goal.Flag Set operations
|
||||
Optimise the stream.anyMatch statement to move to a bitset
|
||||
where we can replace the call with a single bitwise operation.
|
||||
|
||||
Feature patch
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java b/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java
|
||||
@@ -58,7 +56,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper end - remove streams from pathfindergoalselector
|
||||
}
|
||||
|
||||
protected int adjustedTickDelay(int ticks) {
|
||||
// Paper start - Mob Goal API
|
||||
public boolean hasFlag(final Goal.Flag flag) {
|
||||
- return this.flags.contains(flag);
|
||||
+ return this.goalTypes.hasElement(flag);
|
||||
}
|
||||
|
||||
public void addFlag(final Goal.Flag flag) {
|
||||
- this.flags.add(flag);
|
||||
+ this.goalTypes.addUnchecked(flag);
|
||||
}
|
||||
// Paper end - Mob Goal API
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
|
Reference in New Issue
Block a user