aaaaaduidui

如何做到在1.12.2物品栏上方实时刷新以上文字的数值?

阿仟
本帖最后由 阿仟 于 2022-6-22 18:07 编辑

execute @s ~ ~ ~ title @s actionbar [{"text":"死亡数:"},{"score":{"objective":"death","name":"@s"},"bold":true,"color":"white"}]
death 即你的死亡计分板名



_ExtraAir_
您好,此工具完全可以做到您的提问所求 https://www.mcmod.cn/tools/cbcreator/#/title/

Ph-苯
  1. title @a actionbar [{"text":"死亡数:","color":"blue"},{"score":{"objective":"death","name":"*"},"color":"white"},{"text":"    游玩时间:","color":"blue"},{"score":{"objective":"playingTime","name":"*"},"color":"white"},{"text":"    经验值:","color":"blue"},{"score":{"objective":"exp","name":"*"},"color":"white"}]
复制代码
其中death、playingTime、exp分别是死亡数、游玩时间、经验值的记分板。

末影之主
如果上述变量已经引用计分板数据的话只需将title命令放在命令方块(循环,保持开启)上并且通过游戏指令/gamerule commandBlockOutput false 来隐藏命令方块的日志输出(不会影响say,tellraw等命令的结果输出)即可。如果没有引用计分板,则按照其他楼的指引引用即可,不做赘述。

夕xy
execute @a ~ ~ ~ title @s actionbar 你想要的内容(格式请使用2楼的mcmod网址)
这并不需要实时刷新,本质上你激活这个命令开始就是刷新的

ddsb418
谢谢你我也被这个问题困扰

第一页 上一页 下一页 最后一页