drawBoxByEntity

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.

This box is centered horizontally around the entity with the given width. Vertically the box is aligned with the bottom of the entities hit-box and extends upwards by height. The box can be offset from this default alignment through the use of xOffset, yOffset, zOffset.

Parameters

phase

Determines whether the box should be visible through walls (disables the depth test).

partialTicks

Used for predicting the entity's position so that the box smoothly moves with the entity.