Interface CustomItemBedrockOptions


public interface CustomItemBedrockOptions
This is used to store options for a custom item definition that can't be described using item components.
Since:
2.9.3
  • Method Details

    • icon

      @Deprecated(since="2.12.0") default @Nullable String icon()
      Deprecated.
      since 2.12.0: use icons() and CustomItemIcons.defaultIcon() instead
      Gets the item's icon, if it was manually set. When not present, the item's Bedrock identifier is used.

      This method is deprecated and planned to be removed in Geyser 2.14.0.

      Returns:
      the item's icon
      Since:
      2.9.3
      See Also:
    • icons

      Gets the item's icon data. Defaults to CustomItemIcons.EMPTY if not manually set using CustomItemBedrockOptions.Builder.icons(CustomItemIcons).
      Returns:
      the item's icon data
      Since:
      2.12.0
      See Also:
    • allowOffhand

      boolean allowOffhand()
      If the item is allowed to be put into the offhand. Defaults to true.
      Returns:
      true if the item is allowed to be used in the offhand, false otherwise
      Since:
      2.9.3
    • displayHandheld

      boolean displayHandheld()
      If the item should be displayed as handheld, like a tool. Defaults to false.
      Returns:
      true if the item should be displayed as handheld, false otherwise
      Since:
      2.9.3
    • protectionValue

      int protectionValue()
      Since Bedrock doesn't properly support setting item armor values over attributes, this value determines how many armor points should be shown when this item is worn. This is purely visual.

      Only has an effect when the item is equippable, and defaults to 0.

      Returns:
      the item's visually shown protection value
      Since:
      2.9.3
    • creativeCategory

      CreativeCategory creativeCategory()
      The item's creative category. Defaults to NONE.
      Returns:
      the item's creative category
      Since:
      2.9.3
    • creativeGroup

      @Nullable String creativeGroup()
      The item's creative group.

      A list of creative groups available in vanilla can be found here.

      Returns:
      the item's creative group
      Since:
      2.9.3
    • tags

      Set<Identifier> tags()
      Gets the item's set of bedrock tags that can be used in Molang. Equivalent to "tag:some_tag".
      Returns:
      the item's set of bedrock tags, can be empty
      Since:
      2.9.3
    • defaultDyeableColor

      @Nullable Integer defaultDyeableColor()
      Returns the default color of the item if it is dyeable, and if not, null.

      The client allows dyeing dyeable items using any of the vanilla dyes in a crafting table.

      Returns:
      the default color of the item if it is dyeable, and if not, null
      Since:
      2.12.0
    • builder

      Creates a new builder for custom item bedrock options.
      Returns:
      a new builder
      Since:
      2.9.3