Interface GeyserThrowableComponent


public interface GeyserThrowableComponent
The throwable component allows creating items that can be thrown. This allows bedrock players to continuously throw an item stack by holding down the use button, instead of having to use individual presses.

The component also allows specifying whether bedrock clients should display a swing animation when throwing the item. This defaults to true.

Since:
2.9.3
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Builder for the throwable component.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new builder for the throwable component.
    boolean
    Whether bedrock clients should display a swing animation when throwing the item.
    of(boolean doSwingAnimation)
    Creates a throwable component with the given doSwingAnimation value.
  • Method Details

    • doSwingAnimation

      boolean doSwingAnimation()
      Whether bedrock clients should display a swing animation when throwing the item. Defaults to true.
      Returns:
      true if bedrock clients should display a swing animation when throwing the item
      Since:
      2.9.3
    • builder

      Creates a new builder for the throwable component.
      Returns:
      a new builder
      Since:
      2.9.3
    • of

      static GeyserThrowableComponent of(boolean doSwingAnimation)
      Creates a throwable component with the given doSwingAnimation value.
      Parameters:
      doSwingAnimation - whether bedrock clients should display a swing animation when throwing the item
      Returns:
      a throwable component
      Since:
      2.9.3