我的世界命令方塊指令怎麼創造經驗瓶炸彈
我的世界命令方塊的功能十分強大,今天小編爲大家帶來的是我的世界命令方塊創造經驗瓶炸彈指令分享,喜歡的小夥伴不妨看看怎麼使用命令方塊製作經驗瓶炸彈吧,希望大家喜歡。
下面是OOC:
/summon FallingSand ~ ~1 ~2 {Time:1,Block:"minecraft:redstone_block",Passengers:[{id:"FallingSand",Time:1,Block:"minecraft:activator_rail",Passengers:[{id:"MinecartCommandBlock",Command:"/gamerule commandBlockOutput false"},{id:"MinecartCommandBlock",Command:"/scoreboard objectives add timer dummy"},{id:"MinecartCommandBlock",Command:"/scoreboard objectives add xptimer dummy"},{id:"MinecartCommandBlock",Command:"/title @a title [{"text":"經驗瓶手榴彈安裝成功","color":"red"}]"}, {id:"MinecartCommandBlock",Command:"/title @a subtitle [{"text":"碼蟻工作室_天際製作 Minecraftid:Freerr","color":"aqua"}]"},{id:"MinecartCommandBlock",Command:"/setblock ~ ~-1 ~-2 minecraft:air"},{id:"MinecartCommandBlock",Command:"/replaceitem entity @a slot.hotbar.4 minecraft:experience_bottle 64 0 {display:{Name:"手榴彈"}}"},{id:"MinecartCommandBlock",Command:"setblock ~0 ~2 ~0 repeating_command_block 5 replace {auto:1b,Command:"/testfor @e[type=ThrownExpBottle,tag=true]"}"},{id:"MinecartCommandBlock",Command:"setblock ~1 ~2 ~0 repeating_command_block 13 replace {auto:1b,Command:"/scoreboard players add @a timer 1"}"},{id:"MinecartCommandBlock",Command:"setblock ~2 ~2 ~0 repeating_command_block 5 replace {auto:1b,Command:"/scoreboard players test @a timer 3"}"},{id:"MinecartCommandBlock",Command:"setblock ~3 ~2 ~0 chain_command_block 13 replace {auto:1b,Command:"/execute @e[type=XPOrb,score_xptimer=5] ~ ~ ~ summon PrimedTnt"}"},{id:"MinecartCommandBlock",Command:"setblock ~4 ~2 ~0 repeating_command_block 3 replace {auto:1b,Command:"/scoreboard players add @e[type=XPOrb] xptimer 1"}"},{id:"MinecartCommandBlock",Command:"setblock ~4 ~2 ~1 chain_command_block 4 replace {auto:1b,Command:"/execute @e[type=PrimedTnt] ~ ~ ~ scoreboard players set @a timer 0"}"},{id:"MinecartCommandBlock",Command:"setblock ~3 ~2 ~1 chain_command_block 4 replace {auto:1b,Command:"/testfor @a {SelectedItem:{id:minecraft:experience_bottle,tag:{display:{Name:"手榴彈 "}}}}"}"},{id:"MinecartCommandBlock",Command:"setblock ~2 ~2 ~1 chain_command_block 12 replace {auto:1b,Command:"/scoreboard players tag @e[type=ThrownExpBottle] add true"}"},{id:"MinecartCommandBlock",Command:"setblock ~1 ~2 ~1 repeating_command_block 4 replace {auto:1b,Command:"/kill @e[score_xptimer_min=800]"}"},{id:"MinecartCommandBlock",Command:"fill ~-1 ~1 ~-1 ~5 ~3 ~2 stained_glass 3 outline"},{id:"MinecartCommandBlock",Command:"fill ~-1 ~1 ~-1 ~5 ~1 ~2 stained_hardened_clay 3"},{id:"MinecartCommandBlock",Command:"fill ~-1 ~3 ~-1 ~5 ~3 ~2 stained_hardened_clay 3"},{id:"MinecartCommandBlock",Command:"setblock ~2 ~2 ~-2 wall_sign 8 replace {Text3:"{"text":"[ 點我移除模組 ]","color":"dark_red","clickEvent":{"action":"run_command","value":"fill ~-3 ~-1 ~ ~3 ~1 ~4 air 0"}}"}"},{id:"MinecartCommandBlock",Command:"/setblock ~ ~-1 ~ minecraft:lava 15"},{id:"MinecartCommandBlock",Command:"setblock ~ ~ ~ air 0"}]}]}
這個版本修復了所有的BUG,包括只讓指定的經驗球爆炸,只有扔特定名字的經驗瓶才能爆炸等等等等,但是,還有一個小BUG,跟MOJANG的武器判定傷害BUG一樣,比如用箭♂射♂一個生物,在箭在空中飛的時候換成鑽石劍會對生物造成和用鑽石劍一樣的傷害,而我的這個是扔一個普通的經驗瓶然後迅速換成手榴彈名字的經驗瓶也會爆炸,MOJANG什麼時候修了這個傷害數值BUG(特性),我在把這個BUG修掉也不遲。
使用方法:扔出一個叫做手榴彈的經驗瓶就好啦
下面是命令分解
/scoreboard objectives add timer dummy
/scoreboard objectives add xptimer dummy
新建計時器2——計分板xptimer
/testfor @e[type=ThrownExpBottle,tag=true]
高頻檢測手榴彈名字的經驗瓶
/scoreboard players add @a timer 1
如果檢測到就給計時器的分數+1
/scoreboard players test @a timer 3
檢測計時器的分數是否超過三
/execute @e[type=XPOrb,score_xptimer=5] ~ ~ ~ summon PrimedTnt
如果是則使剛生成的經驗球召喚點燃的tnt
/scoreboard players add @e[type=XPOrb] xptimer 1
每tick給經驗球的xptimer加一分
/execute @e[type=PrimedTnt] ~ ~ ~ scoreboard players set @a timer 0
讓點燃的tnt重置計時器的分數
/testfor @a {SelectedItem:{id:minecraft:experience_bottle,tag:{display:{Name:"手榴彈"}}}}
/scoreboard players tag @e[type=ThrownExpBottle] add true
是則給經驗瓶添加tag