diff --git a/1_20_3/data/macro/functions/core/lib/for_each_entity.mcfunction b/1_20_3/data/macro/functions/core/lib/for_each_entity.mcfunction index 87437bd8..21cf8a74 100644 --- a/1_20_3/data/macro/functions/core/lib/for_each_entity.mcfunction +++ b/1_20_3/data/macro/functions/core/lib/for_each_entity.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @e[type=$(type),tag=$(tag)] run function macro:core/dispatch/run +$execute as @e[type=$(type),tag=$(tag)] run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_entity ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/1_20_3/data/macro/functions/core/lib/for_each_player.mcfunction b/1_20_3/data/macro/functions/core/lib/for_each_player.mcfunction index 68051b30..cf89e428 100644 --- a/1_20_3/data/macro/functions/core/lib/for_each_player.mcfunction +++ b/1_20_3/data/macro/functions/core/lib/for_each_player.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -execute as @a run function macro:core/dispatch/run +execute as @a run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_player ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/1_20_3/data/macro/functions/core/lib/for_each_player_at.mcfunction b/1_20_3/data/macro/functions/core/lib/for_each_player_at.mcfunction index bb1530c3..5b868819 100644 --- a/1_20_3/data/macro/functions/core/lib/for_each_player_at.mcfunction +++ b/1_20_3/data/macro/functions/core/lib/for_each_player_at.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -execute as @a at @s run function macro:core/dispatch/run +execute as @a at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_player_at ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/1_20_3/data/macro/functions/core/lib/internal/queue_run_func_as.mcfunction b/1_20_3/data/macro/functions/core/lib/internal/queue_run_func_as.mcfunction index e1da2b83..c4d040b9 100644 --- a/1_20_3/data/macro/functions/core/lib/internal/queue_run_func_as.mcfunction +++ b/1_20_3/data/macro/functions/core/lib/internal/queue_run_func_as.mcfunction @@ -1,2 +1,2 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as $(player) at @s run function macro:core/dispatch/run +$execute as $(player) at @s run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/core/tick/dispatch/exec.mcfunction b/1_20_3/data/macro/functions/core/tick/dispatch/exec.mcfunction index aaf31bce..aaf617ad 100644 --- a/1_20_3/data/macro/functions/core/tick/dispatch/exec.mcfunction +++ b/1_20_3/data/macro/functions/core/tick/dispatch/exec.mcfunction @@ -6,4 +6,4 @@ # condition:"macro:is_daytime" → only run when predicate passes $data modify storage macro:engine _dispatch.func set value "$(fn)" -execute if data storage macro:tick_work channel{condition:""} run function macro:core/dispatch/run +execute if data storage macro:tick_work channel{condition:""} run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/core/tick/dispatch/exec2.mcfunction b/1_20_3/data/macro/functions/core/tick/dispatch/exec2.mcfunction index b76f18e4..05e141eb 100644 --- a/1_20_3/data/macro/functions/core/tick/dispatch/exec2.mcfunction +++ b/1_20_3/data/macro/functions/core/tick/dispatch/exec2.mcfunction @@ -8,4 +8,4 @@ execute if data storage macro:tick_work channel{condition:""} run return 0 $data modify storage macro:engine _dispatch.func set value "$(fn)" -$execute as @a[limit=1] at @s if predicate $(condition) run function macro:core/dispatch/run +$execute as @a[limit=1] at @s if predicate $(condition) run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/events/internal/fire_next.mcfunction b/1_20_3/data/macro/functions/events/internal/fire_next.mcfunction index 46fbb042..08111eec 100644 --- a/1_20_3/data/macro/functions/events/internal/fire_next.mcfunction +++ b/1_20_3/data/macro/functions/events/internal/fire_next.mcfunction @@ -1,3 +1,4 @@ -function macro:core/lib/internal/queue_run_func with storage macro:engine _event_tmp[0] +data modify storage macro:engine _dispatch.func set from storage macro:engine _event_tmp[0].func +function #macro:internal/dispatch data remove storage macro:engine _event_tmp[0] execute if data storage macro:engine _event_tmp[0] run function macro:events/internal/fire_next diff --git a/1_20_3/data/macro/functions/systems/geo/as_nearby_player.mcfunction b/1_20_3/data/macro/functions/systems/geo/as_nearby_player.mcfunction index 7ac628e7..1ae075cf 100644 --- a/1_20_3/data/macro/functions/systems/geo/as_nearby_player.mcfunction +++ b/1_20_3/data/macro/functions/systems/geo/as_nearby_player.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[distance=..$(distance),limit=1,sort=nearest] at @s run function macro:core/dispatch/run +$execute as @a[distance=..$(distance),limit=1,sort=nearest] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"geo/as_nearby_player ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/1_20_3/data/macro/functions/systems/logic/if_eq.mcfunction b/1_20_3/data/macro/functions/systems/logic/if_eq.mcfunction index b53c0471..042e1e91 100644 --- a/1_20_3/data/macro/functions/systems/logic/if_eq.mcfunction +++ b/1_20_3/data/macro/functions/systems/logic/if_eq.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp = $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp = $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/systems/logic/if_gt.mcfunction b/1_20_3/data/macro/functions/systems/logic/if_gt.mcfunction index 761bdf2c..e6a5f7ce 100644 --- a/1_20_3/data/macro/functions/systems/logic/if_gt.mcfunction +++ b/1_20_3/data/macro/functions/systems/logic/if_gt.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp > $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp > $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/systems/logic/if_gte.mcfunction b/1_20_3/data/macro/functions/systems/logic/if_gte.mcfunction index f7e0a1d0..f4f9e9a6 100644 --- a/1_20_3/data/macro/functions/systems/logic/if_gte.mcfunction +++ b/1_20_3/data/macro/functions/systems/logic/if_gte.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp >= $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp >= $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/systems/logic/if_lt.mcfunction b/1_20_3/data/macro/functions/systems/logic/if_lt.mcfunction index e968cad6..8cc81048 100644 --- a/1_20_3/data/macro/functions/systems/logic/if_lt.mcfunction +++ b/1_20_3/data/macro/functions/systems/logic/if_lt.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp < $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp < $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/systems/logic/if_lte.mcfunction b/1_20_3/data/macro/functions/systems/logic/if_lte.mcfunction index f8f94d3f..0b25e4f5 100644 --- a/1_20_3/data/macro/functions/systems/logic/if_lte.mcfunction +++ b/1_20_3/data/macro/functions/systems/logic/if_lte.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp <= $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp <= $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/systems/logic/if_not_eq.mcfunction b/1_20_3/data/macro/functions/systems/logic/if_not_eq.mcfunction index fa5c7b17..e8edb3f7 100644 --- a/1_20_3/data/macro/functions/systems/logic/if_not_eq.mcfunction +++ b/1_20_3/data/macro/functions/systems/logic/if_not_eq.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute unless score $if_a macro.tmp = $if_b macro.tmp run function macro:core/dispatch/run +execute unless score $if_a macro.tmp = $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_3/data/macro/functions/world/entity/for_each.mcfunction b/1_20_3/data/macro/functions/world/entity/for_each.mcfunction index 57628fed..b9ecf184 100644 --- a/1_20_3/data/macro/functions/world/entity/for_each.mcfunction +++ b/1_20_3/data/macro/functions/world/entity/for_each.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @e[type=$(type),tag=$(tag)] at @s run function macro:core/dispatch/run +$execute as @e[type=$(type),tag=$(tag)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/for_each ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(type)","color":"aqua"}] diff --git a/1_20_3/data/macro/functions/world/entity/for_each_in_radius.mcfunction b/1_20_3/data/macro/functions/world/entity/for_each_in_radius.mcfunction index c330d0d3..f7c315d8 100644 --- a/1_20_3/data/macro/functions/world/entity/for_each_in_radius.mcfunction +++ b/1_20_3/data/macro/functions/world/entity/for_each_in_radius.mcfunction @@ -13,5 +13,5 @@ # ───────────────────────────────────────────────────────────────── $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),distance=..$(radius)] at @s run function macro:core/dispatch/run +$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),distance=..$(radius)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/for_each_in_radius ","color":"aqua"},{"text":"$(player) r=$(radius) → ","color":"gray"},{"text":"$(type)","color":"aqua"}] diff --git a/1_20_3/data/macro/functions/world/entity/nearest.mcfunction b/1_20_3/data/macro/functions/world/entity/nearest.mcfunction index 05f496fd..9636dc6e 100644 --- a/1_20_3/data/macro/functions/world/entity/nearest.mcfunction +++ b/1_20_3/data/macro/functions/world/entity/nearest.mcfunction @@ -11,5 +11,5 @@ # ───────────────────────────────────────────────────────────────── $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),sort=nearest,limit=1,distance=..$(radius)] at @s run function macro:core/dispatch/run +$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),sort=nearest,limit=1,distance=..$(radius)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/nearest ","color":"aqua"},{"text":"$(player) → ","color":"gray"},{"text":"$(type) r=$(radius)","color":"aqua"}] diff --git a/1_20_5/data/macro/functions/core/lib/for_each_entity.mcfunction b/1_20_5/data/macro/functions/core/lib/for_each_entity.mcfunction index 87437bd8..21cf8a74 100644 --- a/1_20_5/data/macro/functions/core/lib/for_each_entity.mcfunction +++ b/1_20_5/data/macro/functions/core/lib/for_each_entity.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @e[type=$(type),tag=$(tag)] run function macro:core/dispatch/run +$execute as @e[type=$(type),tag=$(tag)] run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_entity ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/1_20_5/data/macro/functions/core/lib/for_each_player.mcfunction b/1_20_5/data/macro/functions/core/lib/for_each_player.mcfunction index 68051b30..cf89e428 100644 --- a/1_20_5/data/macro/functions/core/lib/for_each_player.mcfunction +++ b/1_20_5/data/macro/functions/core/lib/for_each_player.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -execute as @a run function macro:core/dispatch/run +execute as @a run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_player ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/1_20_5/data/macro/functions/core/lib/for_each_player_at.mcfunction b/1_20_5/data/macro/functions/core/lib/for_each_player_at.mcfunction index bb1530c3..5b868819 100644 --- a/1_20_5/data/macro/functions/core/lib/for_each_player_at.mcfunction +++ b/1_20_5/data/macro/functions/core/lib/for_each_player_at.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -execute as @a at @s run function macro:core/dispatch/run +execute as @a at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_player_at ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/1_20_5/data/macro/functions/core/lib/internal/queue_run_func_as.mcfunction b/1_20_5/data/macro/functions/core/lib/internal/queue_run_func_as.mcfunction index e1da2b83..c4d040b9 100644 --- a/1_20_5/data/macro/functions/core/lib/internal/queue_run_func_as.mcfunction +++ b/1_20_5/data/macro/functions/core/lib/internal/queue_run_func_as.mcfunction @@ -1,2 +1,2 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as $(player) at @s run function macro:core/dispatch/run +$execute as $(player) at @s run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/core/tick/dispatch/exec.mcfunction b/1_20_5/data/macro/functions/core/tick/dispatch/exec.mcfunction index aaf31bce..aaf617ad 100644 --- a/1_20_5/data/macro/functions/core/tick/dispatch/exec.mcfunction +++ b/1_20_5/data/macro/functions/core/tick/dispatch/exec.mcfunction @@ -6,4 +6,4 @@ # condition:"macro:is_daytime" → only run when predicate passes $data modify storage macro:engine _dispatch.func set value "$(fn)" -execute if data storage macro:tick_work channel{condition:""} run function macro:core/dispatch/run +execute if data storage macro:tick_work channel{condition:""} run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/core/tick/dispatch/exec2.mcfunction b/1_20_5/data/macro/functions/core/tick/dispatch/exec2.mcfunction index b76f18e4..05e141eb 100644 --- a/1_20_5/data/macro/functions/core/tick/dispatch/exec2.mcfunction +++ b/1_20_5/data/macro/functions/core/tick/dispatch/exec2.mcfunction @@ -8,4 +8,4 @@ execute if data storage macro:tick_work channel{condition:""} run return 0 $data modify storage macro:engine _dispatch.func set value "$(fn)" -$execute as @a[limit=1] at @s if predicate $(condition) run function macro:core/dispatch/run +$execute as @a[limit=1] at @s if predicate $(condition) run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/events/internal/fire_next.mcfunction b/1_20_5/data/macro/functions/events/internal/fire_next.mcfunction index 46fbb042..08111eec 100644 --- a/1_20_5/data/macro/functions/events/internal/fire_next.mcfunction +++ b/1_20_5/data/macro/functions/events/internal/fire_next.mcfunction @@ -1,3 +1,4 @@ -function macro:core/lib/internal/queue_run_func with storage macro:engine _event_tmp[0] +data modify storage macro:engine _dispatch.func set from storage macro:engine _event_tmp[0].func +function #macro:internal/dispatch data remove storage macro:engine _event_tmp[0] execute if data storage macro:engine _event_tmp[0] run function macro:events/internal/fire_next diff --git a/1_20_5/data/macro/functions/systems/geo/as_nearby_player.mcfunction b/1_20_5/data/macro/functions/systems/geo/as_nearby_player.mcfunction index 7ac628e7..1ae075cf 100644 --- a/1_20_5/data/macro/functions/systems/geo/as_nearby_player.mcfunction +++ b/1_20_5/data/macro/functions/systems/geo/as_nearby_player.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[distance=..$(distance),limit=1,sort=nearest] at @s run function macro:core/dispatch/run +$execute as @a[distance=..$(distance),limit=1,sort=nearest] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"geo/as_nearby_player ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/1_20_5/data/macro/functions/systems/logic/if_eq.mcfunction b/1_20_5/data/macro/functions/systems/logic/if_eq.mcfunction index b53c0471..042e1e91 100644 --- a/1_20_5/data/macro/functions/systems/logic/if_eq.mcfunction +++ b/1_20_5/data/macro/functions/systems/logic/if_eq.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp = $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp = $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/systems/logic/if_gt.mcfunction b/1_20_5/data/macro/functions/systems/logic/if_gt.mcfunction index 761bdf2c..e6a5f7ce 100644 --- a/1_20_5/data/macro/functions/systems/logic/if_gt.mcfunction +++ b/1_20_5/data/macro/functions/systems/logic/if_gt.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp > $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp > $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/systems/logic/if_gte.mcfunction b/1_20_5/data/macro/functions/systems/logic/if_gte.mcfunction index f7e0a1d0..f4f9e9a6 100644 --- a/1_20_5/data/macro/functions/systems/logic/if_gte.mcfunction +++ b/1_20_5/data/macro/functions/systems/logic/if_gte.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp >= $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp >= $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/systems/logic/if_lt.mcfunction b/1_20_5/data/macro/functions/systems/logic/if_lt.mcfunction index e968cad6..8cc81048 100644 --- a/1_20_5/data/macro/functions/systems/logic/if_lt.mcfunction +++ b/1_20_5/data/macro/functions/systems/logic/if_lt.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp < $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp < $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/systems/logic/if_lte.mcfunction b/1_20_5/data/macro/functions/systems/logic/if_lte.mcfunction index f8f94d3f..0b25e4f5 100644 --- a/1_20_5/data/macro/functions/systems/logic/if_lte.mcfunction +++ b/1_20_5/data/macro/functions/systems/logic/if_lte.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp <= $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp <= $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/systems/logic/if_not_eq.mcfunction b/1_20_5/data/macro/functions/systems/logic/if_not_eq.mcfunction index fa5c7b17..e8edb3f7 100644 --- a/1_20_5/data/macro/functions/systems/logic/if_not_eq.mcfunction +++ b/1_20_5/data/macro/functions/systems/logic/if_not_eq.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute unless score $if_a macro.tmp = $if_b macro.tmp run function macro:core/dispatch/run +execute unless score $if_a macro.tmp = $if_b macro.tmp run function #macro:internal/dispatch diff --git a/1_20_5/data/macro/functions/world/entity/for_each.mcfunction b/1_20_5/data/macro/functions/world/entity/for_each.mcfunction index 57628fed..b9ecf184 100644 --- a/1_20_5/data/macro/functions/world/entity/for_each.mcfunction +++ b/1_20_5/data/macro/functions/world/entity/for_each.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @e[type=$(type),tag=$(tag)] at @s run function macro:core/dispatch/run +$execute as @e[type=$(type),tag=$(tag)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/for_each ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(type)","color":"aqua"}] diff --git a/1_20_5/data/macro/functions/world/entity/for_each_in_radius.mcfunction b/1_20_5/data/macro/functions/world/entity/for_each_in_radius.mcfunction index c330d0d3..f7c315d8 100644 --- a/1_20_5/data/macro/functions/world/entity/for_each_in_radius.mcfunction +++ b/1_20_5/data/macro/functions/world/entity/for_each_in_radius.mcfunction @@ -13,5 +13,5 @@ # ───────────────────────────────────────────────────────────────── $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),distance=..$(radius)] at @s run function macro:core/dispatch/run +$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),distance=..$(radius)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/for_each_in_radius ","color":"aqua"},{"text":"$(player) r=$(radius) → ","color":"gray"},{"text":"$(type)","color":"aqua"}] diff --git a/1_20_5/data/macro/functions/world/entity/nearest.mcfunction b/1_20_5/data/macro/functions/world/entity/nearest.mcfunction index 05f496fd..9636dc6e 100644 --- a/1_20_5/data/macro/functions/world/entity/nearest.mcfunction +++ b/1_20_5/data/macro/functions/world/entity/nearest.mcfunction @@ -11,5 +11,5 @@ # ───────────────────────────────────────────────────────────────── $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),sort=nearest,limit=1,distance=..$(radius)] at @s run function macro:core/dispatch/run +$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),sort=nearest,limit=1,distance=..$(radius)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/nearest ","color":"aqua"},{"text":"$(player) → ","color":"gray"},{"text":"$(type) r=$(radius)","color":"aqua"}] diff --git a/README.md b/README.md index 7a086847..4cabb107 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,6 @@ > Current version: **v4.0.2** -> ⚠️ **Migrated from `ToolkitMC/macroEngine-dp`** — This is the new official repository. The old repo is archived (read-only). See the [Migration Guide](../../wiki/Migration-Guide) for details. - ---- - > 🛡️ **This is a Minecraft Datapack — it contains no executables or scripts outside of `.mcfunction` files.** > Some antivirus software may flag `.mcfunction` files as suspicious due to macro-like syntax. This is a **false positive**. The pack has been scanned on [VirusTotal](https://www.virustotal.com) and returned clean. > **Only download from this official repository.** Do not trust redistributed or repackaged versions from third-party sources. @@ -43,7 +39,7 @@ Full API reference, guides, and examples are available in the **[GitHub Wiki](.. ``` macro:engine (persistent data) ├── global -│ ├── version: "v4.0.1" +│ ├── version: "v4.0.2" │ └── tick: ├── players │ └── Steve { coins:150, level:5, xp:2300, online:1b, ... } diff --git a/data/macro/function/api/interaction/internal/check_bind.mcfunction b/data/macro/function/api/interaction/internal/check_bind.mcfunction index fb54ba95..3e88683b 100644 --- a/data/macro/function/api/interaction/internal/check_bind.mcfunction +++ b/data/macro/function/api/interaction/internal/check_bind.mcfunction @@ -1,2 +1,2 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute if entity @e[type=minecraft:interaction,tag=macro.ia_active,tag=$(tag),limit=1] run function macro:core/dispatch/run +$execute if entity @e[type=minecraft:interaction,tag=macro.ia_active,tag=$(tag),limit=1] run function #macro:internal/dispatch diff --git a/data/macro/function/core/lib/for_each_entity.mcfunction b/data/macro/function/core/lib/for_each_entity.mcfunction index 87437bd8..21cf8a74 100644 --- a/data/macro/function/core/lib/for_each_entity.mcfunction +++ b/data/macro/function/core/lib/for_each_entity.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @e[type=$(type),tag=$(tag)] run function macro:core/dispatch/run +$execute as @e[type=$(type),tag=$(tag)] run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_entity ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/data/macro/function/core/lib/for_each_player.mcfunction b/data/macro/function/core/lib/for_each_player.mcfunction index 68051b30..cf89e428 100644 --- a/data/macro/function/core/lib/for_each_player.mcfunction +++ b/data/macro/function/core/lib/for_each_player.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -execute as @a run function macro:core/dispatch/run +execute as @a run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_player ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/data/macro/function/core/lib/for_each_player_at.mcfunction b/data/macro/function/core/lib/for_each_player_at.mcfunction index bb1530c3..5b868819 100644 --- a/data/macro/function/core/lib/for_each_player_at.mcfunction +++ b/data/macro/function/core/lib/for_each_player_at.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -execute as @a at @s run function macro:core/dispatch/run +execute as @a at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"lib/for_each_player_at ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/data/macro/function/core/lib/internal/queue_run_func_as.mcfunction b/data/macro/function/core/lib/internal/queue_run_func_as.mcfunction index e1da2b83..c4d040b9 100644 --- a/data/macro/function/core/lib/internal/queue_run_func_as.mcfunction +++ b/data/macro/function/core/lib/internal/queue_run_func_as.mcfunction @@ -1,2 +1,2 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as $(player) at @s run function macro:core/dispatch/run +$execute as $(player) at @s run function #macro:internal/dispatch diff --git a/data/macro/function/core/queue/internal/exec_as.mcfunction b/data/macro/function/core/queue/internal/exec_as.mcfunction index 12c958dd..d8a4472f 100644 --- a/data/macro/function/core/queue/internal/exec_as.mcfunction +++ b/data/macro/function/core/queue/internal/exec_as.mcfunction @@ -7,4 +7,4 @@ # player — player name used in selector $data modify storage macro:engine _dispatch.func set value "$(fn)" -$execute as $(player) run function macro:core/dispatch/run +$execute as $(player) run function #macro:internal/dispatch diff --git a/data/macro/function/core/tick/dispatch/exec.mcfunction b/data/macro/function/core/tick/dispatch/exec.mcfunction index aaf31bce..aaf617ad 100644 --- a/data/macro/function/core/tick/dispatch/exec.mcfunction +++ b/data/macro/function/core/tick/dispatch/exec.mcfunction @@ -6,4 +6,4 @@ # condition:"macro:is_daytime" → only run when predicate passes $data modify storage macro:engine _dispatch.func set value "$(fn)" -execute if data storage macro:tick_work channel{condition:""} run function macro:core/dispatch/run +execute if data storage macro:tick_work channel{condition:""} run function #macro:internal/dispatch diff --git a/data/macro/function/core/tick/dispatch/exec2.mcfunction b/data/macro/function/core/tick/dispatch/exec2.mcfunction index b76f18e4..05e141eb 100644 --- a/data/macro/function/core/tick/dispatch/exec2.mcfunction +++ b/data/macro/function/core/tick/dispatch/exec2.mcfunction @@ -8,4 +8,4 @@ execute if data storage macro:tick_work channel{condition:""} run return 0 $data modify storage macro:engine _dispatch.func set value "$(fn)" -$execute as @a[limit=1] at @s if predicate $(condition) run function macro:core/dispatch/run +$execute as @a[limit=1] at @s if predicate $(condition) run function #macro:internal/dispatch diff --git a/data/macro/function/events/internal/fire_next.mcfunction b/data/macro/function/events/internal/fire_next.mcfunction index 46fbb042..08111eec 100644 --- a/data/macro/function/events/internal/fire_next.mcfunction +++ b/data/macro/function/events/internal/fire_next.mcfunction @@ -1,3 +1,4 @@ -function macro:core/lib/internal/queue_run_func with storage macro:engine _event_tmp[0] +data modify storage macro:engine _dispatch.func set from storage macro:engine _event_tmp[0].func +function #macro:internal/dispatch data remove storage macro:engine _event_tmp[0] execute if data storage macro:engine _event_tmp[0] run function macro:events/internal/fire_next diff --git a/data/macro/function/player/run_func_as_uuid_macro.mcfunction b/data/macro/function/player/run_func_as_uuid_macro.mcfunction index 6a557d10..2fe54dc4 100644 --- a/data/macro/function/player/run_func_as_uuid_macro.mcfunction +++ b/data/macro/function/player/run_func_as_uuid_macro.mcfunction @@ -1,2 +1,2 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[nbt={UUID:$(uuid)}] run function macro:core/dispatch/run +$execute as @a[nbt={UUID:$(uuid)}] run function #macro:internal/dispatch diff --git a/data/macro/function/systems/geo/as_nearby_player.mcfunction b/data/macro/function/systems/geo/as_nearby_player.mcfunction index 7ac628e7..1ae075cf 100644 --- a/data/macro/function/systems/geo/as_nearby_player.mcfunction +++ b/data/macro/function/systems/geo/as_nearby_player.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[distance=..$(distance),limit=1,sort=nearest] at @s run function macro:core/dispatch/run +$execute as @a[distance=..$(distance),limit=1,sort=nearest] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"geo/as_nearby_player ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(func)","color":"aqua"}] diff --git a/data/macro/function/systems/logic/if_eq.mcfunction b/data/macro/function/systems/logic/if_eq.mcfunction index b53c0471..042e1e91 100644 --- a/data/macro/function/systems/logic/if_eq.mcfunction +++ b/data/macro/function/systems/logic/if_eq.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp = $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp = $if_b macro.tmp run function #macro:internal/dispatch diff --git a/data/macro/function/systems/logic/if_gt.mcfunction b/data/macro/function/systems/logic/if_gt.mcfunction index 761bdf2c..e6a5f7ce 100644 --- a/data/macro/function/systems/logic/if_gt.mcfunction +++ b/data/macro/function/systems/logic/if_gt.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp > $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp > $if_b macro.tmp run function #macro:internal/dispatch diff --git a/data/macro/function/systems/logic/if_gte.mcfunction b/data/macro/function/systems/logic/if_gte.mcfunction index f7e0a1d0..f4f9e9a6 100644 --- a/data/macro/function/systems/logic/if_gte.mcfunction +++ b/data/macro/function/systems/logic/if_gte.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp >= $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp >= $if_b macro.tmp run function #macro:internal/dispatch diff --git a/data/macro/function/systems/logic/if_lt.mcfunction b/data/macro/function/systems/logic/if_lt.mcfunction index e968cad6..8cc81048 100644 --- a/data/macro/function/systems/logic/if_lt.mcfunction +++ b/data/macro/function/systems/logic/if_lt.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp < $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp < $if_b macro.tmp run function #macro:internal/dispatch diff --git a/data/macro/function/systems/logic/if_lte.mcfunction b/data/macro/function/systems/logic/if_lte.mcfunction index f8f94d3f..0b25e4f5 100644 --- a/data/macro/function/systems/logic/if_lte.mcfunction +++ b/data/macro/function/systems/logic/if_lte.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute if score $if_a macro.tmp <= $if_b macro.tmp run function macro:core/dispatch/run +execute if score $if_a macro.tmp <= $if_b macro.tmp run function #macro:internal/dispatch diff --git a/data/macro/function/systems/logic/if_not_eq.mcfunction b/data/macro/function/systems/logic/if_not_eq.mcfunction index fa5c7b17..e8edb3f7 100644 --- a/data/macro/function/systems/logic/if_not_eq.mcfunction +++ b/data/macro/function/systems/logic/if_not_eq.mcfunction @@ -1,4 +1,4 @@ $scoreboard players set $if_a macro.tmp $(a) $scoreboard players set $if_b macro.tmp $(b) $data modify storage macro:engine _dispatch.func set value "$(func)" -execute unless score $if_a macro.tmp = $if_b macro.tmp run function macro:core/dispatch/run +execute unless score $if_a macro.tmp = $if_b macro.tmp run function #macro:internal/dispatch diff --git a/data/macro/function/world/entity/for_each.mcfunction b/data/macro/function/world/entity/for_each.mcfunction index 57628fed..b9ecf184 100644 --- a/data/macro/function/world/entity/for_each.mcfunction +++ b/data/macro/function/world/entity/for_each.mcfunction @@ -1,3 +1,3 @@ $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @e[type=$(type),tag=$(tag)] at @s run function macro:core/dispatch/run +$execute as @e[type=$(type),tag=$(tag)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/for_each ","color":"aqua"},{"text":" → ","color":"#555555"},{"text":"$(type)","color":"aqua"}] diff --git a/data/macro/function/world/entity/for_each_in_radius.mcfunction b/data/macro/function/world/entity/for_each_in_radius.mcfunction index c330d0d3..f7c315d8 100644 --- a/data/macro/function/world/entity/for_each_in_radius.mcfunction +++ b/data/macro/function/world/entity/for_each_in_radius.mcfunction @@ -13,5 +13,5 @@ # ───────────────────────────────────────────────────────────────── $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),distance=..$(radius)] at @s run function macro:core/dispatch/run +$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),distance=..$(radius)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/for_each_in_radius ","color":"aqua"},{"text":"$(player) r=$(radius) → ","color":"gray"},{"text":"$(type)","color":"aqua"}] diff --git a/data/macro/function/world/entity/nearest.mcfunction b/data/macro/function/world/entity/nearest.mcfunction index 05f496fd..9636dc6e 100644 --- a/data/macro/function/world/entity/nearest.mcfunction +++ b/data/macro/function/world/entity/nearest.mcfunction @@ -11,5 +11,5 @@ # ───────────────────────────────────────────────────────────────── $data modify storage macro:engine _dispatch.func set value "$(func)" -$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),sort=nearest,limit=1,distance=..$(radius)] at @s run function macro:core/dispatch/run +$execute as @a[name=$(player),limit=1] at @s run execute as @e[type=$(type),sort=nearest,limit=1,distance=..$(radius)] at @s run function #macro:internal/dispatch $tellraw @a[tag=macro.debug] ["",{"text":"[AME] ","color":"#00AAAA","bold":true},{"text":"entity/nearest ","color":"aqua"},{"text":"$(player) → ","color":"gray"},{"text":"$(type) r=$(radius)","color":"aqua"}]