[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / world/end/DragonFight

# world/end/DragonFight

## Classes

- [DragonFight](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/end/DragonFight/classes/DragonFight.md)

## Functions

### boxOverlapsCell()

> **boxOverlapsCell**(`feet`, `box`, `cell`): `boolean`

Defined in: [packages/prismarine/src/world/end/DragonFight.ts:108](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/end/DragonFight.ts#L108)

Whether an entity's box overlaps a block cell, as Java's `getEntitiesOfClass` over
`new AABB(pos)` finds it. A box that only touches the cell's face does not count.

#### Parameters

##### feet

[`EntityPosition`](https://jsprismarine.dev/api/@jsprismarine/entities/index.md#entityposition)

The entity's feet, the bottom center of its box.

##### box

###### height

`number`

###### width

`number`

##### cell

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#blockposition)

#### Returns

`boolean`

***

### isInDragonArena()

> **isInDragonArena**(`position`): `boolean`

Defined in: [packages/prismarine/src/world/end/DragonFight.ts:42](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/end/DragonFight.ts#L42)

Whether a player standing here sees the dragon's bar, Java's `EnderDragonFight.validPlayer`:
within 192 blocks of (0, 128, 0), the distance measured in three dimensions.

#### Parameters

##### position

###### x

`number`

###### y

`number`

###### z

`number`

#### Returns

`boolean`

#### Java See

EnderDragonFight.validPlayer

***

### respawnCrystalCells()

> **respawnCrystalCells**(`origin`): [`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#blockposition)[]

Defined in: [packages/prismarine/src/world/end/DragonFight.ts:94](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/end/DragonFight.ts#L94)

The four cells a respawn crystal must touch, two blocks out from the exit portal's center and
one up, over the portal's end portal ring. A crystal placed on the bedrock rim three blocks out
stands half a block into one of them, since it is two blocks wide.

#### Parameters

##### origin

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#blockposition)

The exit portal's center, the podium's rim level.

#### Returns

[`BlockPosition`](https://jsprismarine.dev/api/@jsprismarine/blocks/index.md#blockposition)[]

#### Java See

EnderDragonFight.tryRespawn

## References

### DragonFightState

Re-exports [DragonFightState](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/WorldPersistence/index.md#dragonfightstate)
