Interface ColorProviderRegistry<T,​Provider>


public interface ColorProviderRegistry<T,​Provider>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static ColorProviderRegistry<net.minecraft.block.Block,​net.minecraft.client.color.block.BlockColorProvider>
     
    static ColorProviderRegistry<net.minecraft.item.ItemConvertible,​net.minecraft.client.color.item.ItemColorProvider>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    get​(T object)
    Get a color provider for the given object.
    void
    register​(Provider provider, T... objects)
    Register a color provider for one or more objects.
  • Field Details

    • ITEM

      static final ColorProviderRegistry<net.minecraft.item.ItemConvertible,​net.minecraft.client.color.item.ItemColorProvider> ITEM
    • BLOCK

      static final ColorProviderRegistry<net.minecraft.block.Block,​net.minecraft.client.color.block.BlockColorProvider> BLOCK
  • Method Details

    • register

      void register(Provider provider, T... objects)
      Register a color provider for one or more objects.
      Parameters:
      provider - The color provider to register.
      objects - The objects which should be colored using this provider.
    • get

      @Nullable Provider get(T object)
      Get a color provider for the given object.

      Please note that the underlying registry may not be fully populated or stable until the game has started, as other mods may overwrite the registry.

      Parameters:
      object - The object to acquire the provide for.
      Returns:
      The registered mapper for this provider, or null if none is registered or available.