Data Packs Other

HeightBoxLib

  • 850 views 4 today
  • save_alt 19 downloads
Compatibility
Minecraft 1.20
to version
Minecraft 26.3 snapshot
Changes include
  • Functions
  • 3
  • 1
I_Cement
Lvl 38Artisan Pixel Painter Loremaster
15

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.

3 Update Logs

Release 6 : by I_Cement 09/01/2026 3:39:57 amSeptember 1 @ 7:39 am UTC

HeightBoxLib [​1.20.3 - 26.3]

  • Supports for versions from 1.20.3 all the way up to 26.3
  • More significant optimizations.
LOAD MORE LOGS

More like this

  Have something to say?

Welcome