Class EntityPathNavigateDrone

java.lang.Object
net.minecraft.world.entity.ai.navigation.PathNavigation
net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
me.desht.pneumaticcraft.common.ai.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

    Constructors
    Constructor
    Description
    EntityPathNavigateDrone(DroneEntity droneEntity, net.minecraft.world.level.Level world)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    net.minecraft.world.level.pathfinder.Path
    createPath(net.minecraft.core.BlockPos pos, int p2)
     
    net.minecraft.world.level.pathfinder.Path
    createPath(net.minecraft.world.entity.Entity entity, int p2)
    Returns the path to the given EntityLiving
    protected net.minecraft.world.level.pathfinder.PathFinder
     
    protected net.minecraft.world.phys.Vec3
     
    boolean
    Check if the drone has an active path currently set.
    boolean
     
    boolean
    Check if the drone is firing up its teleportation device.
    boolean
    moveTo(net.minecraft.world.entity.Entity pEntity, double pSpeed)
     
    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.
    boolean
    moveToEntity(net.minecraft.world.entity.Entity entity)
    Instruct the drone to move to the given entity.
    boolean
    moveToXYZ(double x, double y, double z)
    Instruct the drone to move to the given position.
    void
     
    void
     

    Methods inherited from class net.minecraft.world.entity.ai.navigation.FlyingPathNavigation

    canOpenDoors, canPassDoors, isStableDestination, setCanOpenDoors, setCanPassDoors

    Methods inherited from class net.minecraft.world.entity.ai.navigation.PathNavigation

    canFloat, canMoveDirectly, createPath, createPath, createPath, createPath, createPath, createPath, doStuckDetection, followThePath, getGroundY, getMaxDistanceToWaypoint, getNodeEvaluator, getPath, getTargetPos, isInLiquid, isInProgress, isStuck, moveTo, recomputePath, resetMaxVisitedNodesMultiplier, setCanFloat, setMaxVisitedNodesMultiplier, setSpeedModifier, shouldRecomputePath, stop, trimPath

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EntityPathNavigateDrone

      public EntityPathNavigateDrone(DroneEntity droneEntity, net.minecraft.world.level.Level world)
  • Method Details

    • moveTo

      public boolean moveTo(net.minecraft.world.entity.Entity pEntity, double pSpeed)
      Overrides:
      moveTo in class net.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:
      createPath in class net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
    • createPath

      @Nullable public net.minecraft.world.level.pathfinder.Path createPath(net.minecraft.core.BlockPos pos, int p2)
      Overrides:
      createPath in class net.minecraft.world.entity.ai.navigation.PathNavigation
    • isGoingToTeleport

      public boolean isGoingToTeleport()
      Description copied from interface: IPathNavigator
      Check if the drone is firing up its teleportation device. Drones about to teleport will show some ender-style particles above themselves.
      Specified by:
      isGoingToTeleport in interface IPathNavigator
      Returns:
      true if the drone is about to teleport, false otherwise
    • isDone

      public boolean isDone()
      Overrides:
      isDone in class net.minecraft.world.entity.ai.navigation.PathNavigation
    • tick

      public void tick()
      Overrides:
      tick in class net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
    • teleport

      public void teleport()
    • moveToXYZ

      public boolean moveToXYZ(double x, double y, double z)
      Description copied from interface: IPathNavigator
      Instruct 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:
      moveToXYZ in interface IPathNavigator
      Parameters:
      x - target X position
      y - target Y position
      z - 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: IPathNavigator
      Instruct 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:
      moveToEntity in interface IPathNavigator
      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:
      moveTo in class net.minecraft.world.entity.ai.navigation.PathNavigation
    • hasNoPath

      public boolean hasNoPath()
      Description copied from interface: IPathNavigator
      Check if the drone has an active path currently set.
      Specified by:
      hasNoPath in interface IPathNavigator
      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:
      createPathFinder in class net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
    • getTempMobPos

      protected net.minecraft.world.phys.Vec3 getTempMobPos()
      Overrides:
      getTempMobPos in class net.minecraft.world.entity.ai.navigation.FlyingPathNavigation
    • canUpdatePath

      protected boolean canUpdatePath()
      Overrides:
      canUpdatePath in class net.minecraft.world.entity.ai.navigation.FlyingPathNavigation