Skip to content

API reference / @jsprismarine/prismarine / entity/gliding

entity/gliding ​

Interfaces ​

GliderStack ​

Defined in: packages/prismarine/src/entity/gliding.ts:14

What one worn stack says about gliding.

Methods ​

getDurability() ​

getDurability(): number

Defined in: packages/prismarine/src/entity/gliding.ts:18

The durability the stack has left.

Returns ​

number

getMaxDurability() ​

getMaxDurability(): number

Defined in: packages/prismarine/src/entity/gliding.ts:20

The durability it starts with, or 0 for a stack that does not wear.

Returns ​

number

rawComponent() ​

rawComponent(name): unknown

Defined in: packages/prismarine/src/entity/gliding.ts:16

A data component as the stack carries it, or as its item type writes it.

Parameters ​
name ​

string

Returns ​

unknown


GlidingBody ​

Defined in: packages/prismarine/src/entity/gliding.ts:24

What gliding reads about the entity that would glide.

Properties ​

levitating ​

readonly levitating: boolean

Defined in: packages/prismarine/src/entity/gliding.ts:28

Whether Levitation is on it, which lifts it rather than letting it glide.

onGround ​

readonly onGround: boolean

Defined in: packages/prismarine/src/entity/gliding.ts:25

riding ​

readonly riding: boolean

Defined in: packages/prismarine/src/entity/gliding.ts:26

Methods ​

equipment() ​

equipment(slot): GliderStack | null

Defined in: packages/prismarine/src/entity/gliding.ts:30

What it wears or holds in a slot, or null for nothing.

Parameters ​
slot ​

"head" | "chest" | "feet" | "mainhand" | "offhand" | "body" | "legs"

Returns ​

GliderStack | null

Functions ​

canGlide() ​

canGlide(body): boolean

Defined in: packages/prismarine/src/entity/gliding.ts:53

Whether an entity may glide this tick: in the air, riding nothing, not levitating, and wearing a glider that holds.

Parameters ​

body ​

GlidingBody

Returns ​

boolean

Java Source ​

LivingEntity.canGlide


canStartGliding() ​

canStartGliding(body): boolean

Defined in: packages/prismarine/src/entity/gliding.ts:67

Whether a player may start gliding: one that may glide, out of water and lava. Java's tryToStartFallFlying also refuses a player already gliding, which the caller sees for itself.

Parameters ​

body ​

GlidingBody & object

Returns ​

boolean

Java Source ​

Player.tryToStartFallFlying


glidesUsing() ​

glidesUsing(stack, slot): boolean

Defined in: packages/prismarine/src/entity/gliding.ts:39

Whether a stack holds its wearer up from a slot: a glider, worn where it is equipped, that its next damage would not break.

Parameters ​

stack ​

GliderStack

slot ​

"head" | "chest" | "feet" | "mainhand" | "offhand" | "body" | "legs"

Returns ​

boolean

Java Source ​

LivingEntity.canGlideUsing