Package net.minecraft.entity.ai
Class FuzzyPositions
java.lang.Object
net.minecraft.entity.ai.FuzzyPositions
public class FuzzyPositions extends Object
- Mappings:
Namespace Name official bbmintermediary net/minecraft/class_5535named net/minecraft/entity/ai/FuzzyPositions
-
Constructor Summary
Constructors Constructor Description FuzzyPositions() -
Method Summary
Modifier and Type Method Description static @Nullable Vec3dguessBest(Supplier<BlockPos> factory, ToDoubleFunction<BlockPos> scorer)Returns thebottom centerof a highest scoring position, as determined byscorer, out of 10 tries on positions obtained fromfactory.static @Nullable Vec3dguessBestPathTarget(PathAwareEntity entity, Supplier<BlockPos> factory)static BlockPoslocalFuzz(Random random, int horizontalRange, int verticalRange)Creates a fuzzy offset position within the given horizontal and vertical ranges.static @Nullable BlockPoslocalFuzz(Random random, int horizontalRange, int verticalRange, int startHeight, double xDirection, double zDirection, 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 BlockPosupWhile(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.static BlockPosupWhile(BlockPos pos, int maxY, Predicate<BlockPos> condition)Returns the closest position higher than the inputposthat does not fulfillcondition, or a position with y set tomaxY.
-
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 official aLbbm;a(Ljava/util/Random;II)Lfx;intermediary method_31541Lnet/minecraft/class_5535;method_31541(Ljava/util/Random;II)Lnet/minecraft/class_2338;named localFuzzLnet/minecraft/entity/ai/FuzzyPositions;localFuzz(Ljava/util/Random;II)Lnet/minecraft/util/math/BlockPos;
-
localFuzz
@Nullable public static @Nullable BlockPos localFuzz(Random random, int horizontalRange, int verticalRange, int startHeight, double xDirection, double zDirection, 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 official aLbbm;a(Ljava/util/Random;IIIDDD)Lfx;intermediary method_31542Lnet/minecraft/class_5535;method_31542(Ljava/util/Random;IIIDDD)Lnet/minecraft/class_2338;named localFuzzLnet/minecraft/entity/ai/FuzzyPositions;localFuzz(Ljava/util/Random;IIIDDD)Lnet/minecraft/util/math/BlockPos;
-
upWhile
Returns the closest position higher than the inputposthat does not fulfillcondition, or a position with y set tomaxY.- Mappings:
Namespace Name Mixin selector official aLbbm;a(Lfx;ILjava/util/function/Predicate;)Lfx;intermediary method_31540Lnet/minecraft/class_5535;method_31540(Lnet/minecraft/class_2338;ILjava/util/function/Predicate;)Lnet/minecraft/class_2338;named upWhileLnet/minecraft/entity/ai/FuzzyPositions;upWhile(Lnet/minecraft/util/math/BlockPos;ILjava/util/function/Predicate;)Lnet/minecraft/util/math/BlockPos;
-
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 official aLbbm;a(Lfx;IILjava/util/function/Predicate;)Lfx;intermediary method_31539Lnet/minecraft/class_5535;method_31539(Lnet/minecraft/class_2338;IILjava/util/function/Predicate;)Lnet/minecraft/class_2338;named upWhileLnet/minecraft/entity/ai/FuzzyPositions;upWhile(Lnet/minecraft/util/math/BlockPos;IILjava/util/function/Predicate;)Lnet/minecraft/util/math/BlockPos;
-
guessBestPathTarget
@Nullable public static @Nullable Vec3d guessBestPathTarget(PathAwareEntity entity, Supplier<BlockPos> factory)- Mappings:
Namespace Name Mixin selector official aLbbm;a(Lasj;Ljava/util/function/Supplier;)Ldkn;intermediary method_31538Lnet/minecraft/class_5535;method_31538(Lnet/minecraft/class_1314;Ljava/util/function/Supplier;)Lnet/minecraft/class_243;named guessBestPathTargetLnet/minecraft/entity/ai/FuzzyPositions;guessBestPathTarget(Lnet/minecraft/entity/mob/PathAwareEntity;Ljava/util/function/Supplier;)Lnet/minecraft/util/math/Vec3d;
-
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 official aLbbm;a(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Ldkn;intermediary method_31543Lnet/minecraft/class_5535;method_31543(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Lnet/minecraft/class_243;named guessBestLnet/minecraft/entity/ai/FuzzyPositions;guessBest(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Lnet/minecraft/util/math/Vec3d;
-
towardTarget
public static BlockPos towardTarget(PathAwareEntity entity, int horizontalRange, Random random, BlockPos fuzz)- Mappings:
Namespace Name Mixin selector official aLbbm;a(Lasj;ILjava/util/Random;Lfx;)Lfx;intermediary method_31537Lnet/minecraft/class_5535;method_31537(Lnet/minecraft/class_1314;ILjava/util/Random;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;named towardTargetLnet/minecraft/entity/ai/FuzzyPositions;towardTarget(Lnet/minecraft/entity/mob/PathAwareEntity;ILjava/util/Random;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;
-