Class SwimmingPosEvaluator

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

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public class SwimmingPosEvaluator extends Object implements IPosEvaluator
用于游泳实体的坐标评估器
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    返回目标坐标是否可以作为路径点,通常用于返回非整数坐标点(飞行和游泳)的实体
    如果此使用此评估器的寻路器返回非整数坐标点,才需要实现此方法。
    boolean
    返回此方块是否可以作为脚下站立的方块,通常用于返回整数坐标点(行走)的实体
    如果此使用此评估器的寻路器只返回整数坐标点,才需要实现此方块。
    protected boolean
    指定实体在指定坐标上能否不发生碰撞 对于空间中的移动做了特别的优化

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SwimmingPosEvaluator

      public SwimmingPosEvaluator()
  • Method Details

    • evalPos

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

      public boolean evalStandingBlock(@NotNull EntityIntelligent entity, @NotNull Block block)
      Description copied from interface: IPosEvaluator
      返回此方块是否可以作为脚下站立的方块,通常用于返回整数坐标点(行走)的实体
      如果此使用此评估器的寻路器只返回整数坐标点,才需要实现此方块。
      Specified by:
      evalStandingBlock in interface IPosEvaluator
      Parameters:
      entity - 目标实体
      block - 评估方块
      Returns:
      是否可以作为脚下站立的方块
    • isPassable

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