Enum Class MapShade
- All Implemented Interfaces:
Serializable, Comparable<MapShade>, Constable
The four shades a client can draw each
MapColor in.
Terrain maps use them to show relief: a pixel is drawn lighter when the ground rises towards
the north and darker when it falls. The constants are declared in network order, so
Enum.ordinal() is the value stored in the two low bits of a map pixel, see MapPalette.
- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe darkest shade,135/255of the color.The color itself, at full brightness.The shade flat ground is drawn with,220/255of the color.Darker than normal,180/255of the color. -
Method Summary
Modifier and TypeMethodDescriptionintReturns what the client multiplies each channel of the color by, out of255.static MapShadeReturns the enum constant of this class with the specified name.static MapShade[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SHADOW
Darker than normal,180/255of the color. -
NORMAL
The shade flat ground is drawn with,220/255of the color. -
LIGHT
The color itself, at full brightness. -
DEEP_SHADOW
The darkest shade,135/255of the color. Vanilla terrain never uses it.
-
-
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
-
multiplier
public int multiplier()Returns what the client multiplies each channel of the color by, out of255.- Returns:
- what the client multiplies each channel of the color by, out of
255 - Since:
- 0.1.0
-