API reference / @jsprismarine/prismarine / world/end/DragonFight
world/end/DragonFight
Classes
Functions
boxOverlapsCell()
boxOverlapsCell(
feet,box,cell):boolean
Defined in: packages/prismarine/src/world/end/DragonFight.ts:108
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
The entity's feet, the bottom center of its box.
box
height
number
width
number
cell
Returns
boolean
isInDragonArena()
isInDragonArena(
position):boolean
Defined in: packages/prismarine/src/world/end/DragonFight.ts:42
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[]
Defined in: packages/prismarine/src/world/end/DragonFight.ts:94
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
The exit portal's center, the podium's rim level.
Returns
Java See
EnderDragonFight.tryRespawn
References
DragonFightState
Re-exports DragonFightState