API reference / @jsprismarine/entity-brains / NearestVisibleLivingEntitySensor
Abstract Class: NearestVisibleLivingEntitySensor
Defined in: sensing/sensors.ts:280
The base of the four sensors that pick one entity out of the visible set.
Extends
Extended by
Constructors
Constructor
new NearestVisibleLivingEntitySensor(
scanRate?):NearestVisibleLivingEntitySensor
Defined in: sensing/sensor.ts:33
Parameters
scanRate?
number = DEFAULT_SCAN_RATE
Returns
NearestVisibleLivingEntitySensor
Inherited from
Properties
name
abstractreadonlyname:string
Defined in: sensing/sensors.ts:281
The Java class name, which is what a debug read-out shows.
Overrides
scanRate
readonlyscanRate:number=DEFAULT_SCAN_RATE
Defined in: sensing/sensor.ts:33
Inherited from
Accessors
requires
Get Signature
get requires(): readonly
MemoryModuleType<unknown>[]
Defined in: sensing/sensors.ts:287
Every memory the sensor writes. The brain registers each one when the sensor is added.
Returns
readonly MemoryModuleType<unknown>[]
Every memory the sensor writes. The brain registers each one when the sensor is added.
Overrides
Methods
randomlyDelayStart()
randomlyDelayStart(
randomInt):void
Defined in: sensing/sensor.ts:36
Java's randomlyDelayStart: offsets the first scan into [0, scanRate).
Parameters
randomInt
(bound) => number
Returns
void
Inherited from
tick()
tick(
context):void
Defined in: sensing/sensor.ts:41
Counts down and scans when the countdown reaches zero.
Parameters
context
Returns
void