Enum Class MapScale
- All Implemented Interfaces:
Serializable, Comparable<MapScale>, Constable
How many blocks one pixel of a terrain map covers.
The constants are declared in network order: Enum.ordinal() is the zoom level the client
shows in the tooltip of a map.
- Since:
- 0.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionOne pixel per 8×8 blocks: the map covers 1024×1024 blocks.One pixel per 4×4 blocks: the map covers 512×512 blocks.One pixel per block: the map covers 128×128 blocks.One pixel per 16×16 blocks: the map covers 2048×2048 blocks.One pixel per 2×2 blocks: the map covers 256×256 blocks. -
Method Summary
Modifier and TypeMethodDescriptionintblocks()Returns how many blocks one side of the map covers.intReturns how many blocks one side of a pixel covers.intlevel()Returns the zoom level,0-4.static MapScaleReturns the enum constant of this class with the specified name.static MapScale[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ONE_TO_ONE
One pixel per block: the map covers 128×128 blocks. What an empty map makes. -
ONE_TO_TWO
One pixel per 2×2 blocks: the map covers 256×256 blocks. -
ONE_TO_FOUR
One pixel per 4×4 blocks: the map covers 512×512 blocks. -
ONE_TO_EIGHT
One pixel per 8×8 blocks: the map covers 1024×1024 blocks. -
ONE_TO_SIXTEEN
One pixel per 16×16 blocks: the map covers 2048×2048 blocks.
-
-
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
-
level
public int level()Returns the zoom level,0-4.- Returns:
- the zoom level,
0-4 - Since:
- 0.1.0
-
blocksPerPixel
public int blocksPerPixel()Returns how many blocks one side of a pixel covers.- Returns:
- how many blocks one side of a pixel covers
- Since:
- 0.1.0
-
blocks
public int blocks()Returns how many blocks one side of the map covers.- Returns:
- how many blocks one side of the map covers
- Since:
- 0.1.0
-