Class GliderUtils

java.lang.Object
org.geysermc.geyser.util.GliderUtils

public final class GliderUtils extends Object
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 Details

    • GliderUtils

      public GliderUtils()
  • Method Details

    • isGlider

      public static boolean isGlider(GeyserItemStack stack)
      Whether the stack is a glider worn in the chest slot. Java lets a glider glide from any slot its equippable component names (see LivingEntity#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