You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/systems/datapackCompiler/1.21.4/animation.mcb
+14-12Lines changed: 14 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -366,9 +366,13 @@ dir <%export_namespace%> {
366
366
}
367
367
}
368
368
IF (animation.frames.some(v => v.variant)) {
369
-
$execute if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant unless entity @s[tag=<%TAGS.TRANSFORMS_ONLY()%>] run data modify storage aj:temp variant set from storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant
370
-
$execute if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant unless entity @s[tag=<%TAGS.TRANSFORMS_ONLY()%>] run function *<%export_namespace%>/animations/<%animation.safe_name%>/zzz/apply_variant with storage aj:temp variant
371
-
$execute if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant unless entity @s[tag=<%TAGS.TRANSFORMS_ONLY()%>] run data remove storage aj:temp variant
369
+
$execute \
370
+
if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant \
run { with storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant
373
+
#ARGS: {name: string, condition: string}
374
+
$execute $(condition)run function *<%export_namespace%>/variants/$(name)/apply
375
+
}
372
376
}
373
377
execute on passengers run data modify entity @s[type=!marker] start_interpolation set value -1
374
378
}
@@ -384,15 +388,13 @@ dir <%export_namespace%> {
384
388
}
385
389
}
386
390
IF (animation.frames.some(v => v.variant)) {
387
-
$execute if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant unless entity @s[tag=<%TAGS.TRANSFORMS_ONLY()%>] run data modify storage aj:temp variant set from storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant
388
-
$execute if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant unless entity @s[tag=<%TAGS.TRANSFORMS_ONLY()%>] run function *<%export_namespace%>/animations/<%animation.safe_name%>/zzz/apply_variant with storage aj:temp variant
389
-
$execute if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant unless entity @s[tag=<%TAGS.TRANSFORMS_ONLY()%>] run data remove storage aj:temp variant
390
-
}
391
-
}
392
-
IF (animation.frames.some(v => v.variant)) {
393
-
function apply_variant {
394
-
#ARGS: {name: string, condition: string}
395
-
$execute $(condition)run function *<%export_namespace%>/variants/$(name)/apply
391
+
$execute \
392
+
if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant \
0 commit comments