最近和小伙伴玩1.12rlcraft 掉落物品太难 想弄一个死亡不掉落但是清空经验 目前想法是检测死亡榜+1就清空经验 但是具体指令不会弄

/scoreboard objectives add sidebar deathCount "死亡榜"
/gamerule keepInventory true
/gamerule keepInventory true
D小J 发表于 2022-4-15 18:26
/scoreboard objectives add sidebar deathCount "死亡榜"
/gamerule keepInventory true
谢谢 但这只是开启了死亡不掉落和死亡榜呀 有点不符合

1.12版本好像没有这种指令吧,建议换成1.16以上版本,功能指令都要多些
本帖最后由 透明色 于 2022-4-15 22:02 编辑
创建一个计分板
/scoreboard objectives add SMFX100 deathCount
当分数为1(玩家死亡),则清空经验(高频)
execute as @a[scores={SMFX100=1..} run xp @s -10000l
scoreboard players reset @a[scores={SMFX100=1..} SMFX100
版本是1.16的 可能不行
首先直接输入第一条命令
然后放一个循环的命令方块和一个连锁的 分别输入第二条命令和第三条
创建一个计分板
/scoreboard objectives add SMFX100 deathCount
当分数为1(玩家死亡),则清空经验(高频)
execute as @a[scores={SMFX100=1..} run xp @s -10000l
scoreboard players reset @a[scores={SMFX100=1..} SMFX100
版本是1.16的 可能不行
首先直接输入第一条命令
然后放一个循环的命令方块和一个连锁的 分别输入第二条命令和第三条
/scoreboard objectives add sidebar deathCount "死亡榜"
/gamerule keepInventory true
/gamerule keepInventory true
/xp -9999L @a移除玩家的9999级经验
本帖最后由 supermouse_233 于 2022-4-15 21:27 编辑
聊天栏:
/gamerule keepInventory true
/scoreboard objectives add abc deathCount
命令方块:
循环:/xp -999999L @a[scores={abc=1..}] 不确定1.12能不能用
连锁:/scoreboard players reset @a[scores={abc=1..}] abc
聊天栏:
/gamerule keepInventory true
/scoreboard objectives add abc deathCount
命令方块:
循环:/xp -999999L @a[scores={abc=1..}] 不确定1.12能不能用
连锁:/scoreboard players reset @a[scores={abc=1..}] abc
谢谢各位了 但1.12确实不行

/gamerule keepInventory true
1.12.2可用:
/scoreboard objectives add death deathCount
/gamerule keepInventory true
以下命令需循环执行:
/xp -100000l @a[score_death_min=1]
scoreboard players set @a death 0
我现做了一个数据包,如果楼主嫌麻烦的话可以直接安装
death.zip
(872 Bytes, 下载次数: 1)
把压缩包拖到地图文件夹内/data/functions/里面,解压。进游戏内先输入/reload,再/function death:1即可
/scoreboard objectives add death deathCount
/gamerule keepInventory true
以下命令需循环执行:
/xp -100000l @a[score_death_min=1]
scoreboard players set @a death 0
我现做了一个数据包,如果楼主嫌麻烦的话可以直接安装

/xp -9999L @a
天佑酱 发表于 2022-4-16 09:46
1.12.2可用:
/scoreboard objectives add death deathCount
/gamerule keepInventory true
感谢大佬 上面的指令@a后面应该加个空格 数据包能完美运行 最佳答案!
百度就有- -
lanyinging 发表于 2022-4-17 12:42
百度就有- -
搜了很久没看到 不知道你在哪看的
试试这个/scoreboard objectives add death deathCount
/gamerule keepInventory true
/gamerule keepInventory true