Enum Class TemperateSeason
- All Implemented Interfaces:
ThermooSeason, Serializable, Comparable<TemperateSeason>, Constable, net.minecraft.util.StringRepresentable
Enumeration for the four traditional (temperate) 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
net.minecraft.util.StringRepresentable.EnumCodec<E>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsFields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptionCreates a season state that represents the start of this season.static Optional<ThermooSeasonState<TemperateSeason>> getCurrentState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Shorthand for invokingThermooSeasonEvents.GET_CURRENT_SEASON.static TemperateSeasonReturns the enum constant of this class with the specified name.static TemperateSeason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SPRING
-
SUMMER
-
AUTUMN
-
WINTER
-
-
Field Details
-
CODEC
-
-
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
-
getCurrentState
public static Optional<ThermooSeasonState<TemperateSeason>> getCurrentState(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Shorthand for invokingThermooSeasonEvents.GET_CURRENT_SEASON.Retrieves the current temperate 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:
-
getSerializedName
- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable
-
createState
Description copied from interface:ThermooSeasonCreates a season state that represents the start of this season.- Specified by:
createStatein interfaceThermooSeason
-