mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Correctly skip pathfinder ticks for inactive entities (#5085)
Fixes #5083
This commit is contained in:
parent
bf5118006b
commit
637e21957f
1 changed files with 2 additions and 6 deletions
|
@ -303,12 +303,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public boolean inactiveTick() {
|
+ public boolean inactiveTick() {
|
||||||
+ if (getCurRate() % getTickRate() != 0) {
|
+ incRate();
|
||||||
+ incRate();
|
+ return getCurRate() % getTickRate() == 0;
|
||||||
+ return false;
|
|
||||||
+ } else {
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+ }
|
+ }
|
||||||
+ public boolean hasTasks() {
|
+ public boolean hasTasks() {
|
||||||
+ for (PathfinderGoalWrapped task : getTasks()) {
|
+ for (PathfinderGoalWrapped task : getTasks()) {
|
||||||
|
|
Loading…
Reference in a new issue