Skip to content

API reference / @jsprismarine/entity-brains / TestEntity

Class: TestEntity ​

Defined in: testWorld.ts:64

A plain entity the test world hands to sensors and behaviors.

Extended by ​

Implements ​

Constructors ​

Constructor ​

new TestEntity(type, options?): TestEntity

Defined in: testWorld.ts:79

Parameters ​

type ​

string

options? ​

TestEntityOptions = {}

Returns ​

TestEntity

Properties ​

alive ​

alive: boolean

Defined in: testWorld.ts:69

Implementation of ​

BrainEntity.alive


armorItems ​

armorItems: BrainItem[]

Defined in: testWorld.ts:77

Implementation of ​

BrainEntity.armorItems


baby ​

baby: boolean

Defined in: testWorld.ts:70

Implementation of ​

BrainEntity.baby


conditions ​

conditions: Set<string>

Defined in: testWorld.ts:74

See EntityConditions.

Implementation of ​

BrainEntity.conditions


creative ​

creative: boolean

Defined in: testWorld.ts:72


dimensions ​

readonly dimensions: EntityDimensions

Defined in: testWorld.ts:68

Its Java collision box, when the host can provide it.

Implementation of ​

BrainEntity.dimensions


id ​

readonly id: string

Defined in: testWorld.ts:65

A stable identity, used wherever Java stores a UUID in a memory.

Implementation of ​

BrainEntity.id


mainHandItem ​

mainHandItem: BrainItem | undefined

Defined in: testWorld.ts:75

Implementation of ​

BrainEntity.mainHandItem


offHandItem ​

offHandItem: BrainItem | undefined

Defined in: testWorld.ts:76

Implementation of ​

BrainEntity.offHandItem


position ​

position: Vec3

Defined in: testWorld.ts:67

Implementation of ​

BrainEntity.position


spectator ​

spectator: boolean

Defined in: testWorld.ts:71

Implementation of ​

BrainEntity.spectator


type ​

readonly type: string

Defined in: testWorld.ts:66

The entity type id, such as minecraft:piglin.

Implementation of ​

BrainEntity.type


typeTags ​

typeTags: Set<string>

Defined in: testWorld.ts:73

The entity type tags, such as minecraft:axolotl_hunt_targets.

Implementation of ​

BrainEntity.typeTags

Methods ​

canBeTargeted() ​

canBeTargeted(): boolean

Defined in: testWorld.ts:96

Whether combat AI may choose this test entity as a target.

Returns ​

boolean

Implementation of ​

BrainEntity.canBeTargeted