Class DebugUtils

java.lang.Object
com.hypixel.hytale.server.core.modules.debug.DebugUtils

public class DebugUtils extends Object
A utility class for debug-related functions.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.joml.Vector3f
    Predefined color for debug shapes From Basic colors
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final org.joml.Vector3f
    Predefined color for debug shapes see COLOR_BLACK
    static final float
    Default opacity for debug shapes.
    static boolean
    Whether force debug shapes should be displayed.
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final String[]
    Human-readable names corresponding to INDEXED_COLORS.
    static final org.joml.Vector3f[]
    Array of distinct colors for indexed debug visualization.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    add(World world, DebugShape shape, org.joml.Matrix4dc matrix, org.joml.Vector3fc color, float opacity, float time, int flags)
    Displays the given debug shape to all players in the world with custom opacity.
    static void
    add(World world, DebugShape shape, org.joml.Matrix4dc matrix, org.joml.Vector3fc color, float time, int flags)
    Displays the given debug shape to all players in the world.
    static void
    addArrow(World world, org.joml.Matrix4dc baseMatrix, org.joml.Vector3fc color, double length, float time, int flags)
    Adds an arrow debug shape to the world using a transformation matrix.
    static void
    addArrow(World world, org.joml.Matrix4dc baseMatrix, org.joml.Vector3fc color, float opacity, double length, float time, int flags)
    Adds an arrow debug shape to the world using a transformation matrix.
    static void
    addArrow(World world, org.joml.Vector3dc position, org.joml.Vector3dc direction, org.joml.Vector3fc color, float opacity, float time, int flags)
    Adds an arrow debug shape to the world pointing in a specific direction.
    static void
    addArrow(World world, org.joml.Vector3dc position, org.joml.Vector3dc direction, org.joml.Vector3fc color, float time, int flags)
    Adds an arrow debug shape to the world pointing in a specific direction.
    static void
    addCone(World world, org.joml.Vector3dc pos, org.joml.Vector3fc color, double scale, float time)
    Adds a cone debug shape to the world at the specified position.
    static void
    addCube(World world, double x, double y, double z, org.joml.Vector3fc color, double scale, float time)
    Adds a cube debug shape to the world at the specified position.
    static void
    addCube(World world, org.joml.Vector3dc pos, org.joml.Vector3fc color, double scale, float time)
    Adds a cube debug shape to the world at the specified position.
    static void
    addCylinder(World world, org.joml.Vector3dc pos, org.joml.Vector3fc color, double diameter, double height, float time)
    Adds a cylinder debug shape to the world at the specified position.
    static void
    addCylinder(World world, org.joml.Vector3dc pos, org.joml.Vector3fc color, double scale, float time)
    Adds a cylinder debug shape to the world at the specified position.
    static void
    addDisc(World world, double x, double y, double z, double outerRadius, double innerRadius, org.joml.Vector3fc color, float opacity, float time, int flags)
    Adds a disc debug shape at the specified position with inner radius and custom opacity.
    static void
    addDisc(World world, double x, double y, double z, double outerRadius, double innerRadius, org.joml.Vector3fc color, float opacity, int segmentCount, float time, int flags)
    Adds a disc debug shape at the specified position with full parameters.
    static void
    addDisc(World world, double x, double y, double z, double radius, org.joml.Vector3fc color, float opacity, float time, int flags)
    Adds a disc debug shape at the specified position with custom opacity.
    static void
    addDisc(World world, double x, double y, double z, double radius, org.joml.Vector3fc color, float time, int flags)
    Adds a disc debug shape at the specified position.
    static void
    addDisc(World world, org.joml.Matrix4dc matrix, double outerRadius, double innerRadius, org.joml.Vector3fc color, float opacity, float time, int flags)
    Adds a disc debug shape using a transformation matrix with default segment count.
    static void
    addDisc(World world, org.joml.Matrix4dc matrix, double outerRadius, double innerRadius, org.joml.Vector3fc color, float opacity, int segmentCount, float time, int flags)
    Adds a disc debug shape using a transformation matrix.
    static void
    addDisc(World world, org.joml.Vector3dc center, double radius, org.joml.Vector3fc color, float time, int flags)
    Adds a disc debug shape at the specified position.
    static void
    addDonut(World world, double x, double y, double z, double outerRadius, double innerRadius, double height, double heading, double angle, org.joml.Vector3fc color, float opacity, float time, int flags)
    Adds a donut (annular cylinder) debug shape at the specified position with a default segment count.
    static void
    addDonut(World world, double x, double y, double z, double outerRadius, double innerRadius, double height, double heading, double angle, org.joml.Vector3fc color, float opacity, int segmentCount, float time, int flags)
    Adds a donut (annular cylinder) debug shape at the specified position.
    static void
    addFrustum(World world, org.joml.Matrix4dc matrix, org.joml.Matrix4dc frustumProjection, org.joml.Vector3fc color, float time, int flags)
    Displays a frustum debug shape to all players in the world.
    static void
    addLine(World world, double startX, double startY, double startZ, double endX, double endY, double endZ, org.joml.Vector3fc color, double thickness, float time, int flags)
    Adds a line debug shape between two points in the world.
    static void
    addLine(World world, org.joml.Vector3dc start, org.joml.Vector3dc end, org.joml.Vector3fc color, double thickness, float time, int flags)
    Adds a line debug shape between two points in the world.
    static void
    addSector(World world, double x, double y, double z, double heading, double outerRadius, double angle, double innerRadius, org.joml.Vector3fc color, float opacity, float time, int flags)
    Adds a sector (wedge) debug shape at the specified position with inner radius and custom opacity.
    static void
    addSector(World world, double x, double y, double z, double heading, double outerRadius, double angle, double innerRadius, org.joml.Vector3fc color, float opacity, int segmentCount, float time, int flags)
    Adds a sector (wedge) debug shape at the specified position.
    static void
    addSector(World world, double x, double y, double z, double heading, double radius, double angle, org.joml.Vector3fc color, float opacity, float time, int flags)
    Adds a sector (wedge) debug shape at the specified position with custom opacity.
    static void
    addSector(World world, double x, double y, double z, double heading, double radius, double angle, org.joml.Vector3fc color, float time, int flags)
    Adds a sector (wedge) debug shape at the specified position.
    static void
    addSphere(World world, double x, double y, double z, org.joml.Vector3fc color, double scale, float time)
    Adds a sphere debug shape to the world at the specified position.
    static void
    addSphere(World world, double x, double y, double z, org.joml.Vector3fc color, float opacity, double scale, float time)
    Adds a sphere debug shape to the world at the specified position.
    static void
    addSphere(World world, org.joml.Vector3dc pos, org.joml.Vector3fc color, double scale, float time)
    Adds a sphere debug shape to the world at the specified position.
    static void
    addSphere(World world, org.joml.Vector3dc pos, org.joml.Vector3fc color, float opacity, double scale, float time)
    Adds a sphere debug shape to the world at the specified position with custom opacity.
    static void
    addVelocity(World world, org.joml.Vector3dc position, org.joml.Vector3dc velocity, VelocityConfig velocityConfig)
    Adds a force visualization arrow to the world.
    static void
    clear(World world)
    Clears all debug shapes for all players in the world.
    static org.joml.Matrix4d
    makeMatrix(org.joml.Vector3dc pos, double scale)
    Creates a transformation matrix for positioning and scaling a debug shape.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • COLOR_BLACK

      public static final org.joml.Vector3f COLOR_BLACK
      Predefined color for debug shapes From Basic colors
    • COLOR_WHITE

      public static final org.joml.Vector3f COLOR_WHITE
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_RED

      public static final org.joml.Vector3f COLOR_RED
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_LIME

      public static final org.joml.Vector3f COLOR_LIME
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_BLUE

      public static final org.joml.Vector3f COLOR_BLUE
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_YELLOW

      public static final org.joml.Vector3f COLOR_YELLOW
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_CYAN

      public static final org.joml.Vector3f COLOR_CYAN
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_MAGENTA

      public static final org.joml.Vector3f COLOR_MAGENTA
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_SILVER

      public static final org.joml.Vector3f COLOR_SILVER
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_GRAY

      public static final org.joml.Vector3f COLOR_GRAY
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_MAROON

      public static final org.joml.Vector3f COLOR_MAROON
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_OLIVE

      public static final org.joml.Vector3f COLOR_OLIVE
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_GREEN

      public static final org.joml.Vector3f COLOR_GREEN
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_PURPLE

      public static final org.joml.Vector3f COLOR_PURPLE
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_TEAL

      public static final org.joml.Vector3f COLOR_TEAL
      Predefined color for debug shapes see COLOR_BLACK
    • COLOR_NAVY

      public static final org.joml.Vector3f COLOR_NAVY
      Predefined color for debug shapes see COLOR_BLACK
    • INDEXED_COLORS

      public static final org.joml.Vector3f[] INDEXED_COLORS
      Array of distinct colors for indexed debug visualization. Colors are selected to be easily distinguishable from each other.
    • INDEXED_COLOR_NAMES

      public static final String[] INDEXED_COLOR_NAMES
      Human-readable names corresponding to INDEXED_COLORS.
    • DISPLAY_FORCES

      public static boolean DISPLAY_FORCES
      Whether force debug shapes should be displayed.

      When enabled, force vectors will be visualized as arrows in the world. This can be toggled via the /debug shape showforce command.

    • DEFAULT_OPACITY

      public static final float DEFAULT_OPACITY
      Default opacity for debug shapes.
      See Also:
    • FLAG_NONE

      public static final int FLAG_NONE
      See Also:
    • FLAG_FADE

      public static final int FLAG_FADE
      See Also:
    • FLAG_NO_WIREFRAME

      public static final int FLAG_NO_WIREFRAME
      See Also:
    • FLAG_NO_SOLID

      public static final int FLAG_NO_SOLID
      See Also:
  • Constructor Details

    • DebugUtils

      public DebugUtils()
  • Method Details

    • add

      public static void add(@Nonnull World world, @Nonnull DebugShape shape, @Nonnull org.joml.Matrix4dc matrix, @Nonnull org.joml.Vector3fc color, float time, int flags)
      Displays the given debug shape to all players in the world.

      If fade is set then the shape's opacity will change over time until it is removed.

      If used off the world thread this will move the execution on to the world automatically.

      Parameters:
      world - The world to spawn the shape in.
      shape - The shape to spawn.
      matrix - The matrix used to position, scale and rotate the shape.
      color - The color of the shape.
      time - How long the shape should exist for (in seconds).
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • add

      public static void add(@Nonnull World world, @Nonnull DebugShape shape, @Nonnull org.joml.Matrix4dc matrix, @Nonnull org.joml.Vector3fc color, float opacity, float time, int flags)
      Displays the given debug shape to all players in the world with custom opacity.
      Parameters:
      world - The world to spawn the shape in.
      shape - The shape to spawn.
      matrix - The matrix used to position, scale and rotate the shape.
      color - The color of the shape.
      opacity - The opacity of the shape (0.0-1.0).
      time - How long the shape should exist for (in seconds).
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • addFrustum

      public static void addFrustum(@Nonnull World world, @Nonnull org.joml.Matrix4dc matrix, @Nonnull org.joml.Matrix4dc frustumProjection, @Nonnull org.joml.Vector3fc color, float time, int flags)
      Displays a frustum debug shape to all players in the world.
      Parameters:
      world - The world to spawn the frustum in.
      matrix - The matrix used to position, scale and rotate the frustum.
      frustumProjection - The projection matrix defining the frustum shape.
      color - The color of the frustum.
      time - The time, in seconds, the frustum should exist for.
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • clear

      public static void clear(@Nonnull World world)
      Clears all debug shapes for all players in the world.

      This method sends a clear packet to all players in the specified entity store, which will remove all currently displayed debug shapes on their clients.

      Parameters:
      world - The entity store containing the players to clear debug shapes for.
    • addArrow

      public static void addArrow(@Nonnull World world, @Nonnull org.joml.Matrix4dc baseMatrix, @Nonnull org.joml.Vector3fc color, float opacity, double length, float time, int flags)
      Adds an arrow debug shape to the world using a transformation matrix.

      The arrow consists of a cylinder (shaft) and a cone (head) positioned and rotated according to the provided matrix.

      Parameters:
      world - The world to add the arrow to.
      baseMatrix - The base matrix to position and rotate the arrow.
      color - The color of the arrow.
      opacity - The opacity of the arrow (0.0-1.0).
      length - The length of the arrow.
      time - The time the arrow should exist for (in seconds).
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • addArrow

      public static void addArrow(@Nonnull World world, @Nonnull org.joml.Matrix4dc baseMatrix, @Nonnull org.joml.Vector3fc color, double length, float time, int flags)
      Adds an arrow debug shape to the world using a transformation matrix.
    • addSphere

      public static void addSphere(@Nonnull World world, @Nonnull org.joml.Vector3dc pos, @Nonnull org.joml.Vector3fc color, double scale, float time)
      Adds a sphere debug shape to the world at the specified position.
      Parameters:
      world - The world to add the sphere to.
      pos - The position of the sphere.
      color - The color of the sphere.
      scale - The scale of the sphere (applied uniformly to all axes).
      time - The time the sphere should exist for (in seconds).
    • addSphere

      public static void addSphere(@Nonnull World world, double x, double y, double z, @Nonnull org.joml.Vector3fc color, double scale, float time)
      Adds a sphere debug shape to the world at the specified position.
    • addSphere

      public static void addSphere(@Nonnull World world, @Nonnull org.joml.Vector3dc pos, @Nonnull org.joml.Vector3fc color, float opacity, double scale, float time)
      Adds a sphere debug shape to the world at the specified position with custom opacity.
      Parameters:
      world - The world to add the sphere to.
      pos - The position of the sphere.
      color - The color of the sphere.
      opacity - The opacity of the sphere (0.0-1.0).
      scale - The scale of the sphere (applied uniformly to all axes).
      time - The time the sphere should exist for (in seconds).
    • addSphere

      public static void addSphere(@Nonnull World world, double x, double y, double z, @Nonnull org.joml.Vector3fc color, float opacity, double scale, float time)
      Adds a sphere debug shape to the world at the specified position.
    • addCone

      public static void addCone(@Nonnull World world, @Nonnull org.joml.Vector3dc pos, @Nonnull org.joml.Vector3fc color, double scale, float time)
      Adds a cone debug shape to the world at the specified position.
      Parameters:
      world - The world to add the cone to.
      pos - The position of the cone.
      color - The color of the cone.
      scale - The scale of the cone (applied uniformly to all axes).
      time - The time the cone should exist for (in seconds).
    • addCube

      public static void addCube(@Nonnull World world, @Nonnull org.joml.Vector3dc pos, @Nonnull org.joml.Vector3fc color, double scale, float time)
      Adds a cube debug shape to the world at the specified position.
      Parameters:
      world - The world to add the cube to.
      pos - The position of the cube.
      color - The color of the cube.
      scale - The scale of the cube (applied uniformly to all axes).
      time - The time the cube should exist for (in seconds).
    • addCube

      public static void addCube(@Nonnull World world, double x, double y, double z, @Nonnull org.joml.Vector3fc color, double scale, float time)
      Adds a cube debug shape to the world at the specified position.
    • addCylinder

      public static void addCylinder(@Nonnull World world, @Nonnull org.joml.Vector3dc pos, @Nonnull org.joml.Vector3fc color, double scale, float time)
      Adds a cylinder debug shape to the world at the specified position.
      Parameters:
      world - The world to add the cylinder to.
      pos - The position of the cylinder.
      color - The color of the cylinder.
      scale - The scale of the cylinder (applied uniformly to all axes).
      time - The time the cylinder should exist for (in seconds).
    • addCylinder

      public static void addCylinder(@Nonnull World world, @Nonnull org.joml.Vector3dc pos, @Nonnull org.joml.Vector3fc color, double diameter, double height, float time)
      Adds a cylinder debug shape to the world at the specified position.
      Parameters:
      world - The world to add the cylinder to.
      pos - The position of the cylinder.
      color - The color of the cylinder.
      diameter - The diameter of the cylinder (applied to X and Z).
      height - The height of the cylinder (applied to Y).
      time - The time the cylinder should exist for (in seconds).
    • addLine

      public static void addLine(@Nonnull World world, @Nonnull org.joml.Vector3dc start, @Nonnull org.joml.Vector3dc end, @Nonnull org.joml.Vector3fc color, double thickness, float time, int flags)
      Adds a line debug shape between two points in the world.
      Parameters:
      world - The world to add the line to.
      start - The start position of the line.
      end - The end position of the line.
      color - The color of the line.
      thickness - The thickness (diameter) of the line.
      time - The time the line should exist for (in seconds).
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • addLine

      public static void addLine(@Nonnull World world, double startX, double startY, double startZ, double endX, double endY, double endZ, @Nonnull org.joml.Vector3fc color, double thickness, float time, int flags)
      Adds a line debug shape between two points in the world.
    • addDisc

      public static void addDisc(@Nonnull World world, @Nonnull org.joml.Matrix4dc matrix, double outerRadius, double innerRadius, @Nonnull org.joml.Vector3fc color, float opacity, int segmentCount, float time, int flags)
      Adds a disc debug shape using a transformation matrix.

      This is the primary disc method. The matrix defines the position and orientation of the disc. If innerRadius is greater than 0, a ring (annulus) shape is created.

      Parameters:
      world - The world to add the disc to.
      matrix - The transformation matrix (translation and rotation).
      outerRadius - The outer radius of the disc.
      innerRadius - The inner radius of the disc (0 for solid disc).
      color - The color of the disc.
      opacity - The opacity of the disc (0.0-1.0).
      segmentCount - The number of segments for the disc edge (higher = smoother).
      time - The time the disc should exist for (in seconds).
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • addDisc

      public static void addDisc(@Nonnull World world, @Nonnull org.joml.Matrix4dc matrix, double outerRadius, double innerRadius, @Nonnull org.joml.Vector3fc color, float opacity, float time, int flags)
      Adds a disc debug shape using a transformation matrix with default segment count.
    • addDisc

      public static void addDisc(@Nonnull World world, @Nonnull org.joml.Vector3dc center, double radius, @Nonnull org.joml.Vector3fc color, float time, int flags)
      Adds a disc debug shape at the specified position.
    • addDisc

      public static void addDisc(@Nonnull World world, double x, double y, double z, double radius, @Nonnull org.joml.Vector3fc color, float time, int flags)
      Adds a disc debug shape at the specified position.
    • addDisc

      public static void addDisc(@Nonnull World world, double x, double y, double z, double radius, @Nonnull org.joml.Vector3fc color, float opacity, float time, int flags)
      Adds a disc debug shape at the specified position with custom opacity.
    • addDisc

      public static void addDisc(@Nonnull World world, double x, double y, double z, double outerRadius, double innerRadius, @Nonnull org.joml.Vector3fc color, float opacity, float time, int flags)
      Adds a disc debug shape at the specified position with inner radius and custom opacity.
    • addDisc

      public static void addDisc(@Nonnull World world, double x, double y, double z, double outerRadius, double innerRadius, @Nonnull org.joml.Vector3fc color, float opacity, int segmentCount, float time, int flags)
      Adds a disc debug shape at the specified position with full parameters.
    • addDonut

      public static void addDonut(@Nonnull World world, double x, double y, double z, double outerRadius, double innerRadius, double height, double heading, double angle, @Nonnull org.joml.Vector3fc color, float opacity, int segmentCount, float time, int flags)
      Adds a donut (annular cylinder) debug shape at the specified position.

      The donut is a ring with vertical walls: an annulus of the given inner and outer radius, extruded upwards from y by height. If angle is less than a full circle, only an arc of the ring is drawn, centered on the heading direction.

      Parameters:
      world - The world to add the donut to.
      x - The x position of the donut center.
      y - The y position of the donut base.
      z - The z position of the donut center.
      outerRadius - The outer radius of the donut.
      innerRadius - The inner radius of the donut (the size of the hole).
      height - The vertical height the donut extends up from y.
      heading - The direction (in radians) the arc is centered on (0 = +Z), ignored for a full circle.
      angle - The angular size of the arc in radians (>= 2*PI draws a full ring).
      color - The color of the donut.
      opacity - The opacity of the donut (0.0-1.0).
      segmentCount - The number of segments around the ring (higher = smoother).
      time - The time the donut should exist for (in seconds).
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • addDonut

      public static void addDonut(@Nonnull World world, double x, double y, double z, double outerRadius, double innerRadius, double height, double heading, double angle, @Nonnull org.joml.Vector3fc color, float opacity, float time, int flags)
      Adds a donut (annular cylinder) debug shape at the specified position with a default segment count.
    • addSector

      public static void addSector(@Nonnull World world, double x, double y, double z, double heading, double radius, double angle, @Nonnull org.joml.Vector3fc color, float time, int flags)
      Adds a sector (wedge) debug shape at the specified position.
    • addSector

      public static void addSector(@Nonnull World world, double x, double y, double z, double heading, double radius, double angle, @Nonnull org.joml.Vector3fc color, float opacity, float time, int flags)
      Adds a sector (wedge) debug shape at the specified position with custom opacity.
    • addSector

      public static void addSector(@Nonnull World world, double x, double y, double z, double heading, double outerRadius, double angle, double innerRadius, @Nonnull org.joml.Vector3fc color, float opacity, float time, int flags)
      Adds a sector (wedge) debug shape at the specified position with inner radius and custom opacity.
    • addSector

      public static void addSector(@Nonnull World world, double x, double y, double z, double heading, double outerRadius, double angle, double innerRadius, @Nonnull org.joml.Vector3fc color, float opacity, int segmentCount, float time, int flags)
      Adds a sector (wedge) debug shape at the specified position.

      The sector is a pie-slice shape extending from the center point. If innerRadius is greater than 0, a ring sector (arc) shape is created with the center portion removed.

      Parameters:
      world - The world to add the sector to.
      x - The x position of the sector center.
      y - The y position of the sector center.
      z - The z position of the sector center.
      heading - The heading direction in radians (0 = +Z, PI/2 = +X).
      outerRadius - The outer radius of the sector.
      angle - The full angle of the sector in radians.
      innerRadius - The inner radius (0 for solid sector, >0 for ring sector).
      color - The color of the sector.
      opacity - The opacity of the sector (0.0-1.0).
      segmentCount - The number of segments for the arc (higher = smoother).
      time - The time the sector should exist for (in seconds).
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • addArrow

      public static void addArrow(@Nonnull World world, @Nonnull org.joml.Vector3dc position, @Nonnull org.joml.Vector3dc direction, @Nonnull org.joml.Vector3fc color, float opacity, float time, int flags)
      Adds an arrow debug shape to the world pointing in a specific direction.

      The arrow is positioned at the given position and oriented to point in the direction vector. The length of the arrow is determined by the magnitude of the direction vector.

      Parameters:
      world - The world to add the arrow to.
      position - The position where the arrow starts.
      direction - The direction vector the arrow should point in (the length determines arrow length).
      color - The color of the arrow.
      opacity - The opacity of the arrow (0.0-1.0).
      time - The time the arrow should exist for (in seconds).
      flags - Flags controlling shape rendering (see FLAG_FADE, FLAG_NO_WIREFRAME, FLAG_NO_SOLID).
    • addArrow

      public static void addArrow(@Nonnull World world, @Nonnull org.joml.Vector3dc position, @Nonnull org.joml.Vector3dc direction, @Nonnull org.joml.Vector3fc color, float time, int flags)
      Adds an arrow debug shape to the world pointing in a specific direction.
    • addVelocity

      public static void addVelocity(@Nonnull World world, @Nonnull org.joml.Vector3dc position, @Nonnull org.joml.Vector3dc velocity, @Nullable VelocityConfig velocityConfig)
      Adds a force visualization arrow to the world.

      This method only displays the velocity if DISPLAY_FORCES is enabled. The velocity vector is adjusted based on the velocity configuration and player knockback scale. The arrow color is randomly generated for each velocity visualization.

      Parameters:
      world - The world to add the velocity visualization to.
      position - The position where the velocity is applied.
      velocity - The velocity vector to visualize.
      velocityConfig - The velocity configuration, used to determine if velocity scaling should be applied. May be null.
    • makeMatrix

      @Nonnull public static org.joml.Matrix4d makeMatrix(@Nonnull org.joml.Vector3dc pos, double scale)
      Creates a transformation matrix for positioning and scaling a debug shape.
      Parameters:
      pos - The position to translate to.
      scale - The uniform scale to apply.
      Returns:
      A new transformation matrix with the specified translation and scale.