Skip to content

API reference / @jsprismarine/entity-brains / PiglinBruteSpecificSensor

Class: PiglinBruteSpecificSensor ​

Defined in: sensing/sensors.ts:687

Java's PiglinBruteSpecificSensor: the two memories a brute needs out of the piglin set.

Extends ​

Constructors ​

Constructor ​

new PiglinBruteSpecificSensor(scanRate?): PiglinBruteSpecificSensor

Defined in: sensing/sensor.ts:33

Parameters ​

scanRate? ​

number = DEFAULT_SCAN_RATE

Returns ​

PiglinBruteSpecificSensor

Inherited from ​

Sensor.constructor

Properties ​

name ​

readonly name: "PiglinBruteSpecificSensor" = 'PiglinBruteSpecificSensor'

Defined in: sensing/sensors.ts:688

The Java class name, which is what a debug read-out shows.

Overrides ​

Sensor.name


requires ​

readonly requires: readonly MemoryModuleType<unknown>[]

Defined in: sensing/sensors.ts:689

Every memory the sensor writes. The brain registers each one when the sensor is added.

Overrides ​

Sensor.requires


scanRate ​

readonly scanRate: number = DEFAULT_SCAN_RATE

Defined in: sensing/sensor.ts:33

Inherited from ​

Sensor.scanRate

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 ​

Sensor.randomlyDelayStart


tick() ​

tick(context): void

Defined in: sensing/sensor.ts:41

Counts down and scans when the countdown reaches zero.

Parameters ​

context ​

BrainContext

Returns ​

void

Inherited from ​

Sensor.tick