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。
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
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 HeightBoxLib
下载 HeightBoxLib
下载 HeightBoxLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 HeightBoxLib
下载 HeightBoxLib
HeightBoxLib [1.20.3 - 26.3]
- 支持从 1.20.3 到 26.3 的所有版本
- 更显著的优化
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包
此数据包添加了属于阿瓦里海盗的独特结构,将他们的独特风格带入你的 Minecraft 世界!兼容性:1.20 至 26.3
数据包
一个 Minecraft 光线投射库,能够精确检测玩家正在查看的方块,包括像台阶和楼梯这样的特殊方块形状。
数据包
此数据包添加了新的“祝福模式”难度。
数据包
为模组生物群系添加原版回溯特性!
数据包
允许服务器管理员方便地禁用 Xaero's Map 系列模组中的实体雷达、小地图等功能,使竞技游戏更加公平。
数据包
使用原版/生存友好的方法更改青蛙的变种类型。支持原版(寒冷、温带、温暖)以及可选的“More Frogs 2”变种:深红、末影、地狱、毒镖、紫珀、幽匿、灵魂、诡异和木头。
评论 0
登录后参与评分
还没有评论,来抢沙发吧