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.20.4/animation.mcb
+50-26Lines changed: 50 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -251,9 +251,13 @@ dir <%export_namespace%> {
251
251
}
252
252
}
253
253
IF (animation.frames.some(v => v.variant)) {
254
-
$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
255
-
$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
256
-
$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
254
+
$execute \
255
+
if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant \
run { with storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant
258
+
#ARGS: {name: string, condition: string}
259
+
$execute $(condition)run function *<%export_namespace%>/variants/$(name)/apply
260
+
}
257
261
}
258
262
execute on passengers run data modify entity @s[type=!marker] start_interpolation set value -1
259
263
}
@@ -269,15 +273,13 @@ dir <%export_namespace%> {
269
273
}
270
274
}
271
275
IF (animation.frames.some(v => v.variant)) {
272
-
$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
273
-
$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
274
-
$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
275
-
}
276
-
}
277
-
IF (animation.frames.some(v => v.variant)) {
278
-
function apply_variant {
279
-
#ARGS: {name: string, condition: string}
280
-
$execute $(condition)run function *<%export_namespace%>/variants/$(name)/apply
276
+
$execute \
277
+
if data storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).variant \
0 commit comments