Constructors

Link copied to clipboard
constructor(baseCenter: Location, width: Double, height: Double)

Properties

Link copied to clipboard
val baseCenter: Vector3fc
Link copied to clipboard
val center: Vector3fc
Link copied to clipboard
val from: Vector3fc
Link copied to clipboard
Link copied to clipboard
val to: Vector3fc
Link copied to clipboard
val world: World

Functions

Link copied to clipboard

Adds a handler to this Hitbox that is called when a player left-clicks the hitbox

Link copied to clipboard

Adds a handler to this Hitbox that is called when a player right-clicks the hitbox.

Link copied to clipboard
operator fun contains(location: Location): Boolean

Determines whether a given location is inside this Hitbox.

Link copied to clipboard
fun determineBlockFace(location: Vector3f): BlockFace?

Determines the clicked BlockFace of the hitbox based on the relative location provided by the interact handler. Returns null if the location is inside the hitbox.

Link copied to clipboard
fun register()

Adds the Hitbox to the world.

Link copied to clipboard
fun remove()

Removes the Hitbox from the world.