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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
evalPos
(EntityIntelligent entity, Vector3 pos) 返回目标坐标是否可以作为路径点,通常用于返回非整数坐标点(飞行和游泳)的实体
如果此使用此评估器的寻路器返回非整数坐标点,才需要实现此方法。boolean
evalStandingBlock
(EntityIntelligent entity, Block block) 返回此方块是否可以作为脚下站立的方块,通常用于返回整数坐标点(行走)的实体
如果此使用此评估器的寻路器只返回整数坐标点,才需要实现此方块。protected boolean
isPassable
(EntityIntelligent entity, Vector3 vector3) 指定实体在指定坐标上能否不发生碰撞 对于空间中的移动做了特别的优化
-
Constructor Details
-
SwimmingPosEvaluator
public SwimmingPosEvaluator()
-
-
Method Details
-
evalPos
Description copied from interface:IPosEvaluator
返回目标坐标是否可以作为路径点,通常用于返回非整数坐标点(飞行和游泳)的实体
如果此使用此评估器的寻路器返回非整数坐标点,才需要实现此方法。- Specified by:
evalPos
in interfaceIPosEvaluator
- Parameters:
entity
- 目标实体pos
- 评估坐标- Returns:
- 是否可以作为路径点
-
evalStandingBlock
Description copied from interface:IPosEvaluator
返回此方块是否可以作为脚下站立的方块,通常用于返回整数坐标点(行走)的实体
如果此使用此评估器的寻路器只返回整数坐标点,才需要实现此方块。- Specified by:
evalStandingBlock
in interfaceIPosEvaluator
- Parameters:
entity
- 目标实体block
- 评估方块- Returns:
- 是否可以作为脚下站立的方块
-
isPassable
指定实体在指定坐标上能否不发生碰撞 对于空间中的移动做了特别的优化
-