mirror of https://github.com/FabricMC/yarn.git
Add docs for FuzzyTargetting and NoPenaltyTargetting (#2783)
* Add docs for FuzzyTargetting and NoPenaltyTargetting * Bruh part 1 * Bruh part 2 * Bruh part 3 * Bruh part 4 * Update mappings/net/minecraft/entity/ai/FuzzyTargeting.mapping Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> * Update mappings/net/minecraft/entity/ai/NoPenaltyTargeting.mapping Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> * Update mappings/net/minecraft/entity/ai/FuzzyTargeting.mapping Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> * Update mappings/net/minecraft/entity/ai/FuzzyTargeting.mapping Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> * Update mappings/net/minecraft/entity/ai/FuzzyTargeting.mapping Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> * Update mappings/net/minecraft/entity/ai/FuzzyTargeting.mapping Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> * Update mappings/net/minecraft/entity/ai/FuzzyTargeting.mapping Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> * Update mappings/net/minecraft/entity/ai/FuzzyTargeting.mapping Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> * Update mappings/net/minecraft/entity/ai/FuzzyTargeting.mapping Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com> Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
31ad1856ef
commit
b261ddf6f8
|
@ -1,15 +1,31 @@
|
|||
CLASS net/minecraft/class_5534 net/minecraft/entity/ai/FuzzyTargeting
|
||||
COMMENT Path targeting utilities using fuzzy, or approximated, positions from
|
||||
COMMENT {@link FuzzyPositions}.
|
||||
COMMENT <p>
|
||||
COMMENT Methods in this class can be used to do pathing for an entity to a random position.
|
||||
COMMENT Positions are chosen to stay within range of the entity's chosen {@linkplain net.minecraft.entity.mob.MobEntity#getPositionTarget() position target}
|
||||
COMMENT if applicable, and will be suitably randomized within that constraint.
|
||||
METHOD method_31527 find (Lnet/minecraft/class_1314;II)Lnet/minecraft/class_243;
|
||||
COMMENT Paths to a random reachable position with positive path-finding favorability.
|
||||
COMMENT
|
||||
COMMENT @return chosen position or null if none could be found
|
||||
ARG 0 entity
|
||||
COMMENT the entity doing the pathing
|
||||
ARG 1 horizontalRange
|
||||
COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
|
||||
ARG 2 verticalRange
|
||||
COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
|
||||
METHOD method_31528 findTo (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;)Lnet/minecraft/class_243;
|
||||
COMMENT Paths to a random reachable position leading towards a given end-point.
|
||||
COMMENT
|
||||
COMMENT @return the chosen position or null if none could be found
|
||||
ARG 0 entity
|
||||
ARG 1 horizontalRange
|
||||
COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
|
||||
ARG 2 verticalRange
|
||||
COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
|
||||
ARG 3 end
|
||||
COMMENT the position to path towards
|
||||
METHOD method_31529 findValid (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;Z)Lnet/minecraft/class_243;
|
||||
ARG 0 entity
|
||||
ARG 1 horizontalRange
|
||||
|
@ -17,22 +33,46 @@ CLASS net/minecraft/class_5534 net/minecraft/entity/ai/FuzzyTargeting
|
|||
ARG 3 direction
|
||||
ARG 4 posTargetInRange
|
||||
METHOD method_31530 find (Lnet/minecraft/class_1314;IILjava/util/function/ToDoubleFunction;)Lnet/minecraft/class_243;
|
||||
COMMENT Paths to a random reachable position with positive path-finding favorability computed by a given function.
|
||||
COMMENT
|
||||
COMMENT @return the chosen position or null if none could be found
|
||||
ARG 0 entity
|
||||
COMMENT the entity doing the pathing
|
||||
ARG 1 horizontalRange
|
||||
COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
|
||||
ARG 2 verticalRange
|
||||
COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
|
||||
ARG 3 scorer
|
||||
METHOD method_31532 tryMake (Lnet/minecraft/class_1314;IZLnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
|
||||
COMMENT function to compute the path-finding favorability of a candidate position
|
||||
METHOD method_31532 towardTarget (Lnet/minecraft/class_1314;IZLnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
|
||||
COMMENT Paths to a random reachable position approaching an entity's chosen {@link net.minecraft.entity.mob.MobEntity#getPositionTarget() position target}.
|
||||
COMMENT
|
||||
COMMENT @return the chosen position or null if none could be found
|
||||
ARG 0 entity
|
||||
COMMENT the entity doing the pathing
|
||||
ARG 1 horizontalRange
|
||||
COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
|
||||
ARG 2 posTargetInRange
|
||||
ARG 3 relativeInRangePos
|
||||
METHOD method_31533 validate (Lnet/minecraft/class_1314;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
|
||||
COMMENT Checks whether a given position is a valid pathable target.
|
||||
COMMENT
|
||||
COMMENT @return the input position, or null if validation failed
|
||||
ARG 0 entity
|
||||
COMMENT the entity doing the pathing
|
||||
ARG 1 pos
|
||||
COMMENT the candidate position
|
||||
METHOD method_31534 findFrom (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;)Lnet/minecraft/class_243;
|
||||
COMMENT Paths to a random reachable position leading away from a given starting point.
|
||||
COMMENT
|
||||
COMMENT @return the chosen position or null if none could be found
|
||||
ARG 0 entity
|
||||
COMMENT the entity doing the pathing
|
||||
ARG 1 horizontalRange
|
||||
COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
|
||||
ARG 2 verticalRange
|
||||
COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
|
||||
ARG 3 start
|
||||
COMMENT the position to path away from
|
||||
METHOD method_31536 (Lnet/minecraft/class_1314;Lnet/minecraft/class_2338;)Z
|
||||
ARG 1 currentPos
|
||||
|
|
|
@ -2,20 +2,41 @@ CLASS net/minecraft/class_5532 net/minecraft/entity/ai/NoPenaltyTargeting
|
|||
COMMENT Similar to {@link FuzzyTargeting}, but the positions this class' utility methods
|
||||
COMMENT find never have pathfinding penalties.
|
||||
METHOD method_31510 find (Lnet/minecraft/class_1314;II)Lnet/minecraft/class_243;
|
||||
COMMENT Paths to a random reachable position with no penalty.
|
||||
COMMENT
|
||||
COMMENT @return the chosen end position or null if no valid positions could be found
|
||||
ARG 0 entity
|
||||
COMMENT the entity doing the pathing
|
||||
ARG 1 horizontalRange
|
||||
COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
|
||||
ARG 2 verticalRange
|
||||
METHOD method_31511 find (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;)Lnet/minecraft/class_243;
|
||||
COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
|
||||
METHOD method_31511 findFrom (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;)Lnet/minecraft/class_243;
|
||||
COMMENT Paths to a position leading away from a given starting point.
|
||||
COMMENT
|
||||
COMMENT @return the chosen end position or null if no valid positions could be found
|
||||
ARG 0 entity
|
||||
COMMENT the entity doing the pathing
|
||||
ARG 1 horizontalRange
|
||||
COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
|
||||
ARG 2 verticalRange
|
||||
ARG 3 direction
|
||||
METHOD method_31512 find (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;D)Lnet/minecraft/class_243;
|
||||
COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
|
||||
ARG 3 start
|
||||
COMMENT the position to path away from
|
||||
METHOD method_31512 findTo (Lnet/minecraft/class_1314;IILnet/minecraft/class_243;D)Lnet/minecraft/class_243;
|
||||
COMMENT Paths to a position leading towards a given end-point.
|
||||
COMMENT
|
||||
COMMENT @return the chosen end position or null if no valid positions could be found
|
||||
ARG 0 entity
|
||||
COMMENT the entity doing the pathing
|
||||
ARG 1 horizontalRange
|
||||
COMMENT the horizontal pathing range (how far the point can be from the entity's starting position on the X or Z range)
|
||||
ARG 2 verticalRange
|
||||
COMMENT the vertical pathing range (how far the point can be from the entity's starting position on the Y range)
|
||||
ARG 3 end
|
||||
COMMENT the position to path towards
|
||||
ARG 4 angleRange
|
||||
COMMENT the minimum angle of approach
|
||||
METHOD method_31516 tryMake (Lnet/minecraft/class_1314;IZLnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
|
||||
ARG 0 entity
|
||||
ARG 1 horizontalRange
|
||||
|
|
Loading…
Reference in New Issue