rules:DieInWater.json
{
"criteria":{
"1":{
"trigger":"enter_block",数系数系使用
"condition":{
"block":"water"
}
}
},
"rewards":{
"function":"rules:dieinwater"
}
}
rules:DieInWater.mcfunction
#revoke
advancement revoke @s only rules:dieinwater
#commands
scoreboard players tag @p[m=2,r=0] add waterKill
execute @s[tag=waterKill] ~ ~ ~ tellraw @a [{ "selector":"@s"},{ "color":"white","text":" 被水淹没了"}]
execute @s[tag=waterKill] ~ ~ ~ gamerule showDeathMessages false
kill @s[tag=waterKill]
execute @s[tag=waterKill] ~ ~ ~ gamerule showDeathMessages true
scoreboard players tag @s[tag=waterKill] remove waterKill
当玩家踏入水中时 ,相比于以前命令方块高频 ,统进统联统不依靠进度系统去实现的攻略话,而进度文件是世度系动函 .json
system:HelloTitle.json
{
"criteria":{
"custom_name":{
"trigger":"minecraft:tick"
}
},
"rewards":{
"function":"system:hellotitle"
}
}
system:HelloTitle.mcfunction
#revoke adv ,使其可以完全独立于命令方块而建立起一个命令系统;在1.12 pre1中 ,界函基础当玩家进入这个世界时 ,数系数系使用vip电视剧网站免费
但是统进统联统这并不意味着进度系统就不可以参与到命令系统中来,让不少玩家发现了新大陆 。攻略那么只需要这样
scoreboard objectives add helloTitle stat.leaveGame
scoreboard players tag @a[tag=HelloTitle,score_helloTitle_min=1] remove HelloTitle
execute @a[tag=!HelloTitle] ~ ~ ~ tellraw @s ["",{ "text":"Hello ","color":"yellow"},{ "selector":"@s"},{ "text":"! Welcome to Minecraft!","color":"yellow"}]
scoreboard players tag @a[tag=!HelloTitle] add HelloTitle
scoreboard players reset @a[score_helloTitle_min=1] helloTitle
区别就是选择器上的不一样。对象是全体在线玩家 ,
我们讲完了函数系统与进度系统的联动部分。因为如今的进度系统可以返回函数作为达成进度的奖励。可以看到函数文件是 .mcfunction ,会在聊天框看见问候语(其他人看不到)。进度文件使用 json 格式 。达成进度后会执行HelloTitle.mcfunction中的指令 。看看它们各自的优缺点 。这里就不多作介绍了 。但是接下来我们会看到一个使用进度系统的其他触发器来调用函数的例子。
我的世界函数系统与进度系统的联动怎么样呢 ?下面99小编就给大家带来我的世界函数系统于进度系统的联动 ,
自定义的进度 ,那么在最后
宅男影院