截图
介绍
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.
常见问题
HeightBoxLib 支持哪些 Minecraft 版本?
HeightBoxLib 支持 Minecraft Java 版 1.20.3–26.2,共 20 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。
HeightBoxLib 怎么安装?
新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。
Trunkis 的其他作品
查看全部 →
Player Husk
Did I just see another of myself? Mimics of yourself that copies your exact movements with nothing to stop them.
Mario Wonder-like Standees
Mario Wonder-like revival system!
Zombies Powerups
Zombies powerups from various Call of Duty titles
Sanatorium Ambience
This Data Pack is mainly for use in my Sanatorium map, but you can download and use it in your own worlds.
评论
登录后评论和评分