Interface Weather
-
- All Superinterfaces:
DataSerializable
public interface Weather extends DataSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Weather.Factory
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Weather
of(Supplier<WeatherType> type, long duration)
Creates a new weather with given type, remaining duration and no running durationstatic Weather
of(Supplier<WeatherType> type, Ticks duration)
Creates a new weather with given type, remaining duration and no running durationstatic Weather
of(WeatherType type, long duration)
Creates a new weather with given type, remaining duration and no running durationstatic Weather
of(WeatherType type, Ticks duration)
Creates a new weather with given type, remaining duration and no running durationTicks
remainingDuration()
Gets the remainingTicks
of this weather.Ticks
runningDuration()
Gets the number ofTicks
that the weather has ran for.WeatherType
type()
Gets thetype
.-
Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
-
-
-
Method Detail
-
type
WeatherType type()
Gets thetype
.- Returns:
- The type
-
remainingDuration
Ticks remainingDuration()
Gets the remainingTicks
of this weather.- Returns:
- The remaining duration
-
runningDuration
Ticks runningDuration()
Gets the number ofTicks
that the weather has ran for.- Returns:
- The running duration
-
of
static Weather of(Supplier<WeatherType> type, long duration)
Creates a new weather with given type, remaining duration and no running duration- Parameters:
type
- The weather typeduration
- The weather remaining duration- Returns:
- The new weather
-
of
static Weather of(Supplier<WeatherType> type, Ticks duration)
Creates a new weather with given type, remaining duration and no running duration- Parameters:
type
- The weather typeduration
- The weather remaining duration- Returns:
- The new weather
-
of
static Weather of(WeatherType type, long duration)
Creates a new weather with given type, remaining duration and no running duration- Parameters:
type
- The weather typeduration
- The weather remaining duration- Returns:
- The new weather
-
of
static Weather of(WeatherType type, Ticks duration)
Creates a new weather with given type, remaining duration and no running duration- Parameters:
type
- The weather typeduration
- The weather remaining duration- Returns:
- The new weather
-
-