Class ElementPrototypeDescriptor.ElementPrototypeBuilder<TSelf,​TData,​TPayload extends IElementPrototypeData<TData>>

    • Constructor Detail

      • ElementPrototypeBuilder

        protected ElementPrototypeBuilder​(TPayload payload)
    • Method Detail

      • icon

        public TSelf icon​(IGuiIcon icon)
        Sets the icon for this element prototype, as shown in the UI.
        Parameters:
        icon - The icon for this element prototype.
        Returns:
        This builder instance for chaining method calls.
      • label

        public TSelf label​(String label)
        Sets the localized name of the prototype item, as shown in the UI.
        Parameters:
        label - The localized name of the prototype item.
        Returns:
        This builder instance for chaining method calls.
      • mainCategory

        public TSelf mainCategory​(IElementCategory mainCategory)
        Sets the element's main category, which is used for grouping the elements.
        Parameters:
        mainCategory - The element's main category.
        Returns:
        This builder instance for chaining method calls.
      • searchText

        public TSelf searchText​(String searchText)
        Sets the search text that is never visible to the user, but only used when searching for an element, such as via a search input field in the UI.
        Parameters:
        searchText - The search text for this prototype.
        Returns:
        This builder instance for chaining method calls.
      • subCategory

        public TSelf subCategory​(IElementCategory subCategory)
        Set the optional sub category, which is used for grouping the element within the given main group.
        Parameters:
        subCategory - The element's sub category.
        Returns:
        This builder instance for chaining method calls.
      • subLabel

        public TSelf subLabel​(String subLabel)
        Sets the localized sub label of the prototype item. The sub label, when not empty, is shown below the label in a smaller font size and may provide additional details about the item. * @param subLabel
        Parameters:
        subLabel - The localized sub label of the prototype item.
        Returns:
        This builder instance for chaining method calls.
      • tags

        public TSelf tags​(Set<EElementPrototypeTag> tags)
        Sets the list of tags for this prototype that may affect when this prototype is visible etc.
        Parameters:
        tags - List of tags for this prototype.
        Returns:
        This builder instance for chaining method calls.
      • title

        public TSelf title​(String title)
        Sets the localized title for the this prototype. The title is the tooltip that shows up when the user hovers over the item with the mouse.
        Parameters:
        title - The localized title for the prototype.
        Returns:
        This builder instance for chaining method calls.
      • getSelf

        protected abstract TSelf getSelf()