> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/api/net/minecraft/world/effect/mobeffectinstance.md).

# MobEffectInstance

A status effect applied to an entity, with its strength and time left.

### Properties

#### ambient

> `readonly` **ambient**: `boolean`

Whether the effect comes from a beacon or conduit.

***

#### amplifier

> `readonly` **amplifier**: `number`

The effect level minus one, so Speed II has amplifier 1.

***

#### duration

> `readonly` **duration**: `number`

Ticks left, or -1 when the effect is infinite.

***

#### id

> `readonly` **id**: `string`

The effect id, e.g. "minecraft:speed".

**See**

[Effect ids](https://minecraft.wiki/w/Java_Edition_data_values/Effects)

***

#### visible

> `readonly` **visible**: `boolean`

Whether the effect shows particles.

### Methods

#### endsWithin()

> **endsWithin**(`ticks`): `boolean`

Whether the effect runs out within some ticks.

**Parameters**

**ticks**

`number`

The number of ticks.

**Returns**

`boolean`

***

#### isInfiniteDuration()

> **isInfiniteDuration**(): `boolean`

Whether the effect never runs out.

**Returns**

`boolean`
