Interface ColorRegistry


@NonExtendable @Environment(CLIENT) public interface ColorRegistry
Provides a way to register custom color keys and categories to allow user-customization through the mod's config.
Since:
3.2.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A color category.
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<net.minecraft.resources.ResourceLocation,ColorRegistry.Category>
    Access to all the registered categories.
    category(net.minecraft.resources.ResourceLocation categoryId)
    Access to a category, the returned instance will only be registered if at least one color key is registered to it.
    Access to the default category.
  • Method Details

    • category

      @Nonnull ColorRegistry.Category category(net.minecraft.resources.ResourceLocation categoryId)
      Access to a category, the returned instance will only be registered if at least one color key is registered to it.

      In the GUI, the category will be represented by a sub-list in the 'Colors' category of the config screen. The name of the category is obtained by localizing the string shulkerboxtooltip.colors.MOD_ID.CATEGORY_ID, Where MOD_ID is the namespace of categoryId, and CATEGORY_ID is the path of categoryId.

      Parameters:
      categoryId - The unique identifier of the category.
      Returns:
      The category.
      Since:
      3.2.0
    • defaultCategory

      @Nonnull ColorRegistry.Category defaultCategory()
      Access to the default category.

      In the GUI, the keys belonging the default category will appear at the root of the 'Colors' category, before other color category sub-lists.

      Returns:
      The default category instance.
      Since:
      3.2.0
    • categories

      @Nonnull Map<net.minecraft.resources.ResourceLocation,ColorRegistry.Category> categories()
      Access to all the registered categories.
      Returns:
      An immutable view over the existing categories.
      Since:
      3.2.0