Package org.spongepowered.api.util
Interface MinecraftDayTime.Factory
-
- Enclosing interface:
- MinecraftDayTime
public static interface MinecraftDayTime.FactoryCreatesMinecraftDayTimeobjects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MinecraftDayTimeepoch()MinecraftDayTimeof(int days, int hours, int minutes)MinecraftDayTimeof(Engine engine, java.time.Duration duration)MinecraftDayTimeof(Engine engine, Ticks ticks)
-
-
-
Method Detail
-
epoch
MinecraftDayTime epoch()
- Returns:
- The
MinecraftDayTime - See Also:
MinecraftDayTime.minecraftEpoch()
-
of
MinecraftDayTime of(Engine engine, java.time.Duration duration)
- Parameters:
engine- TheEngineto use in calculating the day timeduration- The duration since the Minecraft Epoch.- Returns:
- The
MinecraftDayTime - Throws:
java.lang.IllegalArgumentException- if the duration is negative- See Also:
MinecraftDayTime.ofInGameDuration(Engine, Duration)
-
of
MinecraftDayTime of(int days, int hours, int minutes)
- Parameters:
days- The day to set. Must be positive.hours- The hour to set in 24 hour time.minutes- The minute to set.- Returns:
- The
MinecraftDayTime. - Throws:
java.lang.IllegalArgumentException- if any of the listed constraints are violated.- See Also:
MinecraftDayTime.of(int, int, int)
-
of
MinecraftDayTime of(Engine engine, Ticks ticks)
- Parameters:
engine- TheEngineto calculate the time for.ticks- TheTickssince the Minecraft Epoch.- Returns:
- The
MinecraftDayTime - Throws:
java.lang.IllegalArgumentException- if the tick count is negative- See Also:
MinecraftDayTime.of(Engine, Ticks)
-
-