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 -
Method Summary
Modifier and TypeMethodDescriptionMap<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
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, WhereMOD_IDis the namespace ofcategoryId, andCATEGORY_IDis the path ofcategoryId.- Parameters:
categoryId- The unique identifier of the category.- Returns:
- The category.
- Since:
- 3.2.0
-
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
Access to all the registered categories.- Returns:
- An immutable view over the existing categories.
- Since:
- 3.2.0
-