Enum Class MoonPhase

java.lang.Object
java.lang.Enum<MoonPhase>
net.minecraft.world.level.MoonPhase
All Implemented Interfaces:
Serializable, Comparable<MoonPhase>, Constable, StringRepresentable

public enum MoonPhase extends Enum<MoonPhase> implements StringRepresentable
  • Enum Constant Details

    • FULL_MOON

      public static final MoonPhase FULL_MOON
    • WANING_GIBBOUS

      public static final MoonPhase WANING_GIBBOUS
    • THIRD_QUARTER

      public static final MoonPhase THIRD_QUARTER
    • WANING_CRESCENT

      public static final MoonPhase WANING_CRESCENT
    • NEW_MOON

      public static final MoonPhase NEW_MOON
    • WAXING_CRESCENT

      public static final MoonPhase WAXING_CRESCENT
    • FIRST_QUARTER

      public static final MoonPhase FIRST_QUARTER
    • WAXING_GIBBOUS

      public static final MoonPhase WAXING_GIBBOUS
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<MoonPhase> CODEC
    • COUNT

      public static final int COUNT
    • PHASE_LENGTH

      public static final int PHASE_LENGTH
      See Also:
    • index

      private final int index
    • name

      private final String name
  • Constructor Details

    • MoonPhase

      private MoonPhase(int pIndex, String pName)
  • 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
    • index

      public int index()
    • startTick

      public int startTick()
    • getSerializedName

      public String getSerializedName()
      Specified by:
      getSerializedName in interface StringRepresentable