Skip to content

Call本体機能の追加 #794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 29 commits into
base: releases/1-21-1
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3a20398
GH-790 Add call/execute
NePonpon Apr 22, 2025
b159474
GH-790 Add call/condition/logic
NePonpon Apr 22, 2025
408869b
GH-790 Add call/settings
NePonpon Apr 23, 2025
a05db9f
GH-790 Add call/condition/condition
NePonpon Apr 23, 2025
d4bdac0
GH-790 Add call/call
NePonpon Apr 23, 2025
38ad43e
Merge branch 'releases/1-21-1' into feature/ai-call
NePonpon Apr 25, 2025
1797122
GH-790 Add call/skill
NePonpon Apr 25, 2025
3010909
NO-ISSUE Refactor ファイルヘッダにパスを追加
NePonpon Apr 27, 2025
606c781
GH-790 Modify CallSkill実行パスを変更
NePonpon Apr 28, 2025
d7003a1
GH-790 Add CallSkillの演出
NePonpon Apr 30, 2025
213770d
GH-790 Modify CallSkill演出パスを変更
NePonpon Apr 30, 2025
fdc4c1a
GH-790 Modify 幻影 対象ダメージタイプを変更
NePonpon Apr 30, 2025
bfd2b8a
GH-790 Remove ChangeMove
NePonpon Apr 30, 2025
2f58334
GH-790 Add 共通Range処理
NePonpon Apr 30, 2025
c4eaf6f
NO-ISSUE Fix 理外防御力のファイル名を修正
NePonpon Apr 30, 2025
e6614d5
GH-790 Add ChangeStatus 理外属性
NePonpon Apr 30, 2025
c5f9b68
GH-790 Fix ChangeStatus レベル変更時名前修正を修正
NePonpon Apr 30, 2025
856e194
GH-790 Modify function呼び出しパスを変更
NePonpon Apr 30, 2025
65bf487
GH-790 Fix icicle_magic コンポーネント化やAECのParticle
NePonpon Apr 30, 2025
3054001
GH-790 Fix icicle_magic アイテムcountの値修正
NePonpon Apr 30, 2025
a7278d4
GH-790 Fix Spawn アイテムのコンポーネント化
NePonpon Apr 30, 2025
90ecf69
GH-790 Modify Step powerのNBTタグを変更 -> acceleration_power
NePonpon Apr 30, 2025
f0de731
GH-790 Modify ChangeAI CallPassengerのための前処理を追加
NePonpon Apr 30, 2025
66293af
GH-790 Modify ChangeAI CallPassengerのための前処理を変更
NePonpon May 1, 2025
2604950
GH-790 Remove ChangeMove 実行パス
NePonpon May 1, 2025
da5cfec
GH-790 Modify ChangeTurnが実行されたときにTurn.Exit処理が実行される
NePonpon May 4, 2025
1b8d1fc
GH-790 Fix DelayAction ryomenのdust演出
NePonpon May 4, 2025
d031110
Merge branch 'releases/1-21-1' into feature/ai-call
waxsd100 May 4, 2025
9c5c255
NO-ISSUE Version up datapack-linter v2.0.9 -> v2.0.10
waxsd100 May 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions data/ai/function/call/call.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#> ai:call/call
execute if data storage mob_data: Call{Name:"Kill"} run tag @s add Garbage
execute if data storage mob_data: Call{Name:"Spawn"} run function skill:enemy/spawn/
execute if data storage mob_data: Call{Name:"Step"} run function skill:enemy/step/
execute if data storage mob_data: Call{Name:"ChangeTurn"} run function skill:enemy/change_turn/
execute if data storage mob_data: Call{Name:"ChangeMove"} run function skill:enemy/change_move/
execute if data storage mob_data: Call{Name:"ChangeAI"} run function skill:enemy/change_ai
execute if data storage mob_data: Call{Name:"ChangeStatus"} run function skill:enemy/change_status/
execute if data storage mob_data: Call{Name:"MergeNBT"} run function skill:enemy/merge_nbt
execute if data storage mob_data: Call{Name:"Teleport"} unless entity @s[tag=TargetChanged,tag=Unmoved] run function skill:enemy/teleport/
execute if data storage mob_data: Call{Name:"Message"} run function skill:enemy/message
execute if data storage mob_data: Call{Name:"Function"} run function skill:enemy/function/
execute if data storage mob_data: Call{Name:"DelayAction"} run function skill:enemy/delay_action/append/
execute if data storage mob_data: Call{Name:"Damage"} run function skill:enemy/damage/
execute if data storage mob_data: Call{Name:"Blink"} run function skill:enemy/blink/cast/
execute if data storage mob_data: Call{Name:"Laser"} run function skill:enemy/laser/main/init
execute if data storage mob_data: Call{Name:"Rotate"} run function skill:enemy/rotate
execute if data storage mob_data: Call{Name:"Heal"} run function skill:enemy/heal/
execute if data storage mob_data: Call{Name:"SmartMotion"} unless entity @s[tag=TargetChanged,tag=Unmoved] run function skill:enemy/smart_motion/
execute if data storage mob_data: Call{Name:"Reraise"} run function skill:enemy/reraise/
execute if data storage mob_data: Call{Name:"Parabolic"} run function skill:enemy/parabolic_motion/
13 changes: 13 additions & 0 deletions data/ai/function/call/condition/condition/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> ai:call/condition/condition/
#条件フラグ
execute if data storage mob_data: Condition{Name:"HasTarget"} run function ai:call/condition/condition/target/
execute if data storage mob_data: Condition{Name:"RandomChance"} run function ai:call/condition/condition/random_chance
execute if data storage mob_data: Condition{Name:"MP"} run function ai:call/condition/condition/mp
execute if data storage mob_data: Condition{Name:"HP"} run function ai:call/condition/condition/hp
execute if data storage mob_data: Condition{Name:"MinMP"} run function ai:call/condition/condition/min_mp
execute if data storage mob_data: Condition{Name:"MinHP"} run function ai:call/condition/condition/min_hp
execute if data storage mob_data: Condition{Name:"MinLv"} run function ai:call/condition/condition/min_lv
execute if data storage mob_data: Condition{Name:"CheckNBT"} run function ai:call/condition/condition/check_nbt
execute if data storage mob_data: Condition{Name:"CheckBlock"} run function ai:call/condition/condition/check_block
execute if data storage mob_data: Condition{Name:"Function"} run function ai:call/condition/condition/function
execute if data storage mob_data: Condition{Name:"Pass"} store result score _ Calc run data get storage mob_data: Condition.Pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#> ai:call/condition/condition/check_block
#ブロックのリストに該当すれば成功
execute if data storage mob_data: Condition{Block:[Water]} if block ~ ~ ~ water run scoreboard players set _ Calc 1
execute if data storage mob_data: Condition{Block:[Lava]} if block ~ ~ ~ lava run scoreboard players set _ Calc 1
execute if data storage mob_data: Condition{Block:[Air]} if block ~ ~ ~ #block:no_collision run scoreboard players set _ Calc 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#> ai:call/condition/condition/check_nbt
#同じNBTがある=マージ失敗すれば成功
data modify storage mob_data: NBT set from entity @s {}
execute store success score _ _ run data modify storage mob_data: NBT merge from storage mob_data: Condition.NBT
execute if score _ _ matches 0 run scoreboard players set _ Calc 1
data remove storage mob_data: NBT
10 changes: 10 additions & 0 deletions data/ai/function/call/condition/condition/function.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> ai:call/condition/condition/function
#functionのstore successを取得
#Tagsをストレージに退避
#呼び出すfunction内ではmob_data: Tagsを参照すること
data modify storage mob_data: Tags set from entity @s Tags
data modify entity @s Tags set from storage mob_data: Condition.Tags
#function呼び出し
execute store success score _ Calc run function settings:enemy/
#Tagsを復元
data modify entity @s Tags set from storage mob_data: Tags
12 changes: 12 additions & 0 deletions data/ai/function/call/condition/condition/hp.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#> ai:call/condition/condition/hp
#HPがあれば消費して成功
execute store result score _ HP run data get storage mob_data: Condition.HP
#割合消費のとき
scoreboard players set _ _ 100
execute if data storage mob_data: Condition{Percent:1b} run scoreboard players operation _ HP *= @s HPMax
execute if data storage mob_data: Condition{Percent:1b} run scoreboard players operation _ HP /= _ _

execute if score @s HP >= _ HP store success score _ Calc run scoreboard players operation @s HP -= _ HP
scoreboard players operation @s HP < @s HPMax
#共通 - ライフスカウター
execute if score @s HP >= _ HP if entity @s[tag=LifeScouter] run function skill:act/common/life_scouter/bar_set
9 changes: 9 additions & 0 deletions data/ai/function/call/condition/condition/min_hp.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> ai:call/condition/condition/min_hp
#モブが最低HP以上あれば成功
execute store result score _ HP run data get storage mob_data: Condition.HP
#割合消費のとき
scoreboard players set _ _ 100
execute if data storage mob_data: Condition{Percent:1b} run scoreboard players operation _ HP *= @s HPMax
execute if data storage mob_data: Condition{Percent:1b} run scoreboard players operation _ HP /= _ _

execute store success score _ Calc if score @s HP >= _ HP
4 changes: 4 additions & 0 deletions data/ai/function/call/condition/condition/min_lv.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#> ai:call/condition/condition/min_lv
#モブが最低Level以上あれば成功
execute store result score _ Level run data get storage mob_data: Condition.Level
execute store success score _ Calc if score @s Level >= _ Level
9 changes: 9 additions & 0 deletions data/ai/function/call/condition/condition/min_mp.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#> ai:call/condition/condition/min_mp
#モブが最低MP以上あれば成功
execute store result score _ MP run data get storage mob_data: Condition.MP
#割合消費のとき
scoreboard players set _ _ 100
execute if data storage mob_data: Condition{Percent:1b} run scoreboard players operation _ MP *= @s MPMax
execute if data storage mob_data: Condition{Percent:1b} run scoreboard players operation _ MP /= _ _

execute store success score _ Calc if score @s MP >= _ MP
10 changes: 10 additions & 0 deletions data/ai/function/call/condition/condition/mp.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> ai:call/condition/condition/mp
#MPがあれば消費して成功
execute store result score _ MP run data get storage mob_data: Condition.MP
#割合消費のとき
scoreboard players set _ _ 100
execute if data storage mob_data: Condition{Percent:1b} run scoreboard players operation _ MP *= @s MPMax
execute if data storage mob_data: Condition{Percent:1b} run scoreboard players operation _ MP /= _ _

execute if score @s MP >= _ MP store success score _ Calc run scoreboard players operation @s MP -= _ MP
scoreboard players operation @s MP < @s MPMax
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> ai:call/condition/condition/random_chance
#RandomChanceの確率で成功
execute store result score @s _ run function calc:random
scoreboard players set _ _ 100
scoreboard players operation @s _ %= _ _
execute store result score _ _ run data get storage mob_data: Condition.Chance 100
execute if score _ _ > @s _ run scoreboard players set _ Calc 1
13 changes: 13 additions & 0 deletions data/ai/function/call/condition/condition/target/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> ai:call/condition/condition/target/
#Targetの有無を確認
data modify storage mob_data: Target set from storage mob_data: Condition.Target
execute unless data storage mob_data: Condition{Position:"Entity"} run function calc:geometry/tp_00001
execute if data storage mob_data: Condition{Position:"Entity"} run tp 0-0-0-0-1 @s
#自身が対象にならないようにタグ付与
tag @s add NonTarget
execute at @s as 0-0-0-0-1 run function ai:call/settings/target/fork
tag @s remove NonTarget
scoreboard players set _ Calc 0
execute if score 00000000-0000-0000-0000-000000000001 _ matches 1 unless data storage mob_data: Condition.Half run scoreboard players set _ Calc 1
execute if score 00000000-0000-0000-0000-000000000001 _ matches 1 if data storage mob_data: Condition.Half facing entity 0-0-0-0-1 feet positioned ^ ^ ^0.003 rotated as @s run function ai:call/condition/condition/target/half
execute as 0-0-0-0-1 run function calc:geometry/return_marker
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#> ai:call/condition/condition/target/half
execute if data storage mob_data: Condition{Half:"up"} positioned ^ ^-0.004 ^ if entity @s[distance=..0.00479] run scoreboard players set _ Calc 1
execute if data storage mob_data: Condition{Half:"down"} positioned ^ ^0.004 ^ if entity @s[distance=..0.00479] run scoreboard players set _ Calc 1
execute if data storage mob_data: Condition{Half:"front"} positioned ^ ^ ^-0.004 if entity @s[distance=..0.005] run scoreboard players set _ Calc 1
execute if data storage mob_data: Condition{Half:"back"} positioned ^ ^ ^0.004 if entity @s[distance=..0.005] run scoreboard players set _ Calc 1
10 changes: 10 additions & 0 deletions data/ai/function/call/condition/logic/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#> ai:call/condition/logic/
# OR,AND未指定の場合ANDにする
execute unless data storage mob_data: Call.Condition[].Logic run data modify storage mob_data: Call.Condition[0].Logic set value "AND"

# OR,ANDに分岐
execute if data storage mob_data: Call.Condition[{Logic:"OR"}] run function ai:call/condition/logic/or
execute if data storage mob_data: Call.Condition[{Logic:"AND"}] run function ai:call/condition/logic/and

#スキルを実行するフラグが立っていればスキル実行
return run scoreboard players get _ Ret
13 changes: 13 additions & 0 deletions data/ai/function/call/condition/logic/and.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> ai:call/condition/logic/and
#AND条件

# Condition[0]を試す
function ai:call/condition/logic/single

# 成功時次のConditionを試す。
execute if score _ Calc matches 1 if data storage mob_data: Call.Condition[0] run function ai:call/condition/logic/and

#失敗時スキルを実行するフラグを落とす
execute unless score _ Calc matches 1 run scoreboard players set _ Ret 0
#全て成功時スキルを実行するフラグを立てる
execute if score _ Calc matches 1 unless data storage mob_data: Call.Condition[0] run scoreboard players set _ Ret 1
13 changes: 13 additions & 0 deletions data/ai/function/call/condition/logic/or.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#> ai:call/condition/logic/or
#OR条件

# Condition[0]を試す
function ai:call/condition/logic/single

#失敗時次のConditionを試す。
execute unless score _ Calc matches 1 if data storage mob_data: Call.Condition[0] run function ai:call/condition/logic/or

#全て失敗時スキルを実行するフラグを落とす
execute unless score _ Calc matches 1 unless data storage mob_data: Call.Condition[0] run scoreboard players set _ Ret 0
#成功時スキルを実行するフラグを立てる
execute if score _ Calc matches 1 run scoreboard players set _ Ret 1
17 changes: 17 additions & 0 deletions data/ai/function/call/condition/logic/single.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#> ai:call/condition/logic/single
#条件フラグをリセット
scoreboard players set _ Calc 0

data modify storage mob_data: Condition set from storage mob_data: Call.Condition[0]
data remove storage mob_data: Call.Condition[0]

#条件フラグ
function ai:call/condition/condition/

#Notフラグ
execute store success score _ _ if data storage mob_data: Condition{Inverse:1b}
scoreboard players operation _ Calc += _ _

# グローバルコンディション
execute if data storage mob_data: Condition{Global:1b} if score _ Calc matches 1 run data modify storage mob_data: CallList[].Condition append value {Name:"Pass",Pass:1b}
execute if data storage mob_data: Condition{Global:1b} if score _ Calc matches 0 run data modify storage mob_data: CallList[].Condition append value {Name:"Pass",Pass:0b}
4 changes: 4 additions & 0 deletions data/ai/function/call/execute/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#> ai:call/execute/
#先頭にGlobal Settingsあれば適用
execute unless data storage mob_data: CallList[0].Settings[{Global:1b}] run function ai:call/execute/fork
execute if data storage mob_data: CallList[0].Settings[{Global:1b}] run function ai:call/execute/apply_global_settings
7 changes: 7 additions & 0 deletions data/ai/function/call/execute/all.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> ai:call/execute/all
#順番にすべて実行
data modify storage mob_data: Call set from storage mob_data: CallList[0]
function ai:call/execute/call

data remove storage mob_data: CallList[0]
execute if data storage mob_data: CallList[0] run function ai:call/execute/all
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#> ai:call/execute/apply_global_condition
#Execute If|Random時
#先頭にGlobalコンディションがあれば適用
data modify storage mob_data: Call set from storage mob_data: CallList[0]
function ai:call/condition/logic/
data remove storage mob_data: CallList[0].Condition[{Global:1b}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#> ai:call/execute/apply_global_settings
#先頭にGlobal Settingsあれば適用
data modify storage mob_data: Call set from storage mob_data: CallList[0]
data remove storage mob_data: CallList[0].Settings
function ai:call/settings/init
5 changes: 5 additions & 0 deletions data/ai/function/call/execute/call.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#> ai:call/execute/apply_global_settings
data modify storage mob_data: Success set value 1b
execute if data storage mob_data: Call.Condition store result storage mob_data: Success byte 1 run function ai:call/condition/logic/
execute if data storage mob_data: {Success:1b} if data storage mob_data: Call.Settings run function ai:call/settings/init
execute if data storage mob_data: {Success:1b} unless data storage mob_data: Call.Settings run function ai:call/call
5 changes: 5 additions & 0 deletions data/ai/function/call/execute/fork.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#> ai:call/execute/fork
execute unless data storage mob_data: CallList[0].Execute if data storage mob_data: CallList[].Name run function ai:call/execute/all
execute if data storage mob_data: CallList[0].Execute if data storage mob_data: CallList[0].Condition[{Global:1b}] run function ai:call/execute/apply_global_condition
execute if data storage mob_data: CallList[{Execute:"Random"}] run function ai:call/execute/random
execute if data storage mob_data: CallList[{Execute:"If"}] run function ai:call/execute/if
7 changes: 7 additions & 0 deletions data/ai/function/call/execute/if.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#> ai:call/execute/if
#条件を満たすまで順番に確認
data modify storage mob_data: Call set from storage mob_data: CallList[0]
function ai:call/execute/call

data remove storage mob_data: CallList[0]
execute if data storage mob_data: CallList[0] if data storage mob_data: {Success:0b} run function ai:call/execute/if
18 changes: 18 additions & 0 deletions data/ai/function/call/execute/random.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#> ai:call/execute/random
#SkillListからランダムで1つ選ぶ 10個まで
execute store result score _ Calc run function calc:random
execute store result score _ _ if data storage mob_data: CallList[]
scoreboard players operation _ Calc %= _ _

execute if score _ Calc matches 0 run data modify storage mob_data: Call set from storage mob_data: CallList[0]
execute if score _ Calc matches 1 run data modify storage mob_data: Call set from storage mob_data: CallList[1]
execute if score _ Calc matches 2 run data modify storage mob_data: Call set from storage mob_data: CallList[2]
execute if score _ Calc matches 3 run data modify storage mob_data: Call set from storage mob_data: CallList[3]
execute if score _ Calc matches 4 run data modify storage mob_data: Call set from storage mob_data: CallList[4]
execute if score _ Calc matches 5 run data modify storage mob_data: Call set from storage mob_data: CallList[5]
execute if score _ Calc matches 6 run data modify storage mob_data: Call set from storage mob_data: CallList[6]
execute if score _ Calc matches 7 run data modify storage mob_data: Call set from storage mob_data: CallList[7]
execute if score _ Calc matches 8 run data modify storage mob_data: Call set from storage mob_data: CallList[8]
execute if score _ Calc matches 9 run data modify storage mob_data: Call set from storage mob_data: CallList[9]

function ai:call/execute/call
28 changes: 28 additions & 0 deletions data/ai/function/call/settings/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#> ai:call/settings/
#{Name:"As",Target:{}}
#{Name:"At",Target:{}}
#{Name:"Direction",Target:{},Direction:[0f,0f],DirectionRange:[0f,0f],Speed:1d,SpeedRange:1d}
#{Name:"Rotation",Target:{},Flip:1b,Direction:[0f,0f],DirectionRange:[0f,0f],Absolute:{Horizontal:1b,Vertical:1b}}
#{Name:"Facing",Target:{}}
#{Name:"Anchor",Anchor:"Eyes|Feet"}

#Target:{Look:"self|player|enemy|all",Radius:10,IgnoreBlocks:1b}

data modify storage mob_data: Settings set from storage mob_data: SettingsList[0]
data remove storage mob_data: SettingsList[0]

execute unless data storage mob_data: Settings.Name unless data storage mob_data: Settings{Global:1b} if score 00000000-0000-0000-0000-000000000002 _ matches 1 at 0-0-0-0-1 run function ai:call/call
execute unless data storage mob_data: Settings.Name if data storage mob_data: Settings{Global:1b} if score 00000000-0000-0000-0000-000000000002 _ matches 1 at 0-0-0-0-1 run function ai:call/execute/fork

#Target有無フラグ:Target NBTあるが見つからなかったとき0で失敗
scoreboard players set 00000000-0000-0000-0000-000000000002 _ 1

execute if data storage mob_data: Settings{Name:"At"} run function ai:call/settings/at
execute if data storage mob_data: Settings{Name:"Direction"} run function ai:call/settings/direction
execute if data storage mob_data: Settings{Name:"Rotation"} run function ai:call/settings/rotation
execute if data storage mob_data: Settings{Name:"Facing"} run function ai:call/settings/facing
execute if data storage mob_data: Settings{Name:"Anchor"} run function ai:call/settings/anchor
execute if data storage mob_data: Settings{Name:"As"} run function ai:call/settings/as
execute if data storage mob_data: Settings{Name:"Align"} run function ai:call/settings/align/

execute if data storage mob_data: Settings.Name if score 00000000-0000-0000-0000-000000000002 _ matches 1 at 0-0-0-0-1 run function ai:call/settings/
4 changes: 4 additions & 0 deletions data/ai/function/call/settings/align/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#> ai:call/settings/align/
execute if data storage mob_data: Settings{Vector:[X]} run function ai:call/settings/align/x/
execute if data storage mob_data: Settings{Vector:[Y]} run function ai:call/settings/align/y/
execute if data storage mob_data: Settings{Vector:[Z]} run function ai:call/settings/align/z/
3 changes: 3 additions & 0 deletions data/ai/function/call/settings/align/x/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#> ai:call/settings/align/x/
execute unless data storage mob_data: Settings{Center:[X]} at 0-0-0-0-1 align x run tp 0-0-0-0-1 ~ ~ ~
execute if data storage mob_data: Settings{Center:[X]} at 0-0-0-0-1 align x run tp 0-0-0-0-1 ~0.5 ~ ~
3 changes: 3 additions & 0 deletions data/ai/function/call/settings/align/y/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#> ai:call/settings/align/y/
execute unless data storage mob_data: Settings{Center:[Y]} at 0-0-0-0-1 align y run tp 0-0-0-0-1 ~ ~ ~
execute if data storage mob_data: Settings{Center:[Y]} at 0-0-0-0-1 align y run tp 0-0-0-0-1 ~ ~0.5 ~
3 changes: 3 additions & 0 deletions data/ai/function/call/settings/align/z/.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#> ai:call/settings/align/z/
execute unless data storage mob_data: Settings{Center:[Z]} at 0-0-0-0-1 align z run tp 0-0-0-0-1 ~ ~ ~
execute if data storage mob_data: Settings{Center:[Z]} at 0-0-0-0-1 align z run tp 0-0-0-0-1 ~ ~ ~0.5
3 changes: 3 additions & 0 deletions data/ai/function/call/settings/anchor.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#> ai:call/settings/anchor
execute if data storage mob_data: Settings{Anchor:"Eyes"} anchored eyes run tp 0-0-0-0-1 ^ ^ ^ ~ ~
execute if data storage mob_data: Settings{Anchor:"Feet"} anchored feet run tp 0-0-0-0-1 ^ ^ ^ ~ ~
5 changes: 5 additions & 0 deletions data/ai/function/call/settings/as.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#> ai:call/settings/as
execute if data storage mob_data: Settings.Target run function ai:call/settings/target/
execute if score 00000000-0000-0000-0000-000000000002 _ matches 1 positioned as 0-0-0-0-2 as @e[predicate=entity:all_mob,tag=Unmoved,distance=..0.01,limit=1,sort=nearest] run tag @s add TargetChanged
execute if score 00000000-0000-0000-0000-000000000002 _ matches 1 positioned as 0-0-0-0-2 as @e[predicate=entity:all_mob,distance=..0.01,limit=1,sort=nearest] positioned as 0-0-0-0-1 run function ai:call/settings/
execute if score 00000000-0000-0000-0000-000000000002 _ matches 1 positioned as 0-0-0-0-2 as @e[predicate=entity:all_mob,tag=Unmoved,distance=..0.01,limit=1,sort=nearest] run tag @s remove TargetChanged
3 changes: 3 additions & 0 deletions data/ai/function/call/settings/at.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#> ai:call/settings/at
execute if data storage mob_data: Settings.Target run function ai:call/settings/target/
execute if data storage mob_data: Settings.Target if score 00000000-0000-0000-0000-000000000002 _ matches 1 at 0-0-0-0-2 run tp 0-0-0-0-1 ^ ^ ^ ~ ~
Loading
Loading