Class NodeEvaluator
java.lang.Object
net.minecraft.world.level.pathfinder.NodeEvaluator
- Direct Known Subclasses:
SwimNodeEvaluator
,WalkNodeEvaluator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected boolean
protected PathfindingContext
protected int
protected int
protected int
protected Mob
protected final it.unimi.dsi.fastutil.ints.Int2ObjectMap
<Node> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canFloat()
boolean
boolean
boolean
void
done()
abstract int
getNeighbors
(Node[] pOutputArray, Node pNode) protected Node
getNode
(int pX, int pY, int pZ) Returns a mapped point or creates and adds oneprotected Node
getPathType
(Mob pMob, BlockPos pPos) abstract PathType
getPathType
(PathfindingContext pContext, int pX, int pY, int pZ) abstract PathType
getPathTypeOfMob
(PathfindingContext pContext, int pX, int pY, int pZ, Mob pMob) abstract Node
getStart()
abstract Target
getTarget
(double pX, double pY, double pZ) protected Target
getTargetNodeAt
(double pX, double pY, double pZ) static boolean
isBurningBlock
(BlockState pState) void
prepare
(PathNavigationRegion pLevel, Mob pMob) void
setCanFloat
(boolean pCanFloat) void
setCanOpenDoors
(boolean pCanOpenDoors) void
setCanPassDoors
(boolean pCanEnterDoors) void
setCanWalkOverFences
(boolean pCanWalkOverFences)
-
Field Details
-
currentContext
-
mob
-
nodes
-
entityWidth
protected int entityWidth -
entityHeight
protected int entityHeight -
entityDepth
protected int entityDepth -
canPassDoors
protected boolean canPassDoors -
canOpenDoors
protected boolean canOpenDoors -
canFloat
protected boolean canFloat -
canWalkOverFences
protected boolean canWalkOverFences
-
-
Constructor Details
-
NodeEvaluator
public NodeEvaluator()
-
-
Method Details
-
done
public void done() -
getNode
-
getNode
Returns a mapped point or creates and adds one -
getStart
-
getTarget
-
getTargetNodeAt
-
getNeighbors
-
getPathTypeOfMob
public abstract PathType getPathTypeOfMob(PathfindingContext pContext, int pX, int pY, int pZ, Mob pMob) -
getPathType
-
getPathType
-
setCanPassDoors
public void setCanPassDoors(boolean pCanEnterDoors) -
setCanOpenDoors
public void setCanOpenDoors(boolean pCanOpenDoors) -
setCanFloat
public void setCanFloat(boolean pCanFloat) -
setCanWalkOverFences
public void setCanWalkOverFences(boolean pCanWalkOverFences) -
canPassDoors
public boolean canPassDoors() -
canOpenDoors
public boolean canOpenDoors() -
canFloat
public boolean canFloat() -
canWalkOverFences
public boolean canWalkOverFences() -
isBurningBlock