《我的世界》篝火运用详解
我的世界是一个很贴近现实的世界。也会有温度的变化。正值寒冷的冬季,有没有感觉到气温对你的恶意呢。没关系,小编告诉你一个御寒的好方法,那就是利用篝火。篝火保暖的效果很好的哦!
先把新的五个计分板贴上来:
/scoreboard objectives add vc dummy
/scoreboard objectives add ch dummy
/scoreboard objectives add cc dummy
/scoreboard objectives add cl dummy
/scoreboard objectives add cb dummy
解析:
vc=变量cold的上限,多久减1温度
ch=玩家的头盔
cc=玩家的衣服
cl=玩家的裤子
cb=玩家的鞋子
然后搭建一个这样的新系统:
20个指令,分别为玩家的头盔、衣服。裤子、鞋子根据不同的材料设置不同的分数:
/scoreboard players set @e[type=Player] ch 5 {Inventory:[{Slot:103b,id:"minecraft:leather_helmet"}]}
/scoreboard players set @e[type=Player] ch 10 {Inventory:[{Slot:103b,id:"minecraft:golden_helmet"}]}
/scoreboard players set @e[type=Player] ch 15 {Inventory:[{Slot:100b,id:"minecraft:chainmail_helmet"}]}
/scoreboard players set @e[type=Player] ch 20 {Inventory:[{Slot:103b,id:"minecraft:iron_helmet"}]}
/scoreboard players set @e[type=Player] ch 25 {Inventory:[{Slot:103b,id:"minecraft:diamond_helmet"}]}
其他装备槽位如上,改一下helmet就行,在此不重复贴了。
接着改一改上篇冰块处的指令:
是的,最长的那个冰块处指令,被我改长了。
从左至右的指令分别是:
/scoreboard players set @e[type=Player] vc 0
把vc的值重置。
/execute @e[type=Player] ~ ~ ~ /scoreboard players operation @p vc += @p ch
/execute @e[type=Player] ~ ~ ~ /scoreboard players operation @p vc += @p cc
/execute @e[type=Player] ~ ~ ~ /scoreboard players operation @p vc += @p cl
/execute @e[type=Player] ~ ~ ~ /scoreboard players operation @p vc += @p cb
把穿上装备所加的分加到vc上面。
/scoreboard players remove @e[tag=voc,type=Player] cold 1
扣1点cold。
/scoreboard players tag @e[score_cold=1,type=Player] add rc
给玩家贴上rc标签。
/scoreboard players set @e[tag=rc] cold 61
把被贴上rc标签的玩家重置cold为61。
/execute @e[tag=rc] ~ ~ ~ /scoreboard players operation @p cold += @p vc
把装备加长的保暖时间加上。
/scoreboard players set @e[tag=rc] ch 0
/scoreboard players set @e[tag=rc] cc 0
/scoreboard players set @e[tag=rc] cl 0
/scoreboard players set @e[tag=rc] cb 0
重置玩家的保暖值为0。
/scoreboard players remove @e[tag=rc] temperature 1
把被贴上rc标签的玩家减少1点温度。
/scoreboard players tag @e[tag=rc] remove rc
移除rc标签。
总结:
当玩家穿上不同的装备,能让温度保持更久。
而且这个也可以作为动态测试玩家有没有穿戴装备的方法。