Class EntityPathNavigateDrone
java.lang.Object
net.minecraft.world.entity.ai.navigation.PathNavigation
net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
me.desht.pneumaticcraft.common.drone.EntityPathNavigateDrone
- All Implemented Interfaces:
IPathNavigator
public class EntityPathNavigateDrone
extends net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
implements IPathNavigator
-
Field Summary
Fields inherited from class net.minecraft.world.entity.ai.navigation.PathNavigation
hasDelayedRecomputation, lastStuckCheck, lastStuckCheckPos, lastTimeoutCheck, level, maxDistanceToWaypoint, mob, nodeEvaluator, path, speedModifier, tick, timeLastRecompute, timeoutCachedNode, timeoutLimit, timeoutTimer -
Constructor Summary
ConstructorsConstructorDescriptionEntityPathNavigateDrone(DroneEntity droneEntity, net.minecraft.world.level.Level world) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleannet.minecraft.world.level.pathfinder.PathcreatePath(net.minecraft.core.BlockPos pos, int p2) net.minecraft.world.level.pathfinder.PathcreatePath(net.minecraft.world.entity.Entity entity, int p2) Returns the path to the given EntityLivingprotected net.minecraft.world.level.pathfinder.PathFindercreatePathFinder(int r) protected net.minecraft.world.phys.Vec3booleanCheck if the drone has an active path currently set.booleanisDone()booleanCheck if the drone is firing up its teleportation device.booleanmoveTo(net.minecraft.world.entity.Entity pEntity, double pSpeed) booleanmoveTo(net.minecraft.world.level.pathfinder.Path path, double speedIn) Override to prevent MobEntity#updateEntityActionState() assigning a path with a higher speed and to check the target position is loaded, if necessary.booleanmoveToEntity(net.minecraft.world.entity.Entity entity) Instruct the drone to move to the given entity.booleanmoveToXYZ(double x, double y, double z) Instruct the drone to move to the given position.voidsetForceTeleport(boolean forceTeleport) voidteleport()voidtick()Methods inherited from class net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
canMoveDirectly, canOpenDoors, canPassDoors, isStableDestination, setCanOpenDoors, setCanPassDoorsMethods inherited from class net.minecraft.world.entity.ai.navigation.PathNavigation
canCutCorner, canFloat, createPath, createPath, createPath, createPath, createPath, createPath, doStuckDetection, followThePath, getGroundY, getMaxDistanceToWaypoint, getNodeEvaluator, getPath, getTargetPos, isClearForMovementBetween, isInLiquid, isInProgress, isStuck, moveTo, recomputePath, resetMaxVisitedNodesMultiplier, setCanFloat, setMaxVisitedNodesMultiplier, setSpeedModifier, shouldRecomputePath, stop, trimPath
-
Constructor Details
-
EntityPathNavigateDrone
-
-
Method Details
-
moveTo
public boolean moveTo(net.minecraft.world.entity.Entity pEntity, double pSpeed) - Overrides:
moveToin classnet.minecraft.world.entity.ai.navigation.PathNavigation
-
createPath
public net.minecraft.world.level.pathfinder.Path createPath(net.minecraft.world.entity.Entity entity, int p2) Returns the path to the given EntityLiving- Overrides:
createPathin classnet.minecraft.world.entity.ai.navigation.FlyingPathNavigation
-
setForceTeleport
public void setForceTeleport(boolean forceTeleport) -
createPath
@Nullable public net.minecraft.world.level.pathfinder.Path createPath(net.minecraft.core.BlockPos pos, int p2) - Overrides:
createPathin classnet.minecraft.world.entity.ai.navigation.PathNavigation
-
isGoingToTeleport
public boolean isGoingToTeleport()Description copied from interface:IPathNavigatorCheck if the drone is firing up its teleportation device. Drones about to teleport will show some ender-style particles above themselves.- Specified by:
isGoingToTeleportin interfaceIPathNavigator- Returns:
- true if the drone is about to teleport, false otherwise
-
isDone
public boolean isDone()- Overrides:
isDonein classnet.minecraft.world.entity.ai.navigation.PathNavigation
-
tick
public void tick()- Overrides:
tickin classnet.minecraft.world.entity.ai.navigation.FlyingPathNavigation
-
teleport
public void teleport() -
moveToXYZ
public boolean moveToXYZ(double x, double y, double z) Description copied from interface:IPathNavigatorInstruct the drone to move to the given position. Note that any currently-running program may subsequently override this. Note that if the drone cannot path to the given position, it may attempt to teleport.- Specified by:
moveToXYZin interfaceIPathNavigator- Parameters:
x- target X positiony- target Y positionz- target Z position- Returns:
- true if the drone is able to path to the given position, false otherwise
-
moveToEntity
public boolean moveToEntity(net.minecraft.world.entity.Entity entity) Description copied from interface:IPathNavigatorInstruct the drone to move to the given entity. Note that any currently-running program may subsequently override this. Note that if the drone cannot path to the given entity, it may attempt to teleport.- Specified by:
moveToEntityin interfaceIPathNavigator- Parameters:
entity- the target entity- Returns:
- true if the drone is able to path to the given entity, false otherwise
-
moveTo
public boolean moveTo(net.minecraft.world.level.pathfinder.Path path, double speedIn) Override to prevent MobEntity#updateEntityActionState() assigning a path with a higher speed and to check the target position is loaded, if necessary.- Overrides:
moveToin classnet.minecraft.world.entity.ai.navigation.PathNavigation
-
hasNoPath
public boolean hasNoPath()Description copied from interface:IPathNavigatorCheck if the drone has an active path currently set.- Specified by:
hasNoPathin interfaceIPathNavigator- Returns:
- true if the drone has no path, or the current path is complete, false if there is still an active path
-
createPathFinder
protected net.minecraft.world.level.pathfinder.PathFinder createPathFinder(int r) - Overrides:
createPathFinderin classnet.minecraft.world.entity.ai.navigation.FlyingPathNavigation
-
getTempMobPos
protected net.minecraft.world.phys.Vec3 getTempMobPos()- Overrides:
getTempMobPosin classnet.minecraft.world.entity.ai.navigation.FlyingPathNavigation
-
canUpdatePath
protected boolean canUpdatePath()- Overrides:
canUpdatePathin classnet.minecraft.world.entity.ai.navigation.FlyingPathNavigation
-