@@ -40,7 +40,8 @@ dir global {
40
40
41
41
dir errors {
42
42
function function_not_executed_as_root_entity {
43
- $tellraw @a <%TELLRAW.FUNCTION_NOT_EXECUTED_AS_ROOT_ERROR('$(function_path)', TAGS.PROJECT_ROOT(export_namespace))%>
43
+ #ARGS: {export_namespace: string, function_path: string}
44
+ $tellraw @a <%TELLRAW.FUNCTION_NOT_EXECUTED_AS_ROOT_ERROR('$(function_path)', TAGS.PROJECT_ROOT('$(export_namespace)'))%>
44
45
}
45
46
}
46
47
@@ -217,35 +218,35 @@ dir <%export_namespace%> {
217
218
function play {
218
219
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
219
220
function *global/errors/function_not_executed_as_root_entity \
220
- {'function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/play'}
221
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/play'}
221
222
tag @s add <%TAGS.ANIMATION_PLAYING(export_namespace, animation.name)%>
222
223
scoreboard players set @s <%OBJECTIVES.FRAME()%> 0
223
224
execute at @s run function ./zzz/set_frame {frame: 0}
224
225
}
225
226
function stop {
226
227
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
227
228
function *global/errors/function_not_executed_as_root_entity \
228
- {'function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/stop'}
229
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/stop'}
229
230
tag @s remove <%TAGS.ANIMATION_PLAYING(export_namespace, animation.name)%>
230
231
scoreboard players set @s <%OBJECTIVES.FRAME()%> 0
231
232
execute at @s run function ./zzz/set_frame {frame: 0}
232
233
}
233
234
function pause {
234
235
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
235
236
function *global/errors/function_not_executed_as_root_entity \
236
- {'function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/pause'}
237
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/pause'}
237
238
tag @s remove <%TAGS.ANIMATION_PLAYING(export_namespace, animation.name)%>
238
239
}
239
240
function resume {
240
241
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
241
242
function *global/errors/function_not_executed_as_root_entity \
242
- {'function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/resume'}
243
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/resume'}
243
244
tag @s add <%TAGS.ANIMATION_PLAYING(export_namespace, animation.name)%>
244
245
}
245
246
function next_frame {
246
247
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
247
248
function *global/errors/function_not_executed_as_root_entity \
248
- {'function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/next_frame'}
249
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/next_frame'}
249
250
execute if score @s <%OBJECTIVES.FRAME()%> matches <%animation.duration%>.. run scoreboard players set @s <%OBJECTIVES.FRAME()%> 1
250
251
execute store result storage aj:temp frame int 1 run scoreboard players get @s <%OBJECTIVES.FRAME()%>
251
252
execute at @s run function ./zzz/apply_frame with storage aj:temp
@@ -256,15 +257,15 @@ dir <%export_namespace%> {
256
257
#ARGS: {frame: int}
257
258
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
258
259
function *global/errors/function_not_executed_as_root_entity \
259
- {'function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/set_frame'}
260
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/set_frame'}
260
261
$execute store result storage aj:temp frame int 1 run scoreboard players set @s <%OBJECTIVES.FRAME()%> $(frame)
261
262
execute at @s run function ./zzz/set_frame with storage aj:temp
262
263
}
263
264
function apply_frame {
264
265
# ARGS: {frame: int}
265
266
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
266
267
function *global/errors/function_not_executed_as_root_entity \
267
- {'function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/apply_frame'}
268
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/apply_frame'}
268
269
$execute store result storage aj:temp frame int 1 run scoreboard players set @s <%OBJECTIVES.FRAME()%> $(frame)
269
270
execute at @s run function ./zzz/apply_frame with storage aj:temp
270
271
}
@@ -273,7 +274,7 @@ dir <%export_namespace%> {
273
274
#ARGS: {duration: int, to_frame: int}
274
275
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
275
276
function *global/errors/function_not_executed_as_root_entity \
276
- {'function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/tween_play'}
277
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/<%animation.name%>/tween_play'}
277
278
function *<%export_namespace%>/animations/pause_all
278
279
279
280
tag @s add <%TAGS.ANIMATION_PLAYING(export_namespace, animation.name)%>
@@ -446,7 +447,7 @@ dir <%export_namespace%> {
446
447
# Pauses all animations
447
448
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
448
449
function *global/errors/function_not_executed_as_root_entity \
449
- {'function_path': 'animated_java:<%export_namespace%>/animations/pause_all'}
450
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/animations/pause_all'}
450
451
REPEAT (animations) as animation {
451
452
tag @s remove <%TAGS.ANIMATION_PLAYING(export_namespace, animation.name)%>
452
453
}
@@ -584,7 +585,7 @@ dir <%export_namespace%> {
584
585
#ARGS: {command: string}
585
586
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
586
587
function *global/errors/function_not_executed_as_root_entity \
587
- {'function_path': 'animated_java:<%export_namespace%>/as_all_locators'}
588
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/as_all_locators'}
588
589
$data modify storage aj:temp command set value '$(command)'
589
590
execute on passengers if entity @s[tag=<%TAGS.GLOBAL_DATA()%>] run {
590
591
REPEAT (Object.values(rig.nodeMap).filter(v => v.type === 'locator')) as locator {
@@ -605,7 +606,7 @@ dir <%export_namespace%> {
605
606
function this {
606
607
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
607
608
function *global/errors/function_not_executed_as_root_entity \
608
- {'function_path': 'animated_java:<%export_namespace%>/remove/this'}
609
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/remove/this'}
609
610
610
611
# On Remove Event
611
612
function #*<%export_namespace%>/as_root/on_remove
@@ -632,7 +633,7 @@ dir <%export_namespace%> {
632
633
function apply {
633
634
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
634
635
function *global/errors/function_not_executed_as_root_entity \
635
- {'function_path': 'animated_java:<%export_namespace%>/variants/<%defaultVariant.name%>/apply'}
636
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/variants/<%defaultVariant.name%>/apply'}
636
637
REPEAT (Object.values(rig.nodeMap)) as node {
637
638
IF (node.type === 'bone') {
638
639
execute on passengers if entity @s[tag=aj.<%export_namespace%>.bone.<%node.name%>] run {
@@ -654,7 +655,7 @@ dir <%export_namespace%> {
654
655
function apply {
655
656
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
656
657
function *global/errors/function_not_executed_as_root_entity \
657
- {'function_path': 'animated_java:<%export_namespace%>/variants/<%variant.name%>/apply'}
658
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/variants/<%variant.name%>/apply'}
658
659
REPEAT (Object.values(rig.nodeMap)) as node {
659
660
IF (node.type === 'bone' && !Object.values(variant.excludedNodes).find(v => v.value === node.node.uuid) && (rig.variantModels[variant.uuid][node.node.uuid] !== undefined || node.configs.variants[variant.uuid])) {
660
661
execute on passengers if entity @s[tag=aj.<%export_namespace%>.bone.<%node.name%>] run {
@@ -682,7 +683,7 @@ dir <%export_namespace%> {
682
683
# Changes the pose of the rig to the the default pose with interpolation
683
684
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
684
685
function *global/errors/function_not_executed_as_root_entity \
685
- {'function_path': 'animated_java:<%export_namespace%>/apply_default_pose'}
686
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/apply_default_pose'}
686
687
REPEAT (rig.defaultTransforms) as node {
687
688
IF (['bone', 'text_display', 'item_display', 'block_display'].includes(node.type)) {
688
689
execute on passengers if entity @s[tag=aj.<%export_namespace%>.bone.<%node.name%>] run \
@@ -694,7 +695,7 @@ dir <%export_namespace%> {
694
695
# Changes the pose of the rig to the the default pose without interpolation
695
696
execute unless entity @s[type=item_display,tag=<%TAGS.PROJECT_ROOT(export_namespace)%>] run return run \
696
697
function *global/errors/function_not_executed_as_root_entity \
697
- {'function_path': 'animated_java:<%export_namespace%>/set_default_pose'}
698
+ {'export_namespace': '<%export_namespace%>', ' function_path': 'animated_java:<%export_namespace%>/set_default_pose'}
698
699
REPEAT (rig.defaultTransforms) as node {
699
700
IF (['bone', 'text_display', 'item_display', 'block_display'].includes(node.type)) {
700
701
execute on passengers if entity @s[tag=aj.<%export_namespace%>.bone.<%node.name%>] run \
0 commit comments