Package org.spongepowered.api.util
Interface MinecraftDayTime.Factory
-
- Enclosing interface:
- MinecraftDayTime
public static interface MinecraftDayTime.Factory
CreatesMinecraftDayTime
objects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MinecraftDayTime
epoch()
MinecraftDayTime
of(int days, int hours, int minutes)
MinecraftDayTime
of(Engine engine, java.time.Duration duration)
MinecraftDayTime
of(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
- TheEngine
to 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
- TheEngine
to calculate the time for.ticks
- TheTicks
since the Minecraft Epoch.- Returns:
- The
MinecraftDayTime
- Throws:
java.lang.IllegalArgumentException
- if the tick count is negative- See Also:
MinecraftDayTime.of(Engine, Ticks)
-
-