Package net.minecraft.entity.ai
Class NoPenaltyTargeting
java.lang.Object
net.minecraft.entity.ai.NoPenaltyTargeting
Similar to
FuzzyTargeting
, but the positions this class' utility methods
find never have pathfinding penalties.- Mappings:
Namespace Name official blm
intermediary net/minecraft/class_5532
named net/minecraft/entity/ai/NoPenaltyTargeting
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfind
(PathAwareEntity entity, int horizontalRange, int verticalRange) Paths to a random reachable position with no penalty.findFrom
(PathAwareEntity entity, int horizontalRange, int verticalRange, Vec3d start) Paths to a position leading away from a given starting point.findTo
(PathAwareEntity entity, int horizontalRange, int verticalRange, Vec3d end, double angleRange) Paths to a position leading towards a given end-point.tryMake
(PathAwareEntity entity, int horizontalRange, boolean posTargetInRange, BlockPos fuzz)
-
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 pathinghorizontalRange
- 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 official a
Lblm;a(Lbbo;II)Ldvs;
intermediary method_31510
Lnet/minecraft/class_5532;method_31510(Lnet/minecraft/class_1314;II)Lnet/minecraft/class_243;
named find
Lnet/minecraft/entity/ai/NoPenaltyTargeting;find(Lnet/minecraft/entity/mob/PathAwareEntity;II)Lnet/minecraft/util/math/Vec3d;
-
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 pathinghorizontalRange
- 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 towardsangleRange
- the minimum angle of approach- Returns:
- the chosen end position or null if no valid positions could be found
- Mappings:
Namespace Name Mixin selector official a
Lblm;a(Lbbo;IILdvs;D)Ldvs;
intermediary method_31512
Lnet/minecraft/class_5532;method_31512(Lnet/minecraft/class_1314;IILnet/minecraft/class_243;D)Lnet/minecraft/class_243;
named findTo
Lnet/minecraft/entity/ai/NoPenaltyTargeting;findTo(Lnet/minecraft/entity/mob/PathAwareEntity;IILnet/minecraft/util/math/Vec3d;D)Lnet/minecraft/util/math/Vec3d;
-
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 pathinghorizontalRange
- 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 official a
Lblm;a(Lbbo;IILdvs;)Ldvs;
intermediary method_31511
Lnet/minecraft/class_5532;method_31511(Lnet/minecraft/class_1314;IILnet/minecraft/class_243;)Lnet/minecraft/class_243;
named findFrom
Lnet/minecraft/entity/ai/NoPenaltyTargeting;findFrom(Lnet/minecraft/entity/mob/PathAwareEntity;IILnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
-
tryMake
@Nullable private static @Nullable BlockPos tryMake(PathAwareEntity entity, int horizontalRange, boolean posTargetInRange, BlockPos fuzz) - Mappings:
Namespace Name Mixin selector official a
Lblm;a(Lbbo;IZLgt;)Lgt;
intermediary method_31516
Lnet/minecraft/class_5532;method_31516(Lnet/minecraft/class_1314;IZLnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
named tryMake
Lnet/minecraft/entity/ai/NoPenaltyTargeting;tryMake(Lnet/minecraft/entity/mob/PathAwareEntity;IZLnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;
-