Skip to content

Commit 6b74562

Browse files
committed
🌎 Fix Hard-Coded Namespaces
1 parent 7df9ba6 commit 6b74562

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/systems/animated_java.mcb

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ dir global {
1414
data modify storage aj:temp args set value {}
1515
# Initialize Rigs
1616
scoreboard players reset * <%OBJECTIVES.IS_RIG_LOADED()%>
17-
function #animated_java:global/on_load
17+
function #*global/on_load
1818
}
1919

2020
function on_tick minecraft:tick {
21-
execute as @e[type=item_display,tag=<%TAGS.GLOBAL_ROOT()%>] at @s run function #animated_java:global/root/on_tick
21+
execute as @e[type=item_display,tag=<%TAGS.GLOBAL_ROOT()%>] at @s run function #*global/root/on_tick
2222
}
2323

2424
tag functions on_load {
25-
animated_java:<%export_namespace%>/on_load
25+
*<%export_namespace%>/on_load
2626
}
2727

2828
dir root {
2929
# TODO Maybe instead of merging tags, I should just generate it from the .ajmeta data every time a rig is exported?
3030
# That way I can also check if the rig's files still exist, and remove tag entries if they don't.
3131
# An entry will be added for each exported rig.
3232
tag functions on_tick {
33-
animated_java:<%export_namespace%>/root/on_tick
33+
*<%export_namespace%>/root/on_tick
3434
}
3535
# An entry will be added for each exported rig.
3636
tag functions on_load {
37-
animated_java:<%export_namespace%>/root/on_load
37+
*<%export_namespace%>/root/on_load
3838
}
3939
}
4040

@@ -45,7 +45,6 @@ dir global {
4545

4646
dir errors {
4747
function function_not_executed_as_root_entity {
48-
# Make this text fancier in the actual implementation.
4948
$tellraw @a <%TELLRAW.FUNCTION_NOT_EXECUTED_AS_ROOT_ERROR('$(function_path)', TAGS.PROJECT_ROOT(export_namespace))%>
5049
}
5150
}
@@ -58,7 +57,7 @@ dir global {
5857
}
5958

6059
dir internal {
61-
# Thanks Gibbly for this code! https://github.com/gibbsly/gu
60+
# Thanks Gibbsly for this code! https://github.com/gibbsly/gu
6261
dir gu {
6362
function load minecraft:load {
6463
scoreboard players set 256 <%OBJECTIVES.I()%> 256
@@ -129,7 +128,7 @@ dir <%export_namespace%> {
129128
}
130129
execute as @e[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] \
131130
unless score @s <%OBJECTIVES.IS_RIG_LOADED()%> matches 1 at @s run \
132-
function animated_java:<%export_namespace%>/root/on_load
131+
function *<%export_namespace%>/root/on_load
133132
}
134133

135134
dir root {
@@ -153,9 +152,9 @@ dir <%export_namespace%> {
153152
}
154153
function on_tick {
155154
execute unless entity @s[tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return 0
156-
execute unless score @s <%OBJECTIVES.IS_RIG_LOADED()%> matches 1 run function #animated_java:global/root/on_load
155+
execute unless score @s <%OBJECTIVES.IS_RIG_LOADED()%> matches 1 run function #*global/root/on_load
157156
# Pre tick
158-
function #animated_java:<%export_namespace%>/as_root/pre_tick
157+
function #*<%export_namespace%>/as_root/pre_tick
159158
# Animations
160159
REPEAT (animations) as animation {
161160
execute if entity @s[tag=<%TAGS.ANIMATION_PLAYING(export_namespace, animation.name)%>] run \
@@ -193,7 +192,7 @@ dir <%export_namespace%> {
193192
# Rotation Logic
194193
execute at @s on passengers run tp @s ~ ~ ~ ~ ~
195194
# Post tick
196-
function #animated_java:<%export_namespace%>/as_root/post_tick
195+
function #*<%export_namespace%>/as_root/post_tick
197196
}
198197
}
199198

@@ -455,7 +454,7 @@ dir <%export_namespace%> {
455454
execute as @e[type=<%locator.config.entity_type%>,tag=<%TAGS.NEW()%>,tag=<%TAGS.GLOBAL_LOCATOR()%>,limit=1,distance=..0.01] run {
456455
tag @s remove <%TAGS.NEW()%>
457456

458-
function animated_java:global/internal/gu/convert_uuid_array_to_string with entity @s
457+
function *global/internal/gu/convert_uuid_array_to_string with entity @s
459458
execute as @e[type=item_display,tag=<%TAGS.NEW()%>,limit=1,distance=..0.01] on passengers if entity @s[tag=<%TAGS.GLOBAL_DATA()%>] run {
460459
data modify entity @s data.locators.<%locator.name%>.uuid set from storage aj:uuid main.out
461460
}
@@ -473,7 +472,7 @@ dir <%export_namespace%> {
473472
execute as @e[type=item_display,tag=<%TAGS.NEW()%>,tag=<%TAGS.GLOBAL_CAMERA()%>,limit=1,distance=..0.01] run {
474473
tag @s remove <%TAGS.NEW()%>
475474

476-
function animated_java:global/internal/gu/convert_uuid_array_to_string with entity @s
475+
function *global/internal/gu/convert_uuid_array_to_string with entity @s
477476
execute as @e[type=item_display,tag=<%TAGS.NEW()%>,limit=1,distance=..0.01] on passengers if entity @s[tag=<%TAGS.GLOBAL_DATA()%>] run {
478477
data modify entity @s data.cameras.<%camera.name%>.uuid set from storage aj:uuid main.out
479478
}
@@ -541,7 +540,7 @@ dir <%export_namespace%> {
541540
# Custom Summon Commands
542541

543542
# Run the on_summon function for the root entity.
544-
function #animated_java:<%export_namespace%>/as_root/on_summon
543+
function #*<%export_namespace%>/as_root/on_summon
545544
}
546545
}
547546

@@ -569,7 +568,6 @@ dir <%export_namespace%> {
569568
}
570569
}
571570

572-
573571
dir remove {
574572
# Removes all instances of this rig from the world.
575573
function all {
@@ -582,7 +580,7 @@ dir <%export_namespace%> {
582580
{'function_path': 'animated_java:<%export_namespace%>/remove/this'}
583581

584582
# On Remove Event
585-
function #animated_java:<%export_namespace%>/as_root/on_remove
583+
function #*<%export_namespace%>/as_root/on_remove
586584

587585
execute on passengers if entity @s[tag=<%TAGS.GLOBAL_DATA()%>] run {
588586
REPEAT (Object.values(rig.nodeMap).filter(v => v.type === 'locator' && v.config?.use_entity)) as locator {

0 commit comments

Comments
 (0)