コマンドシェア

<コマンドシェア> コマンドブロックで作ったアイテム、みんなに見せよう

← みんなの投稿へ戻る

大地の召喚石

Java版 1.21

【召喚魔法】使用すると、地面から石のゴーレムが出現してプレイヤーを守る。 ・召喚時間:30秒 ・攻撃対象:プレイヤーを攻撃する敵(モンスター) ・召喚数:1体 ※ アイアンゴーレムの性質上、クリーパーは攻撃しません。 使い方:①最初のインパルス(scoreboard)を1回ずつ実行 ②giveでアイテム入手 ③リピート+チェーンを順につなげて常時実行

1 インパルス 無条件 動力が必要
scoreboard objectives add st_use minecraft.used:minecraft.carrot_on_a_stick
2 インパルス 無条件 動力が必要
scoreboard objectives add st_t dummy
3 インパルス 無条件 動力が必要
give @p carrot_on_a_stick[item_model="minecraft:mossy_cobblestone",custom_name={text:"大地の召喚石",color:"green",italic:false},lore=[{text:"召喚魔法",color:"dark_green",italic:false},{text:"守護ゴーレムを30秒間召喚する",color:"gray",italic:false}],custom_data={st:1b},use_cooldown={seconds:30f,cooldown_group:"cmd:st"},enchantment_glint_override=true]
4 リピート 無条件 常にアクティブ
execute as @a[scores={st_use=1..}] if items entity @s weapon.mainhand *[custom_data~{st:1b}] at @s rotated ~ 0 positioned ^ ^ ^2 run particle minecraft:block{block_state:{Name:"minecraft:stone"}} ~ ~ ~ 1 0.5 1 0 80
5 チェーン 無条件 常にアクティブ
execute as @a[scores={st_use=1..}] if items entity @s weapon.mainhand *[custom_data~{st:1b}] at @s run playsound minecraft:entity.iron_golem.repair master @a ~ ~ ~ 1 0.6
6 チェーン 無条件 常にアクティブ
execute as @a[scores={st_use=1..}] if items entity @s weapon.mainhand *[custom_data~{st:1b}] at @s unless entity @e[type=iron_golem,tag=st_golem] rotated ~ 0 positioned ^ ^ ^2 run summon iron_golem ~ ~ ~ {Tags:["st_golem"],PlayerCreated:1b,CustomName:{text:"大地のゴーレム",color:"gold"},DeathLootTable:"minecraft:empty"}
7 チェーン 無条件 常にアクティブ
scoreboard players reset @a st_use
8 チェーン 無条件 常にアクティブ
scoreboard players add @e[type=iron_golem,tag=st_golem] st_t 1
9 チェーン 無条件 常にアクティブ
execute at @e[type=iron_golem,tag=st_golem,scores={st_t=600..}] run particle minecraft:block{block_state:{Name:"minecraft:stone"}} ~ ~1 ~ 0.5 1 0.5 0 100
10 チェーン 無条件 常にアクティブ
kill @e[type=iron_golem,tag=st_golem,scores={st_t=600..}]