Enum Class MapColors.ColorMappingStrategy

java.lang.Object
java.lang.Enum<MapColors.ColorMappingStrategy>
net.minestom.server.map.MapColors.ColorMappingStrategy
All Implemented Interfaces:
Serializable, Comparable<MapColors.ColorMappingStrategy>, Constable
Enclosing class:
MapColors

public static enum MapColors.ColorMappingStrategy extends Enum<MapColors.ColorMappingStrategy>
How does Minestom compute RGB to MapColor transitions?
  • Enum Constant Details

    • LAZY

      public static final MapColors.ColorMappingStrategy LAZY
      If already computed, send the result. Otherwise, compute the closest color in a RGB Map, and add it to the map
    • PRECISE

      public static final MapColors.ColorMappingStrategy PRECISE
      All colors are already in the map after the first call. Heavy hit on the memory: (2^24) * 4 bytes at the min (~64MB)
    • APPROXIMATE

      public static final MapColors.ColorMappingStrategy APPROXIMATE
      RGB components are divided by 10 before issuing a lookup (as with the PRECISE strategy), but saves on memory usage
  • Method Details

    • values

      public static MapColors.ColorMappingStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MapColors.ColorMappingStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null