Interface AllCandidateUIDesigner

  • All Implemented Interfaces:

    
    public interface AllCandidateUIDesigner
    
                        

    Interface for customizing the AllCandidateUI, which displays all craft recipe candidates.

    All methods have default implementations, so only the parts that need customization must be overridden; the rest fall back to the default behavior.

    Internally, bake receives a Context and produces a Baked instance with all values resolved. If the resulting Baked fails validation (contradictory or out-of-range values), a Baked built entirely from default values is used instead.

    Since:

    5.2.0

    • Constructor Detail

    • Method Detail

      • title

         Component title(AllCandidateUIDesigner.Context context)

        Returns the title Component of the AllCandidateUI inventory.

        Parameters:
        context - Context provided at bake time
        Returns:

        Component inventory title component

        Since:

        5.2.0

      • previousPageButton

         Pair<CoordinateComponent, ItemStack> previousPageButton(AllCandidateUIDesigner.Context context)

        Returns the slot coordinate and icon item for the previous-page button.

        The Pair used here is a Kotlin class, but can also be constructed from Java as new Pair<>(element1, element2).

        Parameters:
        context - Context provided at bake time
        Returns:

        Pair slot coordinate and icon item for the previous-page button

        Since:

        5.2.0

      • recipeSlots

         Set<CoordinateComponent> recipeSlots(AllCandidateUIDesigner.Context context)

        Returns the set of slot coordinates where recipe icons can be placed.

        The set size must be between 1 and 51 inclusive (total inventory slots minus the 3 button slots), and must not include any coordinate occupied by a button.

        For example, if 45 recipes are available but this method returns a set of 30 slots, the AllCandidateUI will paginate across 2 pages.

        Parameters:
        context - Context provided at bake time
        Returns:

        Set set of slot coordinates available for recipe icons

        Since:

        5.2.0