-
Notifications
You must be signed in to change notification settings - Fork 3
event: projectileHit
Nano191225 edited this page Dec 14, 2025
·
4 revisions
プレイヤーが投げた投げ物(矢・トラインデント・ポーションなど)が着弾したときにトリガーされます。
- Capi:hit
このイベントがトリガーされたときプレイヤーに追加されます。
- hitWith
使用した投げ物のIDが含まれた状態でプレイヤーに追加されます。
例:
hitWith:minecraft:arrow
hitWith:minecraft:splash_potion
- hitTo
投げ物があたったエンティティまたはブロックのIDが含まれた状態でプレイヤーに追加されます。
例:
hitTo:minecraft:grass
hitTo:minecraft:pig
- Capi:hitX
投げ物が当たったX座標が代入されます。
- Capi:hitY
投げ物が当たったY座標が代入されます。
- Capi:hitZ
投げ物が当たったZ座標が代入されます。
/tag @a[tag=Capi:hit,tag=hitWith:minecraft:arrow] add "run:['summon lightning_bolt {score:Capi:hitX} {score:Capi:hitY} {score:Capi:hitZ}']"
/tag @a remove Capi:hit