Contents
Class VoidEventResource
java.lang.Object
com.hypixel.hytale.builtin.portals.resources.VoidEventResource
- All Implemented Interfaces:
Resource<EntityStore>, Cloneable
Tracks the void-event of a portal world. The schedule drives the void-event stages and
the HUD breach mode.
The schedule is anchored to the world's TimeResource clock. Unlike the instance
timeout timer, the anchor never moves when players win back portal time. Stages therefore
always trigger at their configured second of the world's lifetime.
-
Field Summary
FieldsFields inherited from interface Resource
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()doublegetElapsedSeconds(Instant now) How many seconds of the world's lifetime the schedule has covered.static ResourceType<EntityStore, VoidEventResource> booleanhasReached(Instant now, int secondsInto) Whether the schedule has reached the given second of the world's lifetime.booleanvoidFreezes the schedule at the given instant.voidreset()Discards the schedule so it re-derives from the current elapsed time.voidUnfreezes the schedule.voidStarts the schedule at the given elapsed time, if it has not started yet.
-
Field Details
-
CODEC
-
-
Constructor Details
-
VoidEventResource
public VoidEventResource()
-
-
Method Details
-
getResourceType
-
start
Starts the schedule at the given elapsed time, if it has not started yet. While paused, the anchor derives from the pause instant, so the schedule stays frozen at that elapsed time. -
isStarted
public boolean isStarted() -
getElapsedSeconds
How many seconds of the world's lifetime the schedule has covered. While paused, the value is frozen at the pause instant. -
hasReached
Whether the schedule has reached the given second of the world's lifetime. While paused, the schedule is frozen at the pause instant. -
pause
Freezes the schedule at the given instant. -
resume
Unfreezes the schedule. The anchor shifts forward by the pause duration, so the remaining stages still trigger after the same amount of active time. -
reset
public void reset()Discards the schedule so it re-derives from the current elapsed time. Only for admin/debug commands that jump the timer. Gameplay time adjustments must never move the schedule. -
clone
- Specified by:
clonein interfaceResource<EntityStore>- Returns:
- a clone instance of the original resource instance.
-