Class WildernessDebug

java.lang.Object
com.hypixel.hytale.builtin.adventure.wilderness.debug.WildernessDebug
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class WildernessDebug extends Object implements Component<EntityStore>
Marks a player that sees the wilderness debug visuals.

The marker drives both views of the player's own Wilderness tracker:

Add and remove the marker with /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 Details

    • MAP_SEND_INTERVAL_SECONDS

      public static final float MAP_SEND_INTERVAL_SECONDS
      The 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. WildernessDebugMapSystem therefore 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_SECONDS
      The time between two draws of the debug cubes, in seconds.
      See Also:
    • SHAPE_TTL_SECONDS

      public static final float SHAPE_TTL_SECONDS
      The lifetime of a debug cube, in seconds. Longer than SHAPE_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

      @Nonnull public WildernessDebug clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, WildernessDebug> getComponentType()
      Retrieves the ComponentType for the WildernessDebug component.
      Returns:
      the ComponentType for the WildernessDebug component.