API reference / @jsprismarine/entity-brains / AxolotlAttackablesSensor
Class: AxolotlAttackablesSensor
Defined in: sensing/sensors.ts:307
Java's AxolotlAttackablesSensor: a submerged target within 8 blocks that is either always hostile to axolotls or a hunt target, and only when the hunting cooldown is clear.
Extends
Constructors
Constructor
new AxolotlAttackablesSensor(
scanRate?):AxolotlAttackablesSensor
Defined in: sensing/sensor.ts:33
Parameters
scanRate?
number = DEFAULT_SCAN_RATE
Returns
AxolotlAttackablesSensor
Inherited from
NearestVisibleLivingEntitySensor.constructor
Properties
name
readonlyname:"AxolotlAttackablesSensor"='AxolotlAttackablesSensor'
Defined in: sensing/sensors.ts:308
The Java class name, which is what a debug read-out shows.
Overrides
NearestVisibleLivingEntitySensor.name
scanRate
readonlyscanRate:number=DEFAULT_SCAN_RATE
Defined in: sensing/sensor.ts:33
Inherited from
NearestVisibleLivingEntitySensor.scanRate
Accessors
requires
Get Signature
get requires(): readonly
MemoryModuleType<unknown>[]
Defined in: sensing/sensors.ts:311
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
NearestVisibleLivingEntitySensor.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
NearestVisibleLivingEntitySensor.randomlyDelayStart
tick()
tick(
context):void
Defined in: sensing/sensor.ts:41
Counts down and scans when the countdown reaches zero.
Parameters
context
Returns
void