Contents
Class StartSlumberSystem
java.lang.Object
com.hypixel.hytale.component.system.System<EntityStore>
com.hypixel.hytale.component.system.tick.TickingSystem<EntityStore>
com.hypixel.hytale.component.system.DelayedSystem<EntityStore>
com.hypixel.hytale.builtin.beds.sleep.systems.world.StartSlumberSystem
- All Implemented Interfaces:
ISystem<EntityStore>, TickableSystem<EntityStore>
A delayed system that checks if all players are ready to sleep and initiates the slumber state in the world if they are.
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionStartSlumberSystem(ComponentType<EntityStore, PlayerSomnolence> playerSomnolenceComponentType, ResourceType<EntityStore, WorldSomnolence> worldSomnolenceResourceType, ResourceType<EntityStore, WorldTimeResource> worldTimeResourceType) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanvoiddelayedTick(float dt, int systemIndex, Store<EntityStore> store) A tick method called once every interval provided by the constructorDelayedSystem(float).static booleanisReadyToSleep(ComponentAccessor<EntityStore> store, Ref<EntityStore> ref) Methods inherited from class DelayedSystem
getIntervalSec, getResourceType, tickMethods inherited from class System
getComponentRegistrations, getResourceRegistrations, registerResource, registerResourceMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISystem
getDependencies, getGroup, onSystemRegistered, onSystemUnregistered
-
Constructor Details
-
StartSlumberSystem
public StartSlumberSystem(@Nonnull ComponentType<EntityStore, PlayerSomnolence> playerSomnolenceComponentType, @Nonnull ResourceType<EntityStore, WorldSomnolence> worldSomnolenceResourceType, @Nonnull ResourceType<EntityStore, WorldTimeResource> worldTimeResourceType)
-
-
Method Details
-
delayedTick
Description copied from class:DelayedSystemA tick method called once every interval provided by the constructorDelayedSystem(float).- Specified by:
delayedTickin classDelayedSystem<EntityStore>- Parameters:
dt- The delta time in seconds since the last call to this method.systemIndex- The index of this system, used for faster lookups inStore.store- The store calling this method.
-
isReadyToSleep
public static boolean isReadyToSleep(@Nonnull ComponentAccessor<EntityStore> store, @Nullable Ref<EntityStore> ref) -
canNotifyOthersAboutTryingToSleep
public static boolean canNotifyOthersAboutTryingToSleep(@Nonnull ComponentAccessor<EntityStore> store, @Nullable Ref<EntityStore> ref)
-