Enum Class ThermooSeason
- All Implemented Interfaces:
Serializable,Comparable<ThermooSeason>,Constable,net.minecraft.util.StringRepresentable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
net.minecraft.util.StringRepresentable.EnumCodec<E extends Enum<E> & net.minecraft.util.StringRepresentable>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S extends net.minecraft.util.StringRepresentable> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsFields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<ThermooSeason> getCurrentSeason(net.minecraft.world.level.Level level) Shorthand for invokingThermooSeasonEvents.GET_CURRENT_SEASON.static Optional<ThermooSeason> getCurrentTropicalSeason(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Shorthand for invokingThermooSeasonEvents.GET_CURRENT_TROPICAL_SEASON.booleanstatic ThermooSeasonReturns the enum constant of this class with the specified name.static ThermooSeason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SPRING
-
SUMMER
-
AUTUMN
-
WINTER
-
TROPICAL_DRY
-
TROPICAL_WET
-
-
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
-
getCurrentSeason
Shorthand for invokingThermooSeasonEvents.GET_CURRENT_SEASON.Retrieves the current season, 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.
This event should only ever return the temperate seasons, that is
SPRING,SUMMER,AUTUMN, orWINTER, and never the tropical seasons. For tropical seasons, usegetCurrentTropicalSeason(Level, BlockPos)- Parameters:
level- The current world / level to get the season from.- Returns:
- Returns the current season if a Seasons mod is installed, or empty if no seasons mod is installed.
- See Also:
-
getCurrentTropicalSeason
public static Optional<ThermooSeason> getCurrentTropicalSeason(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Shorthand for invokingThermooSeasonEvents.GET_CURRENT_TROPICAL_SEASON.Retrieves the current tropical season at a position in the world. If the position queried is not in a tropical biome, or a seasons mod is not loaded, then empty should be returned.
If any listener returns a non-empty season, then all further processing is cancelled and that season is returned.
Returns empty by default.
- Parameters:
level- The world / level to querypos- The position in the world to query- Returns:
- If the queried pos is a tropical area and a seasons mod is loaded, returns one of
TROPICAL_DRYorTROPICAL_WET - See Also:
-
isTropical
public boolean isTropical()- Returns:
- Returns true if this season is
TROPICAL_DRYorTROPICAL_WET
-
getSerializedName
- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable
-