Class NoPenaltyTargeting

java.lang.Object
net.minecraft.entity.ai.NoPenaltyTargeting

public class NoPenaltyTargeting extends Object
Similar to FuzzyTargeting, but the positions this class' utility methods find never have pathfinding penalties.
Mappings:
Namespace Name
named net/minecraft/entity/ai/NoPenaltyTargeting
intermediary net/minecraft/class_5532
official cdx
  • Constructor Details

    • NoPenaltyTargeting

      public NoPenaltyTargeting()
  • Method Details

    • find

      @Nullable public static @Nullable Vec3d find(PathAwareEntity entity, int horizontalRange, int verticalRange)
      Paths to a random reachable position with no penalty.
      Parameters:
      entity - the entity doing the pathing
      horizontalRange - the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
      verticalRange - the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
      Returns:
      the chosen end position or null if no valid positions could be found
      Mappings:
      Namespace Name Mixin selector
      named find Lnet/minecraft/entity/ai/NoPenaltyTargeting;find(Lnet/minecraft/entity/mob/PathAwareEntity;II)Lnet/minecraft/util/math/Vec3d;
      intermediary method_31510 Lnet/minecraft/class_5532;method_31510(Lnet/minecraft/class_1314;II)Lnet/minecraft/class_243;
      official a Lcdx;a(Lbtl;II)Lewh;
    • findTo

      @Nullable public static @Nullable Vec3d findTo(PathAwareEntity entity, int horizontalRange, int verticalRange, Vec3d end, double angleRange)
      Paths to a position leading towards a given end-point.
      Parameters:
      entity - the entity doing the pathing
      horizontalRange - the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
      verticalRange - the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
      end - the position to path towards
      angleRange - the minimum angle of approach
      Returns:
      the chosen end position or null if no valid positions could be found
      Mappings:
      Namespace Name Mixin selector
      named findTo Lnet/minecraft/entity/ai/NoPenaltyTargeting;findTo(Lnet/minecraft/entity/mob/PathAwareEntity;IILnet/minecraft/util/math/Vec3d;D)Lnet/minecraft/util/math/Vec3d;
      intermediary method_31512 Lnet/minecraft/class_5532;method_31512(Lnet/minecraft/class_1314;IILnet/minecraft/class_243;D)Lnet/minecraft/class_243;
      official a Lcdx;a(Lbtl;IILewh;D)Lewh;
    • findFrom

      @Nullable public static @Nullable Vec3d findFrom(PathAwareEntity entity, int horizontalRange, int verticalRange, Vec3d start)
      Paths to a position leading away from a given starting point.
      Parameters:
      entity - the entity doing the pathing
      horizontalRange - the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
      verticalRange - the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
      start - the position to path away from
      Returns:
      the chosen end position or null if no valid positions could be found
      Mappings:
      Namespace Name Mixin selector
      named findFrom Lnet/minecraft/entity/ai/NoPenaltyTargeting;findFrom(Lnet/minecraft/entity/mob/PathAwareEntity;IILnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
      intermediary method_31511 Lnet/minecraft/class_5532;method_31511(Lnet/minecraft/class_1314;IILnet/minecraft/class_243;)Lnet/minecraft/class_243;
      official a Lcdx;a(Lbtl;IILewh;)Lewh;
    • tryMake

      @Nullable private static @Nullable BlockPos tryMake(PathAwareEntity entity, int horizontalRange, boolean posTargetInRange, BlockPos fuzz)
      Mappings:
      Namespace Name Mixin selector
      named tryMake Lnet/minecraft/entity/ai/NoPenaltyTargeting;tryMake(Lnet/minecraft/entity/mob/PathAwareEntity;IZLnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;
      intermediary method_31516 Lnet/minecraft/class_5532;method_31516(Lnet/minecraft/class_1314;IZLnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
      official a Lcdx;a(Lbtl;IZLja;)Lja;