Interface Weather
-
- All Superinterfaces:
DataSerializable
public interface Weather extends DataSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceWeather.Factory
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Weatherof(Supplier<WeatherType> type, long duration)Creates a new weather with given type, remaining duration and no running durationstatic Weatherof(Supplier<WeatherType> type, Ticks duration)Creates a new weather with given type, remaining duration and no running durationstatic Weatherof(WeatherType type, long duration)Creates a new weather with given type, remaining duration and no running durationstatic Weatherof(WeatherType type, Ticks duration)Creates a new weather with given type, remaining duration and no running durationTicksremainingDuration()Gets the remainingTicksof this weather.TicksrunningDuration()Gets the number ofTicksthat the weather has ran for.WeatherTypetype()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 remainingTicksof this weather.- Returns:
- The remaining duration
-
runningDuration
Ticks runningDuration()
Gets the number ofTicksthat 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
-
-