Package org.geysermc.geyser.util
Class GliderUtils
java.lang.Object
org.geysermc.geyser.util.GliderUtils
Bedrock has no glider component; its client only glides with a vanilla elytra in the chest slot.
A player's custom glider is therefore shown to Bedrock as an elytra, so that the player can glide with it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisGlider(GeyserItemStack stack) Whether the stack is a glider worn in the chest slot.static org.cloudburstmc.protocol.bedrock.data.inventory.ItemDatatoBedrockChest(GeyserSession session, GeyserItemStack stack, org.cloudburstmc.protocol.bedrock.data.inventory.ItemData item)
-
Constructor Details
-
GliderUtils
public GliderUtils()
-
-
Method Details
-
isGlider
Whether the stack is a glider worn in the chest slot. Java lets a glider glide from any slot its equippable component names (seeLivingEntity#canGlideUsing), but Bedrock only glides with an elytra in the chest slot, so gliders configured for any other slot are left as they are. -
toBedrockChest
public static org.cloudburstmc.protocol.bedrock.data.inventory.ItemData toBedrockChest(GeyserSession session, GeyserItemStack stack, org.cloudburstmc.protocol.bedrock.data.inventory.ItemData item) - Returns:
- the chest slot item as Bedrock should see it, an elytra if it is a glider that would not translate to one
-