Interface MapPalette.MapColorCache

Enclosing class:
MapPalette

public static interface MapPalette.MapColorCache
Holds cached information for matching map colors of a given RBG color.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if the MapColorCache has values cached, if not it will return false.
    byte
    Deprecated.
    Magic value
  • Method Details

    • isCached

      boolean isCached()
      Returns true if the MapColorCache has values cached, if not it will return false. A case where it might return false is when the cache is not build jet.
      Returns:
      true if this MapColorCache has values cached otherwise false
    • matchColor

      @Deprecated byte matchColor(@NotNull Color color)
      Deprecated.
      Magic value
      Get the cached index of the closest matching color in the palette to the given color.
      Parameters:
      color - The Color to match.
      Returns:
      The index in the palette.
      Throws:
      IllegalStateException - if isCached() returns false