Updated Upstream (Pufferfish)

Upstream has released updates that appear to apply and compile correctly

Pufferfish Changes:
pufferfish-gg/Pufferfish@3920961 Fix stupidity
This commit is contained in:
Encode42
2022-01-05 14:48:58 -05:00
parent 72f17d72b6
commit 29b24bca6a
2 changed files with 3 additions and 22 deletions

View File

@@ -2799,20 +2799,20 @@ index 43378561cf48f969f5bf1fd0db349415f4d1c866..2c988e05299d530d483e21ab452de0a0
}
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 031660f7d0ea270f87e5174a4fe65ccad1f7a561..06e87f3564bfba17393f36d2188abfd2ee9ac650 100644
index 031660f7d0ea270f87e5174a4fe65ccad1f7a561..35ff7abd8251b0af6c23fbb63804db632ec5b85d 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -206,14 +206,16 @@ public abstract class Mob extends LivingEntity {
return this.lookControl;
}
+ int tickCount = 0; // Pufferfish - throttle inactive goal selector ticking
+ int _pufferfish_inactiveTickDisableCounter = 0; // Pufferfish - throttle inactive goal selector ticking
// Paper start
@Override
public void inactiveTick() {
super.inactiveTick();
- if (this.goalSelector.inactiveTick()) {
+ boolean isThrottled = gg.pufferfish.pufferfish.PufferfishConfig.throttleInactiveGoalSelectorTick && tickCount++ % 20 != 0; // Pufferfish - throttle inactive goal selector ticking
+ boolean isThrottled = gg.pufferfish.pufferfish.PufferfishConfig.throttleInactiveGoalSelectorTick && _pufferfish_inactiveTickDisableCounter++ % 20 != 0; // Pufferfish - throttle inactive goal selector ticking
+ if (this.goalSelector.inactiveTick(this.activatedPriority, true) && !isThrottled) { // Pufferfish - pass activated priroity // Pufferfish - throttle inactive goal selector ticking
this.goalSelector.tick();
}