Class WalkingPosEvaluator
java.lang.Object
cn.nukkit.entity.ai.route.posevaluator.WalkingPosEvaluator
- All Implemented Interfaces:
IPosEvaluator
@PowerNukkitXOnly
@Since("1.6.0.0-PNX")
public class WalkingPosEvaluator
extends Object
implements IPosEvaluator
用于标准陆地行走实体的方块评估器
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
evalStandingBlock
(EntityIntelligent entity, Block block) 返回此方块是否可以作为脚下站立的方块,通常用于返回整数坐标点(行走)的实体
如果此使用此评估器的寻路器只返回整数坐标点,才需要实现此方块。protected boolean
isPassable
(EntityIntelligent entity, Vector3 vector3) 指定实体在指定坐标上能否不发生碰撞Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cn.nukkit.entity.ai.route.posevaluator.IPosEvaluator
evalPos
-
Constructor Details
-
WalkingPosEvaluator
public WalkingPosEvaluator()
-
-
Method Details
-
evalStandingBlock
Description copied from interface:IPosEvaluator
返回此方块是否可以作为脚下站立的方块,通常用于返回整数坐标点(行走)的实体
如果此使用此评估器的寻路器只返回整数坐标点,才需要实现此方块。Returns whether this block can be used as a standing block, typically used for entities that return integer coordinates (walking)
Only need to implement this if the pathfinder using this evaluator only returns integer coordinates.- Specified by:
evalStandingBlock
in interfaceIPosEvaluator
- Parameters:
entity
- 目标实体block
- 评估方块- Returns:
- 是否可以作为脚下站立的方块
-
isPassable
指定实体在指定坐标上能否不发生碰撞
-