Back to mods
HeightBoxLib project artwork

Modrinth · Minecraft mod

HeightBoxLib

Hitbox related Library that gets the entity's height!

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which HeightBoxLib release matches Fabric?

Updated 2 days ago
Best match for your filters 3+mod
Game version 1.21, 1.21.1, 1.21.2
Loader Fabric, Forge, NeoForge

HeightBoxLib 3+mod targets 1.21, 1.21.1, 1.21.2 with Fabric, Forge, NeoForge. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is HeightBoxLib required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release Fabric, Forge, NeoForge
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does HeightBoxLib 3+mod need?

3+mod on Fabric. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add HeightBoxLib without breaking your instance.

Built for HeightBoxLib 3+mod on Fabric. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 3+mod. It targets 1.21, 1.21.1, 1.21.2 with Fabric, Forge, NeoForge; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 3+mod. It opens that exact file at the source.

About this project

What does HeightBoxLib add?

HeightBoxLib

Hitbox related library datapack for geting the height of an entity.

Usage

Execute as an entity at itself and run hblib:util/get_height or any of the other variants.

The height position of both the entity's eye anchor and the hitbox height will be outputted as hblib:hitbox eye and hblib:hitbox out in storage.

The height and eye values can be obtained in score as #Eye hblib.number and #Total hblib.number

Example: Making an entity face a torso of a player

##This is from the targetted entity
scoreboard players set #Player hblib.number 1
function hblib:util/get_height

##Full - Eye height
scoreboard players operation #Temp plate_havoc.temp = #Total hblib.number
scoreboard players operation #Temp plate_havoc.temp -= #Eye hblib.number
#Full /2
scoreboard players operation #Temp2 plate_havoc.temp = #Total hblib.number
scoreboard players operation #Temp2 plate_havoc.temp /= #2 plate_havoc.temp
#Halved + Temp
execute store result storage plate_havoc:custom torso double 0.01 run scoreboard players operation #Temp plate_havoc.temp += #Temp2 plate_havoc.temp

execute anchored eyes as 00000000-0000-0005-0000-0001000007e9 run function plate_havoc:game/misc/face_torso/execute with storage plate_havoc:custom

Variants

hblib:util/get_height | Gets height of an entity's hitbox
hblib:util/get_height_dy | Height of an entity's hitbox -0.01
hblib:util/get_halved | Height of an entity's hitbox /2.

Project description from Modrinth.

Pick your setup

HeightBoxLib by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

102 available setups

Showing the newest 12 of 82 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

HeightBoxLib versions and loaders

1 of 6 releases match
Clear filters

Looking for an older file? The official Modrinth project page is in Resources.