Enum Class MoonPhase
- All Implemented Interfaces:
Serializable,Comparable<MoonPhase>,Constable
Represents the phases of the moon
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA first quarter.A full moon.A new moon.An invalid phase.A third quarter.A waning crescent.A waning gibbous.A waxing crescent.A waxing gibbous. -
Method Summary
Modifier and TypeMethodDescriptionstatic MoonPhaseReturns the moon phase with the given name, if it exists.getName()Returns the phase's name as a lowercase, underscore-separated string.intReturns the numeric phase identifier of this phase.booleanisCurrent(net.minecraft.world.LunarWorldView world) Returns whether this phase is the current moon phase.static MoonPhaseReturns the enum constant of this class with the specified name.static MoonPhase[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
An invalid phase. This value is (normally) only present when callingfrom(String)with an invalid identifier string.- Since:
- 1.0.0
-
FULL_MOON
A full moon.- Since:
- 1.0.0
-
WANING_GIBBOUS
A waning gibbous.- Since:
- 1.0.0
-
THIRD_QUARTER
A third quarter.- Since:
- 1.0.0
-
WANING_CRESCENT
A waning crescent.- Since:
- 1.0.0
-
NEW_MOON
A new moon.- Since:
- 1.0.0
-
WAXING_CRESCENT
A waxing crescent.- Since:
- 1.0.0
-
FIRST_QUARTER
A first quarter.- Since:
- 1.0.0
-
WAXING_GIBBOUS
A waxing gibbous.- Since:
- 1.0.0
-
-
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
-
from
Returns the moon phase with the given name, if it exists.- Parameters:
name- The name of the phase.- Returns:
- The moon phase represented by the given string.
- Since:
- 1.0.0
-
getName
Returns the phase's name as a lowercase, underscore-separated string.- Returns:
- The phase name.
- Since:
- 1.0.0
-
getNumeric
public int getNumeric()Returns the numeric phase identifier of this phase.- Returns:
- The numeric identifier.
- Since:
- 2.0.0
-
isCurrent
public boolean isCurrent(net.minecraft.world.LunarWorldView world) Returns whether this phase is the current moon phase.- Parameters:
world- The current world.- Returns:
- Whether this is the current phase.
- Since:
- 1.0.0
-