言い忘れていましたが、データ値723の木のクワでしか動作しません。 鉄のインゴットはなんでもいいです データ値723の木のクワを出すコマンド /give @s wooden_hoe 1 723 1番最初→反復 無条件 常にアクティブ それ以外→ チェーン 無条件 常にアクティブ すべて一列につなげる すべて同じ向きにする 多分functionでも使える ちょっと少ない方(弾丸数無し) ⇩ /scoreboard objectives add gun_1 dummy /scoreboard players add @e[type=boat,tag=gun_1] gun_1 1 /execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s unless entity @e[type=armor_stand,name=gun_1,r=3] run summon armor_stand "gun_1" ^ ^ ^1 /execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run tp @e[type=armor_stand,name=gun_1,r=3,c=1] ^ ^1 ^1 facing @s[c=1] /execute as @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run summon boat ~ ~ ~ /execute as @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run tag @e[r=2,type=boat] add gun_1 /replaceitem entity @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] slot.weapon.mainhand 0 air /execute as @e[scores={gun_1=1}] at @s run playsound random.explode @a ~ ~ ~ 1 2.5 1 /execute as @e[scores={gun_1=1}] at @s run tp @s ~ ~ ~ facing @p /execute as @e[scores={gun_1=2}] at @s run tp @s ~ ~100 ~ /execute as @e[scores={gun_1=3..}] at @s run tp @s ^ ^-0.5 ^-1 /execute as @e[scores={gun_1=3..}] at @s run particle minecraft:balloon_gas_particle ~ ~-100 ~ /execute as @e[scores={gun_1=3..}] at @s positioned ~ ~-100 ~ run damage @e[r=1] 10 /kill @e[scores={gun_1=20..}] /effect @e[type=armor_stand,name=gun_1] invisibility 1 1 true /playanimation @e[type=armor_stand,name=gun_1] animation.creeper.swelling a 10 /execute as @e[type=armor_stand,name=gun_1] at @s unless entity @p[r=3,hasitem={item=wooden_hoe,location=slot.weapon.mainhand}] run kill @s 多い方(弾丸数有り) ⇩ /scoreboard objectives add gun_1 dummy /scoreboard objectives add gun_1_bullet dummy /execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run titleraw @s actionbar {"rawtext":[{"text":"残り弾丸数 ["},{"score":{"name":"@s","objective":"gun_1_bullet"}},{"rawtext":[{"text":"]"}]}]} /execute as @a[hasitem={item=iron_ingot,location=slot.weapon.mainhand},tag=!cleared] at @s if entity @s[y=~1.4,dx=0] unless entity @s[y=~1.5,dx=0] run scoreboard players add @s gun_1_bullet 15 /execute as @a[hasitem={item=iron_ingot,location=slot.weapon.mainhand},tag=!cleared] at @s if entity @s[y=~1.4,dx=0] unless entity @s[y=~1.5,dx=0] run playsound open.iron_door @a ~ ~ ~ 1 2 1 /execute as @a[hasitem={item=iron_ingot,location=slot.weapon.mainhand},tag=!cleared] at @s if entity @s[y=~1.4,dx=0] unless entity @s[y=~1.5,dx=0] run clear @s iron_ingot 0 1 /execute as @a[hasitem={item=iron_ingot,location=slot.weapon.mainhand},tag=!cleared] at @s if entity @s[y=~1.4,dx=0] unless entity @s[y=~1.5,dx=0] run tag @s add cleared /execute as @a at @s if entity @s[y=~1.5,dx=0] run tag @s remove cleared /scoreboard players add @e[type=boat,tag=gun_1] gun_1 1 /execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723},scores={gun_1_bullet=1..}] at @s unless entity @e[type=armor_stand,name=gun_1,r=3] run summon armor_stand "gun_1" ^ ^ ^1 /execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723},scores={gun_1_bullet=1..}] at @s run tp @e[type=armor_stand,name=gun_1,r=3,c=1] ^ ^1 ^1 facing @s[c=1] /execute as @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run summon boat ~ ~ ~ /execute as @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run tag @e[r=2,type=boat] add gun_1 /replaceitem entity @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] slot.weapon.mainhand 0 air /execute as @e[scores={gun_1=1}] at @s run playsound random.explode @a ~ ~ ~ 1 2.5 1 /execute as @e[scores={gun_1=1}] at @s as @p[r=3] at @s run scoreboard players add @s gun_1_bullet -1 /execute as @e[scores={gun_1=1}] at @s run tp @s ~ ~ ~ facing @p /execute as @e[scores={gun_1=2}] at @s run tp @s ~ ~100 ~ /execute as @e[scores={gun_1=3..}] at @s run tp @s ^ ^-0.5 ^-1 /execute as @e[scores={gun_1=3..}] at @s run particle minecraft:balloon_gas_particle ~ ~-100 ~ /execute as @e[scores={gun_1=3..}] at @s positioned ~ ~-100 ~ run damage @e[r=1] 10 /kill @e[scores={gun_1=20..}] /effect @e[type=armor_stand,name=gun_1] invisibility 1 1 true /playanimation @e[type=armor_stand,name=gun_1] animation.creeper.swelling a 10 /execute as @e[type=armor_stand,name=gun_1] at @s unless entity @p[r=3,hasitem={item=wooden_hoe,location=slot.weapon.mainhand},scores={gun_1_bullet=1..}] run kill @s
言い忘れていましたが、データ値723の木のクワでしか動作しません。
鉄のインゴットはなんでもいいです
データ値723の木のクワを出すコマンド
/give @s wooden_hoe 1 723
1番最初→反復 無条件 常にアクティブ
それ以外→ チェーン 無条件 常にアクティブ
すべて一列につなげる
すべて同じ向きにする
多分functionでも使える
ちょっと少ない方(弾丸数無し)
⇩
/scoreboard objectives add gun_1 dummy
/scoreboard players add @e[type=boat,tag=gun_1] gun_1 1
/execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s unless entity @e[type=armor_stand,name=gun_1,r=3] run summon armor_stand "gun_1" ^ ^ ^1
/execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run tp @e[type=armor_stand,name=gun_1,r=3,c=1] ^ ^1 ^1 facing @s[c=1]
/execute as @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run summon boat ~ ~ ~
/execute as @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run tag @e[r=2,type=boat] add gun_1
/replaceitem entity @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] slot.weapon.mainhand 0 air
/execute as @e[scores={gun_1=1}] at @s run playsound random.explode @a ~ ~ ~ 1 2.5 1
/execute as @e[scores={gun_1=1}] at @s run tp @s ~ ~ ~ facing @p
/execute as @e[scores={gun_1=2}] at @s run tp @s ~ ~100 ~
/execute as @e[scores={gun_1=3..}] at @s run tp @s ^ ^-0.5 ^-1
/execute as @e[scores={gun_1=3..}] at @s run particle minecraft:balloon_gas_particle ~ ~-100 ~
/execute as @e[scores={gun_1=3..}] at @s positioned ~ ~-100 ~ run damage @e[r=1] 10
/kill @e[scores={gun_1=20..}]
/effect @e[type=armor_stand,name=gun_1] invisibility 1 1 true
/playanimation @e[type=armor_stand,name=gun_1] animation.creeper.swelling a 10
/execute as @e[type=armor_stand,name=gun_1] at @s unless entity @p[r=3,hasitem={item=wooden_hoe,location=slot.weapon.mainhand}] run kill @s
多い方(弾丸数有り)
⇩
/scoreboard objectives add gun_1 dummy
/scoreboard objectives add gun_1_bullet dummy
/execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run titleraw @s actionbar {"rawtext":[{"text":"残り弾丸数 ["},{"score":{"name":"@s","objective":"gun_1_bullet"}},{"rawtext":[{"text":"]"}]}]}
/execute as @a[hasitem={item=iron_ingot,location=slot.weapon.mainhand},tag=!cleared] at @s if entity @s[y=~1.4,dx=0] unless entity @s[y=~1.5,dx=0] run scoreboard players add @s gun_1_bullet 15
/execute as @a[hasitem={item=iron_ingot,location=slot.weapon.mainhand},tag=!cleared] at @s if entity @s[y=~1.4,dx=0] unless entity @s[y=~1.5,dx=0] run playsound open.iron_door @a ~ ~ ~ 1 2 1
/execute as @a[hasitem={item=iron_ingot,location=slot.weapon.mainhand},tag=!cleared] at @s if entity @s[y=~1.4,dx=0] unless entity @s[y=~1.5,dx=0] run clear @s iron_ingot 0 1
/execute as @a[hasitem={item=iron_ingot,location=slot.weapon.mainhand},tag=!cleared] at @s if entity @s[y=~1.4,dx=0] unless entity @s[y=~1.5,dx=0] run tag @s add cleared
/execute as @a at @s if entity @s[y=~1.5,dx=0] run tag @s remove cleared
/scoreboard players add @e[type=boat,tag=gun_1] gun_1 1
/execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723},scores={gun_1_bullet=1..}] at @s unless entity @e[type=armor_stand,name=gun_1,r=3] run summon armor_stand "gun_1" ^ ^ ^1
/execute as @a[hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723},scores={gun_1_bullet=1..}] at @s run tp @e[type=armor_stand,name=gun_1,r=3,c=1] ^ ^1 ^1 facing @s[c=1]
/execute as @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run summon boat ~ ~ ~
/execute as @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] at @s run tag @e[r=2,type=boat] add gun_1
/replaceitem entity @e[type=armor_stand,name=gun_1,hasitem={item=wooden_hoe,location=slot.weapon.mainhand,data=723}] slot.weapon.mainhand 0 air
/execute as @e[scores={gun_1=1}] at @s run playsound random.explode @a ~ ~ ~ 1 2.5 1
/execute as @e[scores={gun_1=1}] at @s as @p[r=3] at @s run scoreboard players add @s gun_1_bullet -1
/execute as @e[scores={gun_1=1}] at @s run tp @s ~ ~ ~ facing @p
/execute as @e[scores={gun_1=2}] at @s run tp @s ~ ~100 ~
/execute as @e[scores={gun_1=3..}] at @s run tp @s ^ ^-0.5 ^-1
/execute as @e[scores={gun_1=3..}] at @s run particle minecraft:balloon_gas_particle ~ ~-100 ~
/execute as @e[scores={gun_1=3..}] at @s positioned ~ ~-100 ~ run damage @e[r=1] 10
/kill @e[scores={gun_1=20..}]
/effect @e[type=armor_stand,name=gun_1] invisibility 1 1 true
/playanimation @e[type=armor_stand,name=gun_1] animation.creeper.swelling a 10
/execute as @e[type=armor_stand,name=gun_1] at @s unless entity @p[r=3,hasitem={item=wooden_hoe,location=slot.weapon.mainhand},scores={gun_1_bullet=1..}] run kill @s
おぉ右クリック銃!コマンド数は多いけどすごく本格的でいいですね!それでリクエストなんですけとクールタイムがあるスキルコマンド的なものをできれば作って欲しいです!
(例え)
雪玉を投げると近くの敵が凍るや鈍足になるなど
ありがとうございます
右クリックウオーデンビーム作って下さい
右クリック検知の仕方を解説してほしいです。
アーマースタンドしきのやつ
時間があれば、火炎放射器つけれますか
玉の補充はできるのですが銃が打てないです。
どうすればいいでしょうか?
あと残弾数も表示されないです。(多い方でやりました)
じゃあ下のことを確認してください。(なんかAIみたいな口調になってしまった)
木のクワのデータ値は723ですか?
(/give @s wooden_hoe 1 723)
/titleraw は打ち間違えしやすいです。確認してください
@Nanisan-Command クワの値を723にしてgiveするのを忘れていました。
見落としていました。
ありがとうございます!!
@Nanisan-Command 耐久値を無限にすることってできますか?
@@hichimaikura できなくはないです
@Nanisan-Command できればやり方を教えてほしいです。
普通の右クリック検知とかできないですかね…?
防具立てを使わないと言うことであるのなら、仕組み的に無理ですね。