net.minecraft.entity.ai.brain.sensor

public abstract class Sensor<E extends LivingEntity>

net.minecraft.world.entity.ai.sensing.Sensor
net.minecraft.class_4148
net.minecraft.entity.ai.brain.sensor.Sensor

Field summary

Modifier and TypeField
private static final int
DEFAULT_SCAN_RATE
field_30259
DEFAULT_RUN_TIME
private static final int
DEFAULT_TARGETING_RANGE
field_30258
BASE_MAX_DISTANCE
private static final TargetPredicate
TARGET_CONDITIONS
field_26630
TARGET_PREDICATE
private static final TargetPredicate
TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING
field_26631
TARGET_PREDICATE_IGNORE_DISTANCE_SCALING
private static final TargetPredicate
ATTACK_TARGET_CONDITIONS
field_33762
ATTACKABLE_TARGET_PREDICATE
private static final TargetPredicate
ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING
field_33763
ATTACKABLE_TARGET_PREDICATE_IGNORE_DISTANCE_SCALING
private static final TargetPredicate
ATTACK_TARGET_CONDITIONS_IGNORE_LINE_OF_SIGHT
field_34050
ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY
private static final TargetPredicate
ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_AND_LINE_OF_SIGHT
field_34051
ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY_OR_DISTANCE_SCALING
private final int
scanRate
field_18464
senseInterval
private long
timeToTick
field_18463
lastSenseTime

Constructor summary

ModifierConstructor
public (int senseInterval)
public ()

Method summary

Modifier and TypeMethod
public void
randomlyDelayStart(RandomSource randomSource)
method_1_1753(class_5819 arg0)
initializeLastSenseTime(Random random)
public final void
tick(ServerLevel level, E body)
method_19100(class_3218 arg0, E arg1)
tick(ServerWorld world, E entity)
private void
updateTargetingConditionRanges(E body)
method_61444(E arg0)
updateRange(E entity)
protected abstract void
doTick(ServerLevel level, E body)
method_19101(class_3218 arg0, E arg1)
sense(ServerWorld world, E entity)
public abstract Set<MemoryModuleType<?>>
requires()
method_19099()
getOutputMemoryModules()
public static boolean
isEntityTargetable(ServerLevel level, LivingEntity body, LivingEntity entity)
method_30954(class_3218 arg0, class_1309 arg1, class_1309 arg2)
testTargetPredicate(ServerWorld world, LivingEntity entity, LivingEntity target)
public static boolean
isEntityAttackable(ServerLevel level, LivingEntity body, LivingEntity target)
method_36982(class_3218 arg0, class_1309 arg1, class_1309 arg2)
testAttackableTargetPredicate(ServerWorld world, LivingEntity entity, LivingEntity target)
public static BiPredicate<ServerWorld, LivingEntity>
wasEntityAttackableLastNTicks(LivingEntity body, int ticks)
method_61445(class_1309 arg0, int arg1)
hasTargetBeenAttackableRecently(LivingEntity entity, int ticks)
public static boolean
isEntityAttackableIgnoringLineOfSight(ServerLevel level, LivingEntity body, LivingEntity target)
method_37456(class_3218 arg0, class_1309 arg1, class_1309 arg2)
testAttackableTargetPredicateIgnoreVisibility(ServerWorld world, LivingEntity entity, LivingEntity target)
public static <T, U> BiPredicate<T, U>
rememberPositives(int invocations, BiPredicate<T, U> predicate)
method_61443(int arg0, BiPredicate<T, U> arg1)
hasPredicatePassedRecently(int times, BiPredicate<T, U> predicate)
private static boolean
lambda$rememberPositives$0(BiPredicate arg0, AtomicInteger arg1, int arg2, Object arg3, Object arg4)
method_61447(BiPredicate arg0, AtomicInteger arg1, int arg2, Object arg3, Object arg4)
method_61447(BiPredicate arg0, AtomicInteger arg1, int arg2, Object world, Object target)
private static boolean
lambda$wasEntityAttackableLastNTicks$0(LivingEntity arg0, ServerLevel arg1, LivingEntity arg2)
method_61446(class_1309 arg0, class_3218 arg1, class_1309 arg2)
method_61446(LivingEntity arg0, ServerWorld world, LivingEntity target)