点と直方体の判定(旧dxdydz再現)

投稿者:ヘイホーの叫び
投稿日:2024/7/26
ジャンル:技術・機構
環境:通常
情報番号:12

構文
判定する点: <subject>
直方体の基準点(最小座標): <object>

/execute
as <subject>
at @s
facing entity <object> feet
positioned ^ ^ ^3
positioned ~-4 ~ ~
unless entity @s[r=5]
positioned ~4 ~-4 ~
unless entity @s[r=5]
positioned ~ ~4 ~-4
unless entity @s[r=5]
positioned as @s
positioned ~-dx ~-dy ~-dz
facing entity <object> feet
positioned as @s
positioned ^ ^ ^3
positioned ~-4 ~ ~
if entity @s[r=5]
positioned ~4 ~-4 ~
if entity @s[r=5]
positioned ~ ~4 ~-4
if entity @s[r=5]
run
<command>

説明
旧dxdydzのように、ある点がある直方体の範囲内に含まれるか否かの判定を行います。
今回は、判定する点と直方体の基準点(最小座標)をエンティティとします。
最終更新:2024年12月25日 14:52
|新しいページ |検索 |ページ一覧 |RSS |@ウィキご利用ガイド |管理者にお問合せ
|ログイン|