API reference / @jsprismarine/entity-brains / BreezeAttackEntitySensor
Class: BreezeAttackEntitySensor
Defined in: sensing/sensors.ts:551
Java's BreezeAttackEntitySensor: NearestLivingEntitySensor plus the closest attackable entity that is not a creative or spectator player.
Extends
Constructors
Constructor
new BreezeAttackEntitySensor(
scanRate?):BreezeAttackEntitySensor
Defined in: sensing/sensor.ts:33
Parameters
scanRate?
number = DEFAULT_SCAN_RATE
Returns
BreezeAttackEntitySensor
Inherited from
NearestLivingEntitySensor.constructor
Properties
name
readonlyname:"BreezeAttackEntitySensor"='BreezeAttackEntitySensor'
Defined in: sensing/sensors.ts:552
The Java class name, which is what a debug read-out shows.
Overrides
NearestLivingEntitySensor.name
scanRate
readonlyscanRate:number=DEFAULT_SCAN_RATE
Defined in: sensing/sensor.ts:33
Inherited from
NearestLivingEntitySensor.scanRate
Accessors
requires
Get Signature
get requires(): readonly
MemoryModuleType<unknown>[]
Defined in: sensing/sensors.ts:554
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
NearestLivingEntitySensor.requires
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
NearestLivingEntitySensor.randomlyDelayStart
tick()
tick(
context):void
Defined in: sensing/sensor.ts:41
Counts down and scans when the countdown reaches zero.
Parameters
context
Returns
void