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。
你是这个资源的作者?登录后可认领此资源。
相似资源
此数据包添加了属于阿瓦里海盗的独特结构,将他们的独特风格带入你的 Minecraft 世界!兼容性:1.20 至 26.3
一个 Minecraft 光线投射库,能够精确检测玩家正在查看的方块,包括像台阶和楼梯这样的特殊方块形状。
此数据包添加了新的“祝福模式”难度。
添加了基于官方概念图的蓝蛙和红眼树蛙变体。
为模组生物群系添加原版回溯特性!
允许服务器管理员方便地禁用 Xaero's Map 系列模组中的实体雷达、小地图等功能,使竞技游戏更加公平。
评论 0
登录后参与评分
还没有评论,来抢沙发吧