Class FlyingPosEvaluator

java.lang.Object
cn.nukkit.entity.ai.route.posevaluator.FlyingPosEvaluator
All Implemented Interfaces:
IPosEvaluator

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public class FlyingPosEvaluator extends Object implements IPosEvaluator
  • Constructor Details

    • FlyingPosEvaluator

      public FlyingPosEvaluator()
  • Method Details

    • evalPos

      public boolean evalPos(@NotNull EntityIntelligent entity, @NotNull Vector3 vec)
      Description copied from interface: IPosEvaluator
      返回目标坐标是否可以作为路径点,通常用于返回非整数坐标点(飞行和游泳)的实体
      如果此使用此评估器的寻路器返回非整数坐标点,才需要实现此方法。

      Returns whether the target coordinates can be used as a waypoint, usually used for entities that return non-integer coordinates (flying and swimming)
      Only need to implement this method if the pathfinder using this evaluator returns non-integer coordinates.

      Specified by:
      evalPos in interface IPosEvaluator
      Parameters:
      entity - 目标实体
      vec - 评估坐标
      Returns:
      是否可以作为路径点
    • isPassable

      protected boolean isPassable(EntityIntelligent entity, Vector3 vector3)
      指定实体在指定坐标上能否不发生碰撞 对于空间中的移动做了特别的优化