Skip to content

API reference / @jsprismarine/prismarine / entity/data/areaEffectCloud

entity/data/areaEffectCloud ​

Classes ​

Interfaces ​

AreaEffectCloudHost ​

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:133

What the clouds need of the runtime.

Methods ​

applyStatusEffect() ​

applyStatusEffect(source, targetId, effect): void

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:141

Gives an entity a lasting status effect.

Parameters ​
source ​

DataEntity

targetId ​

number

effect ​

EntityStatusEffect

Returns ​

void

heal() ​

heal(id, amount): void

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:139

Heals an entity by its runtime id.

Parameters ​
id ​

number

amount ​

number

Returns ​

void

hurt() ​

hurt(entity, sourceId, cause, amount): void

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:137

Hurts an entity, answerable to sourceId when there is one.

Parameters ​
entity ​

DataEntity

sourceId ​

number | undefined

cause ​

string

amount ​

number

Returns ​

void

remove() ​

remove(id, reason): void

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:142

Parameters ​
id ​

number

reason ​

string

Returns ​

void

withinBox() ​

withinBox(min, max): readonly DataEntity[]

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:135

The entities whose boxes cross an axis-aligned box.

Parameters ​
min ​

EntityPosition

max ​

EntityPosition

Returns ​

readonly DataEntity[]

Variables ​

AREA_EFFECT_CLOUD ​

const AREA_EFFECT_CLOUD: "minecraft:area_effect_cloud" = 'minecraft:area_effect_cloud'

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:25

The type of every area effect cloud.

Functions ​

instantEffect() ​

instantEffect(effect, amplifier, strength, undead): { amount: number; kind: "hurt" | "heal"; } | undefined

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:117

Java's HealOrHarmMobEffect.applyInstantaneousEffect at a strength: instant health heals 4 << amplifier and instant damage hurts 6 << amplifier, each times the strength and rounded, and an undead target takes the one for the other. Undefined for any other effect.

Parameters ​

effect ​

string

amplifier ​

number

strength ​

number

undead ​

boolean

Returns ​

{ amount: number; kind: "hurt" | "heal"; } | undefined

Java Source ​

HealOrHarmMobEffect.applyInstantaneousEffect


isAreaEffectCloud() ​

isAreaEffectCloud(entity): boolean

Defined in: packages/prismarine/src/entity/data/areaEffectCloud.ts:130

Whether a data entity is an area effect cloud this system runs.

Parameters ​

entity ​

DataEntity

Returns ​

boolean