Skip to content

API reference / @jsprismarine/entity-brains / DoNothing

Class: DoNothing ​

Defined in: behavior/control.ts:213

Java's DoNothing: occupies its activity for a drawn number of ticks and does nothing else.

It is not a Behavior in Java either, because it has no memory conditions and must start unconditionally.

Implements ​

Constructors ​

Constructor ​

new DoNothing(minDuration, maxDuration): DoNothing

Defined in: behavior/control.ts:220

Parameters ​

minDuration ​

number

maxDuration ​

number

Returns ​

DoNothing

Properties ​

name ​

readonly name: "DoNothing" = 'DoNothing'

Defined in: behavior/control.ts:214

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

Implementation of ​

BehaviorControl.name


requiredMemories ​

readonly requiredMemories: readonly MemoryModuleType<unknown>[] = []

Defined in: behavior/control.ts:215

Every memory the behavior reads or writes. The brain registers each one when the behavior is added, which is how a memory a mob never declares still gets a slot.

Implementation of ​

BehaviorControl.requiredMemories

Accessors ​

status ​

Get Signature ​

get status(): BehaviorStatus

Defined in: behavior/control.ts:225

Returns ​

BehaviorStatus

Implementation of ​

BehaviorControl.status

Methods ​

doStop() ​

doStop(_context, _timestamp): void

Defined in: behavior/control.ts:245

Marks the wait stopped.

Parameters ​

_context ​

BrainContext

_timestamp ​

number

Returns ​

void

Implementation of ​

BehaviorControl.doStop


tickOrStop() ​

tickOrStop(context, timestamp): void

Defined in: behavior/control.ts:238

Keeps standing still until the drawn duration runs out.

Parameters ​

context ​

BrainContext

timestamp ​

number

Returns ​

void

Implementation of ​

BehaviorControl.tickOrStop


tryStart() ​

tryStart(context, timestamp): boolean

Defined in: behavior/control.ts:230

Always starts, and draws how many ticks the mob stands still for.

Parameters ​

context ​

BrainContext

timestamp ​

number

Returns ​

boolean

Implementation of ​

BehaviorControl.tryStart