类 FuzzyPositions
- java.lang.Object
-
- net.minecraft.entity.ai.FuzzyPositions
-
public class FuzzyPositions extends Object
- Mappings:
Namespace Name official bcjintermediary net/minecraft/class_5535named net/minecraft/entity/ai/FuzzyPositions
-
-
字段概要
字段 修饰符和类型 字段 说明 private static intfield_30264
-
构造器概要
构造器 构造器 说明 FuzzyPositions()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 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.
-
-
-
字段详细资料
-
field_30264
private static final int field_30264
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official aLbcj;a:Iintermediary field_30264Lnet/minecraft/class_5535;field_30264:Inamed field_30264Lnet/minecraft/entity/ai/FuzzyPositions;field_30264:I
-
-
方法详细资料
-
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 aLbcj;a(Ljava/util/Random;II)Lgb;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 aLbcj;a(Ljava/util/Random;IIIDDD)Lgb;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
public static BlockPos upWhile(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.- Mappings:
Namespace Name Mixin selector official aLbcj;a(Lgb;ILjava/util/function/Predicate;)Lgb;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 aLbcj;a(Lgb;IILjava/util/function/Predicate;)Lgb;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 aLbcj;a(Latg;Ljava/util/function/Supplier;)Ldma;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 aLbcj;a(Ljava/util/function/Supplier;Ljava/util/function/ToDoubleFunction;)Ldma;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 aLbcj;a(Latg;ILjava/util/Random;Lgb;)Lgb;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;
-
-