# MobEntityHelper

`com.jsmacrosce.jsmacros.client.api.helper.world.entity.MobEntityHelper`

**Since:** 1.8.4

Wraps a Minecraft mob and exposes its mob-specific state.  

```js
const mobs = World.getEntities("zombie", "skeleton", "creeper");  
if (mobs !== null) {
  for (const entity of mobs) {
    if (!(entity instanceof EntityHelpers.Mob)) continue;  
    if (entity.isAiDisabled()) {
      Chat.log(`a ${entity.getType()} near ${entity.getPos()} has no AI and is not going anywhere`);  
    }
  }
}
```

Available in scripts as `EntityHelpers.Mob`.

## Type Parameters

- `T`: the Minecraft mob type wrapped by this helper

## Constructors

### new MobEntityHelper {#com.jsmacrosce.jsmacros.client.api.helper.world.entity.MobEntityHelper_constructor-T-}

```js
new MobEntityHelper(T extends Mob base)
```

Wraps the supplied mob and retains its reference for this helper.

**Parameters:**
- `base`: mob to wrap

## Methods

### isAiDisabled {#com.jsmacrosce.jsmacros.client.api.helper.world.entity.MobEntityHelper_isAiDisabled-}

```js
isAiDisabled(): boolean
```

Returns whether the mob's no-AI flag is set.

**Returns:** `true` if the entity's AI is disabled, `false` otherwise.

**Since:** 1.8.4

### isAttacking {#com.jsmacrosce.jsmacros.client.api.helper.world.entity.MobEntityHelper_isAttacking-}

```js
isAttacking(): boolean
```

Returns whether the mob's aggressive-state flag is set.

**Returns:** `true` if the entity's aggressive flag is set, `false`
otherwise.

**Since:** 1.8.4
