Enum Class TropicalSeason

java.lang.Object
java.lang.Enum<TropicalSeason>
com.github.thedeathlycow.thermoo.api.season.v2.TropicalSeason
All Implemented Interfaces:
ThermooSeason, Serializable, Comparable<TropicalSeason>, Constable, net.minecraft.util.StringRepresentable

public enum TropicalSeason extends Enum<TropicalSeason> implements ThermooSeason
Enumeration for the three tropical seasons. Note that Thermoo will not provide any seasons mod functionality by itself, that must be provided by an external seasons mod. This is primarily intended to be used for mod-agnostic seasons mod integration.
See Also:
  • Enum Constant Details

  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<TropicalSeason> CODEC
  • Method Details

    • values

      public static TropicalSeason[] 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 TropicalSeason 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
    • getSerializedName

      public String getSerializedName()
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable
    • getCurrentState

      public static Optional<ThermooSeasonState<TropicalSeason>> getCurrentState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
      Shorthand for invoking ThermooSeasonEvents.GET_CURRENT_TROPICAL_SEASON.

      Retrieves the current tropical season state at a position in a level, if a season mod is loaded. Thermoo does not add seasons by itself, seasons must be implemented by another mod like Fabric Seasons or Serene Seasons. This event just places season integration into a common source.

      If any listener returns a non-empty season state, then all further processing is cancelled and that state is returned.

      If the queried position does not have seasons, or a seasons mod is not installed, then returns a state based on the current value of the environment attributes.

      See Also:
    • createState

      public ThermooSeasonState<TropicalSeason> createState()
      Description copied from interface: ThermooSeason
      Creates a season state that represents the start of this season.
      Specified by:
      createState in interface ThermooSeason