Package net.minestom.server.map
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
How does Minestom compute RGB to MapColor transitions?
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionRGB components are divided by 10 before issuing a lookup (as with the PRECISE strategy), but saves on memory usageIf already computed, send the result.All colors are already in the map after the first call. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static MapColors.ColorMappingStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LAZY
If already computed, send the result. Otherwise, compute the closest color in a RGB Map, and add it to the map -
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
RGB components are divided by 10 before issuing a lookup (as with the PRECISE strategy), but saves on memory usage
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-