Package net.minecraft.entity.ai.pathing
Class SwimNavigation
java.lang.Object
net.minecraft.entity.ai.pathing.EntityNavigation
net.minecraft.entity.ai.pathing.SwimNavigation
- Direct Known Subclasses:
class_5762.class_5766,TurtleEntity.TurtleSwimNavigation
public class SwimNavigation extends EntityNavigation
-
Field Summary
Fields Modifier and Type Field Description private booleancanJumpOutOfWaterFields inherited from class net.minecraft.entity.ai.pathing.EntityNavigation
currentNodeMs, currentNodeTimeout, currentPath, entity, lastActiveTickMs, lastNodePosition, lastRecalculateTime, nodeMaker, nodeReachProximity, pathStartPos, pathStartTime, shouldRecalculate, speed, tickCount, world -
Constructor Summary
Constructors Constructor Description SwimNavigation(MobEntity mob, World world) -
Method Summary
Modifier and Type Method Description protected booleancanPathDirectlyThrough(Vec3d origin, Vec3d target, int sizeX, int sizeY, int sizeZ)protected voidcheckTimeouts(Vec3d currentPos)protected voidcontinueFollowingPath()protected PathNodeNavigatorcreatePathNodeNavigator(int range)protected Vec3dgetPos()The position to act as if the entity is at for pathfinding purposesprotected booleanisAtValidPosition()booleanisValidPosition(BlockPos pos)voidsetCanSwim(boolean canSwim)voidtick()Methods inherited from class net.minecraft.entity.ai.pathing.EntityNavigation
adjustPath, canSwim, findPathTo, findPathTo, findPathTo, findPathToAny, findPathToAny, getCurrentPath, getNodeMaker, getTargetPos, isFollowingPath, isIdle, isInLiquid, isNearPathStartPos, method_29934, onBlockChanged, recalculatePath, resetRangeMultiplier, setRangeMultiplier, setSpeed, shouldRecalculatePath, startMovingAlong, startMovingTo, startMovingTo, stop
-
Field Details
-
canJumpOutOfWater
private boolean canJumpOutOfWater
-
-
Constructor Details
-
SwimNavigation
-
-
Method Details
-
isAtValidPosition
protected boolean isAtValidPosition()- Specified by:
isAtValidPositionin classEntityNavigation
-
getPos
The position to act as if the entity is at for pathfinding purposes- Specified by:
getPosin classEntityNavigation
-
tick
public void tick()- Overrides:
tickin classEntityNavigation
-
continueFollowingPath
protected void continueFollowingPath()- Overrides:
continueFollowingPathin classEntityNavigation
-
checkTimeouts
- Overrides:
checkTimeoutsin classEntityNavigation
-
canPathDirectlyThrough
protected boolean canPathDirectlyThrough(Vec3d origin, Vec3d target, int sizeX, int sizeY, int sizeZ)- Specified by:
canPathDirectlyThroughin classEntityNavigation
-
isValidPosition
- Overrides:
isValidPositionin classEntityNavigation
-
setCanSwim
public void setCanSwim(boolean canSwim)- Overrides:
setCanSwimin classEntityNavigation