【服務器可用】我的世界多槍械自定義魚竿槍

我對up指令錯誤的地方進行了糾正,求置頂,另外求up教教我怎么做肢體判定
槍聲內置1~3,1是輕武器,2是重武器,3是中等武器
彈道內置1~2,1是暴擊粒子,2是白色光球
射擊間隔隨便調整,但千萬別是負數
連射必須是1或者大于1,為0無法發(fā)射
簡化版多元魚竿槍
———【內容】———為一個單獨的鏈,也就是第一個循環(huán)開啟,后面無條件連鎖連上
<內容>是注釋不用管
———【聊天輸入】———
scoreboard objectives add 槍 dummy
scoreboard objectives add 槍聲 dummy
scoreboard objectives add 準信 dummy
scoreboard objectives add 設置傷害 dummy
scoreboard objectives add 受到傷害 dummy
scoreboard objectives add 設置射程 dummy
scoreboard objectives add 射程 dummy
scoreboard objectives add 設置后坐力 dummy
scoreboard objectives add 后坐力 dummy
scoreboard objectives add 搖晃后坐力 dummy
scoreboard objectives add 設置間隔 dummy
scoreboard objectives add 設置連射 dummy
scoreboard objectives add 射擊間隔 dummy
scoreboard objectives add 連射 dummy
scoreboard objectives add 彈道 dummy
scoreboard objectives add 槍聲 dummy
scoreboard objectives add 彈藥 dummy
<以下全是命令方塊>
<可以自己隨便改,不該也能用>
———【檢測扔魚竿】———
execute @e [type=fishing_hook] ~~~ tag @p add 開槍
tag @a [hasitem={item=iron_nugget},scores={彈藥=1},tag=開槍]?add 可以發(fā)射
clear @a [hasitem={item=iron_nugget},scores={彈藥=1},tag=開槍] iron_nugget 0 1
tag @a [hasitem={item=gold_nugget},scores={彈藥=2},tag=開槍]?add 可以發(fā)射
clear @a [hasitem={item=gold_nugget},scores={彈藥=2},tag=開槍]?gold_nugget 0 1
execute @e [tag=可以發(fā)射,scores={射擊間隔=0}] ~~~ scoreboard players operation @s 連射 = @s 設置連射
execute @e [tag=可以發(fā)射,scores={射擊間隔=0}] ~~~ scoreboard players operation @s 射擊間隔 = @s 設置間隔
tag @e remove 開槍
tag @e remove 可以發(fā)射
tp @e [type=fishing_hook] ~~10000~
scoreboard players remove @e [scores={射擊間隔=1..}] 射擊間隔?1
———【射擊部分】———
<射擊前準備>
execute @e [scores={連射=1..}] ~~~ scoreboard players operation @s 射程 = @s 設置射程
execute @e [scores={連射=1..}] ~~~ scoreboard players operation @s 后坐力 = @s 設置后坐力
<搖晃后坐力>
execute @e [scores={搖晃后坐力=1,連射=1..}] ~~~ camerashake add @s 0.2 0.1 rotational
execute @e [scores={搖晃后坐力=2,連射=1..}] ~~~ camerashake add @s 0.5 0.15 rotational
<槍聲>
execute @e [scores={槍聲=1,連射=1..}] ~~~ playsound mob.enderdragon.growl @a[r=30] ~~~ 1 15 1?
execute @e [scores={槍聲=2,連射=1..}] ~~~ playsound ambient.weather.thunder @a[r=40] ~~~ 100 20 100
execute @e [scores={槍聲=3,連射=1..}] ~~~ playsound mob.zombie.woodbreak @a [r=40] ~~~ 100 3 100
<射程1>只是模版,后面更長的射程自己改,懂?
execute @e [scores={連射=1..,設置射程=1..}] ~~~ detect ^^1^1 air 0 scoreboard players set @s 射程 1
execute @e?[scores={連射=1..,射程=1}] ^^1^1 scoreboard players operation @e [r=1] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=1,彈道=1}] ^^1^1 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=1,彈道=2}] ^^1^1 particle minecraft:balloon_gas_particle?
<射程2>
execute @e [scores={連射=1..,設置射程=2..,射程=1}] ~~~ detect ^^1^2 air 0 scoreboard players set @s 射程 2
execute @e?[scores={連射=1..,射程=2}] ^^1^2 scoreboard players operation @e [r=1.5] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=2,彈道=1}] ^^1^2 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=2,彈道=2}] ^^1^2 particle minecraft:balloon_gas_particle?
<射程3>
execute @e [scores={連射=1..,設置射程=3.. ,射程=2}] ~~~ detect ^^1^3 air 0 scoreboard players set @s 射程 3
execute @e?[scores={連射=1..,射程=3}] ^^1^3 scoreboard players operation @e [r=1.5] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=3,彈道=1}] ^^1^3 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=3,彈道=2}] ^^1^3 particle minecraft:balloon_gas_particle?
scoreboard players remove @e [scores={連射=1..}] 連射 1
<射程4>
execute @e [scores={連射=1..,設置射程=4.. ,射程=3}] ~~~ detect ^^1^4 air 0 scoreboard players set @s 射程 4
execute @e?[scores={連射=1..,射程=4}] ^^1^4 scoreboard players operation @e [r=1.5] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=4,彈道=1}] ^^1^4 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=4,彈道=2}] ^^1^4 particle minecraft:balloon_gas_particle?
<射程5>
execute @e [scores={連射=1..,設置射程=5.. ,射程=4}] ~~~ detect ^^1^5 air 0 scoreboard players set @s 射程 5
execute @e?[scores={連射=1..,射程=5}] ^^1^5 scoreboard players operation @e [r=1.5] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=5,彈道=1}] ^^1^5?particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=5,彈道=2}] ^^1^5 particle minecraft:balloon_gas_particle?
<射程6>
execute @e [scores={連射=1..,設置射程=6.. ,射程=5}] ~~~ detect ^^1^6 air 0 scoreboard players set @s 射程 6
execute @e?[scores={連射=1..,射程=6}] ^^1^6 scoreboard players operation @e [r=1.5] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=6,彈道=1}] ^^1^6 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=6,彈道=2}] ^^1^6 particle minecraft:balloon_gas_particle
<射程7>
execute @e [scores={連射=1..,設置射程=7.. ,射程=6}] ~~~ detect ^^1^7 air 0 scoreboard players set @s 射程 7
execute @e?[scores={連射=1..,射程=7}] ^^1^7 scoreboard players operation @e [r=1.5] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=7,彈道=1}] ^^1^7 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=7,彈道=2}] ^^1^7 particle minecraft:balloon_gas_particle
<射程8>
execute @e [scores={連射=1..,設置射程=8.. ,射程=7}] ~~~ detect ^^1^8 air 0 scoreboard players set @s 射程 8
execute @e?[scores={連射=1..,射程=8}] ^^1^8 scoreboard players operation @e [r=1.5] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=8,彈道=1}] ^^1^8 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=8,彈道=2}] ^^1^8 particle minecraft:balloon_gas_particle
<射程9>
execute @e [scores={連射=1..,設置射程=9.. ,射程=8}] ~~~ detect ^^1^9 air 0 scoreboard players set @s 射程 8
execute @e?[scores={連射=1..,射程=9}] ^^1^9 scoreboard players operation @e [r=1.5] 受到傷害 = @s 設置傷害
execute @e?[scores={連射=1..,射程=9,彈道=1}] ^^1^9 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=9,彈道=2}] ^^1^9 particle minecraft:balloon_gas_particle
<射程10>
execute @e [scores={連射=1..,設置射程=10.. ,射程=8}] ~~~ detect ^^1^10 air 0 scoreboard players set @s 射程 10
execute @e?[scores={連射=1..,射程=10}] ^^1^10 scoreboard players operation @e [r=1.5] 受到傷害= @s 設置傷害
execute @e?[scores={連射=1..,射程=10,彈道=1}] ^^1^10 particle minecraft:basic_crit_particle ~~~
execute @e?[scores={連射=1..,射程=10,彈道=2}] ^^1^10 particle minecraft:balloon_gas_particle
scoreboard players remove @e [scores={連射=1..}] 連射 1
———【準信】———
<不喜歡可以不加>
title @a times 1 100 1
title @a [hasitem={item=fishing_rod,location=slot.weapon.mainhand,slot=0},scores={準信=1}]title §r
?( · )?
title @a [hasitem={item=fishing_rod,location=slot.weapon.mainhand,slot=0},scores={準信=2}]title §7
+
title @a [hasitem={item=fishing_rod,location=slot.weapon.mainhand,slot=0},scores={準信=3}]title §e
[ - ]
title @a [hasitem={item=fishing_rod,location=slot.weapon.mainhand,slot=0},scores={準信=4}]title §7
-?
———【傷害】———
execute @e [scores={受到傷害=1..}]?~ ~ ~ fill ~ ~ ~ ~~~ redstone_block 0 replace air 0
execute @e [scores={受到傷害=1..}]?~ ~ ~ detect ~~~ redstone_block?0 fill ~ ~ ~ ~~~?air 0 destroy
execute @e [scores={受到傷害=1..}]?~ ~ ~ kill @e [type=item,name=紅石塊,r=2,c=1]
damage @e [scores={受到傷害=2..},type=!item] 2 suicide
scoreboard players remove @e [scores={受到傷害=2..}] 受到傷害 2
damage @e [scores={受到傷害=1..},type=!item] 1 suicide
scoreboard players remove @e [scores={受到傷害=1..}] 受到傷害 1
tag @a add 活著
tag @e [type=player] remove 活著
scoreboard players set @a [tag=活著] 受到傷害 0
tag @a remove 活著
———【防止bug】———
scoreboard players add @a 彈藥 0
scoreboard players add @a 射擊間隔 0
scoreboard players add @a 連射 0
———【后坐力】———
execute @e [scores={后坐力=4..}] ~~~ tp @s ~~~~~-4
scoreboard players remove @e [scores={后坐力=4..}] 后坐力 4
execute @e [scores={后坐力=2..}] ~~~ tp @s ~~~~~-4
scoreboard players remove @e [scores={后坐力=2..}] 后坐力 2
execute @e [scores={后坐力=1..}] ~~~ tp @s ~~~~~-2
scoreboard players remove @e [scores={后坐力=1..}] 后坐力 1
———【模版】———
scoreboard players set @a [scores={槍=1}]?設置后坐力 1
scoreboard players set @a [scores={槍=1}] 彈藥 1
scoreboard players set @a [scores={槍=1}] 設置傷害 1
scoreboard players set @a [scores={槍=1}] 設置間隔 1
scoreboard players set @a [scores={槍=1}] 設置連射 1
scoreboard players set @a [scores={槍=1}] 設置射程 1
scoreboard players set @a [scores={槍=1}] 搖晃后坐力 1
scoreboard players set @a [scores={槍=1}] 槍聲 1
scoreboard players set @a [scores={槍=1}] 彈道 1
scoreboard players set @a [scores={槍=1}] 準信 1
titleraw @a [hasitem={item=fishing_rod,location=slot.weapon.mainhand,slot=0},scores={槍=1}]actionbar {"rawtext":[{"text":"§4=========§7-<武器名稱>§4=========\n§e屬性:"}, {"text":"\n§e傷害:§7"}, {"score":{"name":"*","objective":"設置傷害"}}, {"text":"??§6射程:§2"}, {"score":{"name":"*","objective":"設置射程"}}, {"text":"??\n§e??射速:§a"}, {"score":{"name":"*","objective":"設置連射"}}, {"text":"??\n§7射擊間隔:§b"}, {"score":{"name":"*","objective":"射擊間隔"}},{"text":"\n§bB站『§e不務正業(yè)的up鴿§r』"}]}
———【踏板換槍】———
scoreboard players set @p 槍 1