Contents
Class WorldSlumber
java.lang.Object
com.hypixel.hytale.builtin.beds.sleep.resources.WorldSlumber
- All Implemented Interfaces:
WorldSleep
A class that represents a world that is currently in slumber.
-
Nested Class Summary
Nested classes/interfaces inherited from interface WorldSleep
WorldSleep.Awake -
Constructor Summary
ConstructorsConstructorDescriptionWorldSlumber(Instant startInstant, Instant targetInstant, float irlDurationSeconds) Default Constructor for aWorldSlumberinstance. -
Method Summary
Modifier and TypeMethodDescriptionCreates aSleepClockrepresenting the current state of the slumber.floatfloatvoidincrementProgressSeconds(float seconds) Called to increment the progress of the slumber.
-
Constructor Details
-
WorldSlumber
public WorldSlumber(@Nonnull Instant startInstant, @Nonnull Instant targetInstant, float irlDurationSeconds) Default Constructor for aWorldSlumberinstance.- Parameters:
startInstant- The instant when the slumber started.targetInstant- The instant when the slumber is targeted to end.irlDurationSeconds- The time, in seconds, that the slumber will take.
-
-
Method Details
-
getStartInstant
- Returns:
- the instant when the slumber started.
-
getTargetInstant
- Returns:
- the instant when the slumber is targeted to end.
-
getStartInstantData
- Returns:
- the instant data when the slumber started.
-
getTargetInstantData
- Returns:
- the instant data when the slumber is targeted to end.
-
getProgressSeconds
public float getProgressSeconds()- Returns:
- the progress of the slumber, in seconds.
-
incrementProgressSeconds
public void incrementProgressSeconds(float seconds) Called to increment the progress of the slumber.- Parameters:
seconds- The number of seconds to increment the progress by.
-
getIrlDurationSeconds
public float getIrlDurationSeconds()- Returns:
- the time, in seconds, that the slumber will take.
-
createSleepClock
Creates aSleepClockrepresenting the current state of the slumber.- Returns:
- a new
SleepClockinstance.
-