+ PathfinderExecutor 工具 controllerLookAt(LivingEntity entity, Entity target) 方法无法使用的问题已修复
+ PathfinderExecutor 工具新增四个关于寻路的方法:
  + setPathEntity(LivingEntity entity, Object pathEntity)
  + navigationMove(LivingEntity entity, LivingEntity target, double speed)
  + navigationMove(LivingEntity entity, LivingEntity target)
  + setFollowRange(LivingEntity entity, double value)
This commit is contained in:
坏黑
2018-09-25 15:26:10 +08:00
parent c19590ab1f
commit 038135733b
3 changed files with 71 additions and 14 deletions

View File

@@ -0,0 +1,24 @@
package me.skymc.taboolib.common.util;
/**
* @Author sky
* @Since 2018-09-25 15:21
*/
public class SimpleCounter {
private int timer;
private int limit;
public SimpleCounter(int limit) {
this.timer = 0;
this.limit = limit;
}
public boolean next() {
if (--timer <= 0) {
timer = limit;
return true;
}
return false;
}
}