World Render Utils
object WorldRenderUtils
A Collection of Methods for Rendering within the 3D World.
This class provides methods for rendering shapes in the 3D in-game world.
The phase Parameter
To control whether objects should be visible through walls you can use the phase parameter. This will disable the depth test.
The relocate Parameter
Depending on when methods in here are called in the rendering process, coordinates may or may not be already translated by the camera position. To account for this most methods have a relocate parameter. In general, like when using the RenderWorldLastEvent, this should be set to true for the expected behaviour.
Author
Aton
Stivais
Functions
Link copied to clipboard
Link copied to clipboard
fun drawBoxByEntity(entity: Entity, color: Color, width: Double, height: Double, partialTicks: Float = 0.0f, lineWidth: Double = 2.0, phase: Boolean = false, xOffset: Double = 0.0, yOffset: Double = 0.0, zOffset: Double = 0.0)
fun drawBoxByEntity(entity: Entity, color: Color, width: Float, height: Float, partialTicks: Float = 0.0f, lineWidth: Float = 2.0f, phase: Boolean = false, xOffset: Double = 0.0, yOffset: Double = 0.0, zOffset: Double = 0.0)
Draws a rectangular cuboid outline (box) around the entity.
Link copied to clipboard
fun drawCustomSizedBoxAt(x: Double, y: Double, z: Double, size: Double, color: Color, thickness: Float = 3.0f, phase: Boolean = true, relocate: Boolean = true)
Draws a cube outline starting at x, y, z which extends by size into the positive direction along those axes.