Enum Class MoonPhase

java.lang.Object
java.lang.Enum<MoonPhase>
dev.jaxydog.astral.content.data.custom.MoonPhase
All Implemented Interfaces:
Serializable, Comparable<MoonPhase>, Constable

public enum MoonPhase extends Enum<MoonPhase>
Represents the phases of the moon
Since:
1.0.0
  • Enum Constant Details

    • NONE

      public static final MoonPhase NONE
      An invalid phase. This value is (normally) only present when calling from(String) with an invalid identifier string.
      Since:
      1.0.0
    • FULL_MOON

      public static final MoonPhase FULL_MOON
      A full moon.
      Since:
      1.0.0
    • WANING_GIBBOUS

      public static final MoonPhase WANING_GIBBOUS
      A waning gibbous.
      Since:
      1.0.0
    • THIRD_QUARTER

      public static final MoonPhase THIRD_QUARTER
      A third quarter.
      Since:
      1.0.0
    • WANING_CRESCENT

      public static final MoonPhase WANING_CRESCENT
      A waning crescent.
      Since:
      1.0.0
    • NEW_MOON

      public static final MoonPhase NEW_MOON
      A new moon.
      Since:
      1.0.0
    • WAXING_CRESCENT

      public static final MoonPhase WAXING_CRESCENT
      A waxing crescent.
      Since:
      1.0.0
    • FIRST_QUARTER

      public static final MoonPhase FIRST_QUARTER
      A first quarter.
      Since:
      1.0.0
    • WAXING_GIBBOUS

      public static final MoonPhase WAXING_GIBBOUS
      A waxing gibbous.
      Since:
      1.0.0
  • Method Details

    • values

      public static MoonPhase[] 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 MoonPhase 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
    • from

      public static MoonPhase from(String name)
      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

      public String 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