类 FuzzyPositions


  • public class FuzzyPositions
    extends Object
    Mappings:
    Namespace Name
    official bcj
    intermediary net/minecraft/class_5535
    named net/minecraft/entity/ai/FuzzyPositions
    • 字段详细资料

      • field_30264

        private static final int field_30264
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official a Lbcj;a:I
        intermediary field_30264 Lnet/minecraft/class_5535;field_30264:I
        named field_30264 Lnet/minecraft/entity/ai/FuzzyPositions;field_30264:I
    • 构造器详细资料

      • FuzzyPositions

        public FuzzyPositions()
    • 方法详细资料

      • localFuzz

        public static BlockPos localFuzz​(Random random,
                                         int horizontalRange,
                                         int verticalRange)
        Creates a fuzzy offset position within the given horizontal and vertical ranges.
        Mappings:
        Namespace Name Mixin selector
        official a Lbcj;a(Ljava/util/Random;II)Lgb;
        intermediary method_31541 Lnet/minecraft/class_5535;method_31541(Ljava/util/Random;II)Lnet/minecraft/class_2338;
        named localFuzz Lnet/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 by horizontalRange and verticalRange and returns null if it cannot do so.
        Mappings:
        Namespace Name Mixin selector
        official a Lbcj;a(Ljava/util/Random;IIIDDD)Lgb;
        intermediary method_31542 Lnet/minecraft/class_5535;method_31542(Ljava/util/Random;IIIDDD)Lnet/minecraft/class_2338;
        named localFuzz Lnet/minecraft/entity/ai/FuzzyPositions;localFuzz(Ljava/util/Random;IIIDDD)Lnet/minecraft/util/math/BlockPos;
      • upWhile

        public static BlockPos upWhile​(BlockPos pos,
                                       int maxY,
                                       Predicate<BlockPos> condition)
        Returns the closest position higher than the input pos that does not fulfill condition, or a position with y set to maxY.
        Mappings:
        Namespace Name Mixin selector
        official a Lbcj;a(Lgb;ILjava/util/function/Predicate;)Lgb;
        intermediary method_31540 Lnet/minecraft/class_5535;method_31540(Lnet/minecraft/class_2338;ILjava/util/function/Predicate;)Lnet/minecraft/class_2338;
        named upWhile Lnet/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 the extraAbove + 1th closest position higher than the input pos that does not fulfill condition, or a position with y set to maxY.
        Mappings:
        Namespace Name Mixin selector
        official a Lbcj;a(Lgb;IILjava/util/function/Predicate;)Lgb;
        intermediary method_31539 Lnet/minecraft/class_5535;method_31539(Lnet/minecraft/class_2338;IILjava/util/function/Predicate;)Lnet/minecraft/class_2338;
        named upWhile Lnet/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)
        Calls guessBest(Supplier, ToDoubleFunction) with the entity's path finding favor as the scorer.
        Mappings:
        Namespace Name Mixin selector
        official a Lbcj;a(Latg;Ljava/util/function/Supplier;)Ldma;
        intermediary method_31538 Lnet/minecraft/class_5535;method_31538(Lnet/minecraft/class_1314;Ljava/util/function/Supplier;)Lnet/minecraft/class_243;
        named guessBestPathTarget Lnet/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 the bottom center of a highest scoring position, as determined by scorer, out of 10 tries on positions obtained from factory.
        Mappings:
        Namespace Name Mixin selector
        official a Lbcj;a(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Ldma;
        intermediary method_31543 Lnet/minecraft/class_5535;method_31543(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Lnet/minecraft/class_243;
        named guessBest Lnet/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)
        Adjusts the input fuzz slightly toward the given entity's position target if it exists.
        Mappings:
        Namespace Name Mixin selector
        official a Lbcj;a(Latg;ILjava/util/Random;Lgb;)Lgb;
        intermediary method_31537 Lnet/minecraft/class_5535;method_31537(Lnet/minecraft/class_1314;ILjava/util/Random;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;
        named towardTarget Lnet/minecraft/entity/ai/FuzzyPositions;towardTarget(Lnet/minecraft/entity/mob/PathAwareEntity;ILjava/util/Random;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;