Package dev.boze.api.render
Class HudDrawer
java.lang.Object
dev.boze.api.render.HudDrawer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddraw()Renders the current drawing session to the screenstatic voidline(ColorOption.Value colorOption, double x1, double y1, double x2, double y2) Renders a line using ColorOption.Valuestatic voidline(ClientColor color, float opacity, double x1, double y1, double x2, double y2) Renders a linestatic voidquad(ColorOption.Value colorOption, double x, double y, double width, double height) Renders a quad/filled rectangle using ColorOption.Valuestatic voidquad(ClientColor color, float opacity, double x, double y, double width, double height) Renders a quad/filled rectanglestatic voidstart()Starts a new HUD drawing session
-
Constructor Details
-
HudDrawer
public HudDrawer()
-
-
Method Details
-
start
public static void start()Starts a new HUD drawing session Must be called before any drawing operations. Throws RuntimeException if already started -
draw
public static void draw()Renders the current drawing session to the screen Throws RuntimeException if start() was not called first -
line
public static void line(ClientColor color, float opacity, double x1, double y1, double x2, double y2) Renders a line Throws RuntimeException if start() was not called first- Parameters:
color- The color to useopacity- The opacity valuex1- Starting X coordinatey1- Starting Y coordinatex2- Ending X coordinatey2- Ending Y coordinate
-
quad
public static void quad(ClientColor color, float opacity, double x, double y, double width, double height) Renders a quad/filled rectangle Throws RuntimeException if start() was not called first- Parameters:
color- The color to useopacity- The opacity valuex- X coordinatey- Y coordinatewidth- Width of the quadheight- Height of the quad
-
line
Renders a line using ColorOption.Value Throws RuntimeException if start() was not called first- Parameters:
colorOption- The color option value containing color and opacity settingsx1- Starting X coordinatey1- Starting Y coordinatex2- Ending X coordinatey2- Ending Y coordinate
-
quad
public static void quad(ColorOption.Value colorOption, double x, double y, double width, double height) Renders a quad/filled rectangle using ColorOption.Value Throws RuntimeException if start() was not called first- Parameters:
colorOption- The color option value containing color and opacity settingsx- X coordinatey- Y coordinatewidth- Width of the quadheight- Height of the quad
-