Рет қаралды 1,180
[command]
지팡이 얻기)
/give @p stick{display:{Name:'{"text":"마법의 지팡이","color":"yellow","bold":"true","italic":"false"}'}}
1) - 반복형커맨드
execute as @a[nbt={Inventory:[{id:"minecraft:stick",Slot:-106b,tag:{display:{Name:'{"text":"마법의 지팡이","color":"yellow","bold":"true","italic":"false"}'}}}]}] at @s run summon minecraft:armor_stand ~ ~ ~ {Invisible:1b,Tags:["lightning"],ArmorItems:[{},{},{},{id:"minecraft:gold_block",Count:1b}],NoGravity:1b,Small:1b}
2) - 연쇄형커맨드
execute as @a[nbt={Inventory:[{id:"minecraft:stick",Slot:-106b,tag:{display:{Name:'{"text":"마법의 지팡이","color":"yellow","bold":"true","italic":"false"}'}}}]}] at @s run tp @e[tag=lightning,distance=0..1] ^ ^ ^-0.5 facing entity @a[distance=0..1,limit=1,sort=random]
3) - 연쇄형커맨드
item replace entity @a[nbt={Inventory:[{id:"minecraft:stick",Slot:-106b,tag:{display:{Name:'{"text":"마법의 지팡이","color":"yellow","bold":"true","italic":"false"}'}}}]}] weapon.mainhand with stick{display:{Name:'{"text":"마법의 지팡이","color":"yellow","bold":"true","italic":"false"}'}}
4) - 연쇄형커맨드
item replace entity @a[nbt={Inventory:[{id:"minecraft:stick",Slot:-106b,tag:{display:{Name:'{"text":"마법의 지팡이","color":"yellow","bold":"true","italic":"false"}'}}}]}] weapon.offhand with air
5) - 연쇄형커맨드
execute as @e[tag=lightning] at @s run tp @s ^ ^ ^0.6
6) - 연쇄형커맨드
execute as @e[tag=lightning] at @s unless block ~ ~ ~ air run summon minecraft:lightning_bolt
7) - 연쇄형커맨드
execute as @e[tag=lightning] at @s unless block ~ ~ ~ air run kill @s