コマンドシェア

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

← みんなの投稿へ戻る

磁力のロードストーン

統合版 26.3

【磁力アイテム】ロードストーンを手に持っている間、周りのアイテムと経験値オーブを自分の方へ吸い寄せる磁石。 ・吸引範囲:半径12ブロック(少しずつ引き寄せるので、飛んでくる様子が見える) ・磁力バリア:半径4ブロック以内に飛んできた矢を押し返す ・持っている間は採掘速度上昇 ・アクションバーに「磁力発動中」と表示 ・死んでもなくならない(keep_on_death) ※ 持っている間は捨てたアイテムも戻ってきます。普通のロードストーンを持っても発動します。 使い方:①インパルスでアイテム入手 ②リピート+チェーンを順につなげて常時実行

1 インパルス 無条件 動力が必要
give @p lodestone 1 0 {"minecraft:keep_on_death":{}}
2 リピート 無条件 常にアクティブ
execute as @a[hasitem={item=lodestone,location=slot.weapon.mainhand}] at @s as @e[type=item,r=12,rm=1] at @s facing entity @p feet run tp @s ^ ^ ^0.6
3 チェーン 無条件 常にアクティブ
execute as @a[hasitem={item=lodestone,location=slot.weapon.mainhand}] at @s as @e[type=xp_orb,r=12,rm=1] at @s facing entity @p feet run tp @s ^ ^ ^0.6
4 チェーン 無条件 常にアクティブ
execute as @a[hasitem={item=lodestone,location=slot.weapon.mainhand}] at @s as @e[type=item,r=12,rm=1] at @s run particle minecraft:endrod ~ ~0.3 ~
5 チェーン 無条件 常にアクティブ
execute as @a[hasitem={item=lodestone,location=slot.weapon.mainhand}] at @s as @e[type=arrow,r=4] at @s facing entity @p feet run tp @s ^ ^ ^-1.5
6 チェーン 無条件 常にアクティブ
execute as @a[hasitem={item=lodestone,location=slot.weapon.mainhand}] at @s run particle minecraft:blue_flame_particle ~ ~1 ~
7 チェーン 無条件 常にアクティブ
effect @a[hasitem={item=lodestone,location=slot.weapon.mainhand}] haste 1 0 true
8 チェーン 無条件 常にアクティブ
titleraw @a[hasitem={item=lodestone,location=slot.weapon.mainhand}] actionbar {"rawtext":[{"text":"§b§l磁力発動中"}]}