← オンライン教材一覧に戻る

Minecraftで音の出る斧を作ろう!

Minecraftで音の出る斧を作ろう! Minecraftで実況者がやっているゲームに出て来る、倒したら斧が壊れ、音の出る斧の作り方を説明しますこれはJava 1.19.2で作成しました。 ステップ① 一撃斧を作ろう! コマンドブロックをインパルスに設定し、以下のコマンドを入力します。そして実行します /give @p minecraft:stone_axe{display:{Name:"\"一撃斧\""},Damage:181,AttributeModifiers:[{AttributeName:"generic.attack_damage",Amount:100000000,Operation:0,Slot:"mainhand",UUID:[I;-930985716,-912426781,-192241814,92077947]},{AttributeName:"generic.attack_speed",Amount:100000000,Operation:0,Slot:"mainhand",UUID:[I;-884642523,-664884890,853963324,291011902]}]} ステップ② スコアボードを作成しよう! コマンドブロックをインパルスに設定し、以下のコマンドを入力します。そして実行します scoreboard objectives add hakai_ono minecraft.broken:minecraft.stone_axe コマンドブロックをインパルスに設定し、以下のコマンドを入力します。そして実行します scoreboard objectives add kill_ono playerKillCount ステップ③ 音を出そう! コマンドブロックをリピート,常時実行に設定し、以下のコマンドを入力します。 scoreboard players set @a[scores={hakai_ono=1..}] hakai_ono 0 コマンドブロックをリピート,常時実行に設定し、以下のコマンドを入力します。 scoreboard players set @a[scores={kill_ono=1..}] kill_ono 0 コマンドブロックをリピート,常時実行に設定し、以下のコマンドを入力します。 execute at @a[scores={kill_ono=1}] at @a[scores={hakai_ono=1}] run playsound minecraft:item.totem.use master @a ~ ~ ~ 5 0.5 以上で完成です!