Contents
Class SleepTracker
java.lang.Object
com.hypixel.hytale.builtin.beds.sleep.components.SleepTracker
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
A compone that tracks the sleep state updates sent to the client for a player entity.
-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Generates a sleep state packet to send to the client if the state has changed.static ComponentType<EntityStore, SleepTracker> Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
SleepTracker
public SleepTracker()
-
-
Method Details
-
getComponentType
- Returns:
- the component type for the
SleepTrackercomponent.
-
generatePacketToSend
Generates a sleep state packet to send to the client if the state has changed.- Parameters:
state- The current sleep state of the player.- Returns:
- the
UpdateSleepStatepacket to send to the client, ornullif the state has not changed.
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-