Class Sensor<E extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.brain.sensor.Sensor<E>
- Direct Known Subclasses:
AxolotlTemptationsSensor,DummySensor,GolemLastSeenSensor,HoglinSpecificSensor,HurtBySensor,NearestBedSensor,NearestHostileSensor,NearestItemsSensor,NearestLivingEntitiesSensor,NearestPlayersSensor,NearestVisibleAdultSensor,PiglinBruteSpecificSensor,PiglinSpecificSensor,SecondaryPointsOfInterestSensor,VillagerBabiesSensor
public abstract class Sensor<E extends LivingEntity> extends Object
-
Field Summary
Fields Modifier and Type Field Description private longlastSenseTimeprivate static RandomRANDOMprivate intsenseIntervalprivate static TargetPredicateTARGET_PREDICATEprivate static TargetPredicateTARGET_PREDICATE_IGNORE_DISTANCE_SCALING -
Constructor Summary
-
Method Summary
Modifier and Type Method Description abstract Set<MemoryModuleType<?>>getOutputMemoryModules()protected static booleanmethod_30954(LivingEntity entity, LivingEntity target)protected abstract voidsense(ServerWorld world, E entity)voidtick(ServerWorld world, E entity)
-
Field Details
-
RANDOM
-
TARGET_PREDICATE
-
TARGET_PREDICATE_IGNORE_DISTANCE_SCALING
-
senseInterval
private final int senseInterval -
lastSenseTime
private long lastSenseTime
-
-
Constructor Details
-
Sensor
public Sensor(int senseInterval) -
Sensor
public Sensor()
-
-
Method Details
-
tick
-
sense
-
getOutputMemoryModules
-
method_30954
-