HeightBoxLib

数据包

· 作者 Trunkis

与 Hitbox 相关的库,用于获取实体的高度!

0 本站下载 0 关注 更新于 2 个月前

最新 6 · 26.2 · 数据包

一键开服(送7天)

HeightBoxLib

用于获取实体高度的 Hitbox 相关数据包库。

用法

在实体自身上执行 hblib:util/get_height 或任何其他变体。

实体的眼睛锚点高度和碰撞箱高度将分别以 hblib:hitbox eye 和 hblib:hitbox out 的形式输出到存储中。

高度值和眼睛值可以通过计分板获取,分别为 #Eye hblib.number 和 #Total hblib.number。

示例:使实体面向玩家的躯干

##这是来自被瞄准的实体
scoreboard players set #Player hblib.number 1
function hblib:util/get_height

##完整 - 眼睛高度
scoreboard players operation #Temp plate_havoc.temp = #Total hblib.number
scoreboard players operation #Temp plate_havoc.temp -= #Eye hblib.number
#完整 /2
scoreboard players operation #Temp2 plate_havoc.temp = #Total hblib.number
scoreboard players operation #Temp2 plate_havoc.temp /= #2 plate_havoc.temp
#减半 + 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

变体

hblib:util/get_height | 获取实体碰撞箱的高度
hblib:util/get_height_dy | 实体碰撞箱高度 -0.01
hblib:util/get_halved | 实体碰撞箱高度 /2。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源