Package net.minecraft.entity.ai
Class FuzzyPositions
java.lang.Object
net.minecraft.entity.ai.FuzzyPositions
- Mappings:
Namespace Name named net/minecraft/entity/ai/FuzzyPositionsintermediary net/minecraft/class_5535official cen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionguessBest(Supplier<BlockPos> factory, ToDoubleFunction<BlockPos> scorer) Returns thebottom centerof a highest scoring position, as determined byscorer, out of 10 tries on positions obtained fromfactory.guessBestPathTarget(PathAwareEntity entity, Supplier<BlockPos> factory) static BlockPosCreates a fuzzy offset position within the given horizontal and vertical ranges.localFuzz(Random random, int horizontalRange, int verticalRange, int startHeight, double directionX, double directionZ, double angleRange) Tries to create a fuzzy offset position from the direction and the angle range given.static BlockPostowardTarget(PathAwareEntity entity, int horizontalRange, Random random, BlockPos fuzz) static BlockPosReturns theextraAbove + 1th closest position higher than the inputposthat does not fulfillcondition, or a position with y set tomaxY.static BlockPosReturns the closest position higher than the inputposthat does not fulfillcondition, or a position with y set tomaxY.
-
Field Details
-
GAUSS_RANGE
private static final int GAUSS_RANGE- See Also:
- Mappings:
Namespace Name Mixin selector named GAUSS_RANGELnet/minecraft/entity/ai/FuzzyPositions;GAUSS_RANGE:Iintermediary field_30264Lnet/minecraft/class_5535;field_30264:Iofficial aLcen;a:I
-
-
Constructor Details
-
FuzzyPositions
public FuzzyPositions()
-
-
Method Details
-
localFuzz
Creates a fuzzy offset position within the given horizontal and vertical ranges.- Mappings:
Namespace Name Mixin selector named localFuzzLnet/minecraft/entity/ai/FuzzyPositions;localFuzz(Lnet/minecraft/util/math/random/Random;II)Lnet/minecraft/util/math/BlockPos;intermediary method_31541Lnet/minecraft/class_5535;method_31541(Lnet/minecraft/class_5819;II)Lnet/minecraft/class_2338;official aLcen;a(Layw;II)Ljd;
-
localFuzz
@Nullable public static @Nullable BlockPos localFuzz(Random random, int horizontalRange, int verticalRange, int startHeight, double directionX, double directionZ, double angleRange) Tries to create a fuzzy offset position from the direction and the angle range given. It fulfills the constraints given byhorizontalRangeandverticalRangeand returnsnullif it cannot do so.- Mappings:
Namespace Name Mixin selector named localFuzzLnet/minecraft/entity/ai/FuzzyPositions;localFuzz(Lnet/minecraft/util/math/random/Random;IIIDDD)Lnet/minecraft/util/math/BlockPos;intermediary method_31542Lnet/minecraft/class_5535;method_31542(Lnet/minecraft/class_5819;IIIDDD)Lnet/minecraft/class_2338;official aLcen;a(Layw;IIIDDD)Ljd;
-
upWhile
Returns the closest position higher than the inputposthat does not fulfillcondition, or a position with y set tomaxY.- Mappings:
Namespace Name Mixin selector named upWhileLnet/minecraft/entity/ai/FuzzyPositions;upWhile(Lnet/minecraft/util/math/BlockPos;ILjava/util/function/Predicate;)Lnet/minecraft/util/math/BlockPos;intermediary method_31540Lnet/minecraft/class_5535;method_31540(Lnet/minecraft/class_2338;ILjava/util/function/Predicate;)Lnet/minecraft/class_2338;official aLcen;a(Ljd;ILjava/util/function/Predicate;)Ljd;
-
upWhile
public static BlockPos upWhile(BlockPos pos, int extraAbove, int max, Predicate<BlockPos> condition) Returns theextraAbove + 1th closest position higher than the inputposthat does not fulfillcondition, or a position with y set tomaxY.- Mappings:
Namespace Name Mixin selector named upWhileLnet/minecraft/entity/ai/FuzzyPositions;upWhile(Lnet/minecraft/util/math/BlockPos;IILjava/util/function/Predicate;)Lnet/minecraft/util/math/BlockPos;intermediary method_31539Lnet/minecraft/class_5535;method_31539(Lnet/minecraft/class_2338;IILjava/util/function/Predicate;)Lnet/minecraft/class_2338;official aLcen;a(Ljd;IILjava/util/function/Predicate;)Ljd;
-
guessBestPathTarget
@Nullable public static @Nullable Vec3d guessBestPathTarget(PathAwareEntity entity, Supplier<BlockPos> factory) - Mappings:
Namespace Name Mixin selector named guessBestPathTargetLnet/minecraft/entity/ai/FuzzyPositions;guessBestPathTarget(Lnet/minecraft/entity/mob/PathAwareEntity;Ljava/util/function/Supplier;)Lnet/minecraft/util/math/Vec3d;intermediary method_31538Lnet/minecraft/class_5535;method_31538(Lnet/minecraft/class_1314;Ljava/util/function/Supplier;)Lnet/minecraft/class_243;official aLcen;a(Lbtw;Ljava/util/function/Supplier;)Lexc;
-
guessBest
@Nullable public static @Nullable Vec3d guessBest(Supplier<BlockPos> factory, ToDoubleFunction<BlockPos> scorer) Returns thebottom centerof a highest scoring position, as determined byscorer, out of 10 tries on positions obtained fromfactory.- Mappings:
Namespace Name Mixin selector named guessBestLnet/minecraft/entity/ai/FuzzyPositions;guessBest(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Lnet/minecraft/util/math/Vec3d;intermediary method_31543Lnet/minecraft/class_5535;method_31543(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Lnet/minecraft/class_243;official aLcen;a(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Lexc;
-
towardTarget
public static BlockPos towardTarget(PathAwareEntity entity, int horizontalRange, Random random, BlockPos fuzz) - Mappings:
Namespace Name Mixin selector named towardTargetLnet/minecraft/entity/ai/FuzzyPositions;towardTarget(Lnet/minecraft/entity/mob/PathAwareEntity;ILnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;intermediary method_31537Lnet/minecraft/class_5535;method_31537(Lnet/minecraft/class_1314;ILnet/minecraft/class_5819;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;official aLcen;a(Lbtw;ILayw;Ljd;)Ljd;
-