Contents
Class WildernessDebug
java.lang.Object
com.hypixel.hytale.builtin.adventure.wilderness.debug.WildernessDebug
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Marks a player that sees the wilderness debug visuals.
The marker drives both views of the player's own
Wilderness tracker:
WildernessDebugMapSystemtints the world map tiles of the tracker layer that holds the player, and sends them to that player alone.WildernessDebugShapeSystemdraws one cube per chunk of the whole tracked region.
/wilderness debug.
Both views expire on the client, so both systems have to send their data again and again. The marker holds one countdown per view, which keeps the packet rate low and spreads the work of different players over different ticks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatThe time between two sends of the map tiles, in seconds.static final floatThe time between two draws of the debug cubes, in seconds.static final floatThe lifetime of a debug cube, in seconds.Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new marker that sends and draws on the next tick. -
Method Summary
Modifier and TypeMethodDescriptionclone()static ComponentType<EntityStore, WildernessDebug> Retrieves theComponentTypefor theWildernessDebugcomponent.it.unimi.dsi.fastutil.longs.LongSetGets the chunks whose map tiles the player last received a tinted copy of.booleantickMap(float dt) Advances the countdown to the next map send.booleantickShapes(float dt) Advances the countdown to the next cube draw.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
MAP_SEND_INTERVAL_SECONDS
public static final float MAP_SEND_INTERVAL_SECONDSThe time between two sends of the map tiles, in seconds.The world map thread owns the tiles of a player and re-sends a clean tile whenever it reloads one.
WildernessDebugMapSystemtherefore has to assert its tinted tiles again and again, rather than once.- See Also:
-
SHAPE_RENDER_INTERVAL_SECONDS
public static final float SHAPE_RENDER_INTERVAL_SECONDSThe time between two draws of the debug cubes, in seconds.- See Also:
-
SHAPE_TTL_SECONDS
public static final float SHAPE_TTL_SECONDSThe lifetime of a debug cube, in seconds. Longer thanSHAPE_RENDER_INTERVAL_SECONDS, so the cubes of one draw are still alive when the next draw replaces them.- See Also:
-
-
Constructor Details
-
WildernessDebug
public WildernessDebug()Constructs a new marker that sends and draws on the next tick.
-
-
Method Details
-
tickMap
public boolean tickMap(float dt) Advances the countdown to the next map send.- Parameters:
dt- the delta time in seconds.- Returns:
- true if the caller must send the map tiles now. The countdown then restarts.
-
tickShapes
public boolean tickShapes(float dt) Advances the countdown to the next cube draw.- Parameters:
dt- the delta time in seconds.- Returns:
- true if the caller must draw the cubes now. The countdown then restarts.
-
getTintedChunks
@Nonnull public it.unimi.dsi.fastutil.longs.LongSet getTintedChunks()Gets the chunks whose map tiles the player last received a tinted copy of. The caller may modify the returned set.- Returns:
- the tinted chunks, keyed by chunk index. Never null.
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-
getComponentType
Retrieves theComponentTypefor theWildernessDebugcomponent.- Returns:
- the ComponentType for the WildernessDebug component.
-