Enum Class MoonPhase

java.lang.Object
java.lang.Enum<MoonPhase>
net.pottercraft.ollivanders2.common.MoonPhase
All Implemented Interfaces:
Serializable, Comparable<MoonPhase>, Constable

public enum MoonPhase extends Enum<MoonPhase>
Enumeration of the eight moon phases in Minecraft.

The moon phase cycles every 8 Minecraft days (8 * 24000 ticks). Each phase represents a different point in the lunar cycle, from full moon through new moon and back. Moon phases can be used for spell calculations and lunar-based mechanics.

  • Enum Constant Details

    • FULL_MOON

      public static final MoonPhase FULL_MOON
      Full Moon - brightest lunar phase
    • WANING_GIBBOUS

      public static final MoonPhase WANING_GIBBOUS
      Waning Gibbous - after full moon, gradually decreasing
    • LAST_QUARTER

      public static final MoonPhase LAST_QUARTER
      Last Quarter - half moon, decreasing
    • WANING_CRESCENT

      public static final MoonPhase WANING_CRESCENT
      Waning Crescent - thin crescent before new moon
    • NEW_MOON

      public static final MoonPhase NEW_MOON
      New Moon - darkest lunar phase
    • WAXING_CRESCENT

      public static final MoonPhase WAXING_CRESCENT
      Waxing Crescent - thin crescent after new moon
    • FIRST_QUARTER

      public static final MoonPhase FIRST_QUARTER
      First Quarter - half moon, increasing
    • WAXING_GIBBOUS

      public static final MoonPhase WAXING_GIBBOUS
      Waxing Gibbous - before full moon, gradually increasing
  • 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
    • getMoonPhase

      @NotNull public static @NotNull MoonPhase getMoonPhase(@NotNull @NotNull org.bukkit.World world)
      Get the current moon phase for a world.

      Calculates the moon phase based on the world's full time, which cycles every 8 Minecraft days. The full time is divided by 24000 (ticks per day) and modulo 8 to get the phase.

      Parameters:
      world - the world to check
      Returns:
      the current moon phase