API reference / @jsprismarine/entity-brains / SecondaryPoiSensor
Class: SecondaryPoiSensor
Defined in: sensing/sensors.ts:406
Java's SecondaryPoiSensor: the blocks of a villager profession's secondary point of interest inside a 9 by 5 by 9 box, which is how a farmer finds its farmland.
Extends
Constructors
Constructor
new SecondaryPoiSensor(
secondaryPoiBlocks):SecondaryPoiSensor
Defined in: sensing/sensors.ts:410
Parameters
secondaryPoiBlocks
ReadonlySet<string>
Returns
SecondaryPoiSensor
Overrides
Properties
name
readonlyname:"SecondaryPoiSensor"='SecondaryPoiSensor'
Defined in: sensing/sensors.ts:407
The Java class name, which is what a debug read-out shows.
Overrides
requires
readonlyrequires: readonlyMemoryModuleType<unknown>[]
Defined in: sensing/sensors.ts:408
Every memory the sensor writes. The brain registers each one when the sensor is added.
Overrides
scanRate
readonlyscanRate:number=DEFAULT_SCAN_RATE
Defined in: sensing/sensor.ts:33
Inherited from
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