芝士太好吃了 【Lv:2】 正式会员 注册 2023/06/27 消息 34 金粒 16,680金粒 2024/11/26 #1 purpur 1.20.4 使用ap属性插件 显示玩家目前血量与最大血量 %player_health%输入后很多小数点 想取整数 有没有插件或者papi的附属可以解决这个问题? 带个图
MrXiaoM 【Lv:4】 VIP 开发者 正式会员 注册 2021/08/13 消息 167 金粒 2,920金粒 2024/11/26 #2 取整:%player_health_rounded% 保留2位小数:%math_2_{player_health}% (需要安装 math 变量扩展) Upvote 0 反对 解决方案
PuddingKC 【Lv:5】 管理成员 版主 VIP 开发者 正式会员 注册 2019/05/30 消息 575 金粒 1,563金粒 2024/11/26 #3 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 Upvote 0 反对
MrXiaoM 【Lv:4】 VIP 开发者 正式会员 注册 2021/08/13 消息 167 金粒 2,920金粒 2024/11/26 #4 PuddingKC 说: 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 点击展开... 默认(不输入:,即half-up)或者 half-even 才是四舍五入,ceiling 是向上取整 最后编辑: 2024/11/26 Upvote 0 反对
PuddingKC 说: 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 点击展开... 默认(不输入:,即half-up)或者 half-even 才是四舍五入,ceiling 是向上取整
芝士太好吃了 【Lv:2】 正式会员 注册 2023/06/27 消息 34 金粒 16,680金粒 2024/11/26 #5 PuddingKC 说: 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 点击展开... 管用了 能不能直接显示18这样而不是有小数点这样嘞?还有方法吗 Upvote 0 反对
PuddingKC 说: 安装Math拓展,使用 %math_1:ceiling_{player_health}% 四舍五入,显示一位小数 点击展开... 管用了 能不能直接显示18这样而不是有小数点这样嘞?还有方法吗