Skip to content

Commit 61ff52c

Browse files
committed
🚧 Squashed v1.6.1
commit f6c0713 Author: SnaveSutit <snavesutit@gmail.com> Date: Fri Jan 10 21:35:13 2025 -0500 🚧 v1.6.1 commit 779aa54 Author: SnaveSutit <snavesutit@gmail.com> Date: Fri Jan 10 21:35:01 2025 -0500 ✨ Changelog improvements commit b166f91 Author: SnaveSutit <snavesutit@gmail.com> Date: Fri Jan 10 21:14:25 2025 -0500 🛠️ Fix overlays breaking custom function tags commit 9328366 Author: SnaveSutit <snavesutit@gmail.com> Date: Fri Jan 10 18:03:42 2025 -0500 🛠️ Reduce complexity of storage-based variant functions 3 commands to 1 command :) commit b4ab4e6 Author: Chen <scnmed.g@gmail.com> Date: Fri Jan 10 07:14:33 2025 +0900 ➕ Merge PR #354: Fix variant change in animation with “Use storage for animation” Fix #353 commit 544b88c Merge: ddcea5a 55d0769 Author: Titus Evans <snavesutit@gmail.com> Date: Thu Jan 9 14:11:29 2025 -0800 ➕ Merge pull request #351 from ChenCMD/next Fix Export with “Use Storage for Animation” enabled commit 55d0769 Author: ChenCMD <scnmed.g@gmail.com> Date: Thu Jan 9 22:37:17 2025 +0900 Fix Export `<export_namespace>/on_load.mcf` is corrupt with “Use Storage for Animation” enabled Fix #350 commit ddcea5a Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Jan 8 13:33:09 2025 -0500 🛠️ Add "has_changelog" to plugin packager commit 2af409d Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Jan 8 13:14:16 2025 -0500 ❗ Forgot a changelog item commit 3e2a0c2 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Jan 8 13:11:09 2025 -0500 🚧 v1.6.0 commit f54f807 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Jan 8 11:52:58 2025 -0500 🚧 Improved version handling commit 02b1860 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Jan 8 11:28:50 2025 -0500 🚧 Version warning Added a warning when loading AJ data packs in versions they weren't exported for. commit cc88b83 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Jan 8 10:48:27 2025 -0500 🛠️ Fix transparent texture and missing tags - Fix incorrect export location for transparent texture. - Fix tags getting cleared out in old exports. commit 271a0f6 Author: SnaveSutit <snavesutit@gmail.com> Date: Tue Jan 7 14:28:24 2025 -0500 🚧 Add extraction confirmation commit 0070b9c Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 12:35:17 2024 -0500 🛠️ Slightly improved empty JSON text rendering #322 commit 5781f3f Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 11:58:35 2024 -0500 🛠️ Fix #342 commit 83acc4f Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 11:45:52 2024 -0500 🛠️ Fix #340 commit 339345e Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 11:44:04 2024 -0500 🛠️ Fix #343 commit 9912d7c Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 11:33:24 2024 -0500 🛠️ Fix #341 commit e3129d1 Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 11:30:49 2024 -0500 🛠️ Fix #345 commit 99446a5 Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 11:14:42 2024 -0500 🛠️ Fixed #347 commit 89369b1 Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 11:06:52 2024 -0500 🛠️ Fix #349 commit a7b1753 Author: SnaveSutit <snavesutit@gmail.com> Date: Mon Dec 30 11:05:09 2024 -0500 🛠️ Fix #348 commit 5d24c77 Author: SnaveSutit <snavesutit@gmail.com> Date: Tue Dec 24 06:07:18 2024 -0500 🚧 Add .mcb file compression. commit d567389 Author: SnaveSutit <snavesutit@gmail.com> Date: Tue Nov 26 17:52:04 2024 -0500 Squashed commit of the following: commit 7aeec46 Author: SnaveSutit <snavesutit@gmail.com> Date: Thu Nov 21 14:14:15 2024 -0500 🚧 1.21.4 Export - Added 1.21.4 target MC version. - Changed missing assets and data folder for resource and data pack folder settings errors into warnings. - Added an action to extract all of a blueprint's export files from a data pack / resource pack. - Added support for item definitions (1.21.4). - Changed default resource pack structure: `animated_java:textures/item/export_namespace/` -> `animated_java:textures/blueprint/export_namespace/` `animated_java:models/item/export_namespace/` -> `animated_java:models/blueprint/export_namespace/` commit efdc207 Author: SnaveSutit <snavesutit@gmail.com> Date: Sat Nov 16 11:18:07 2024 -0500 🚧 Prevent exporting with invalid rotations. - Added a dialog and exception for exporting a blueprint with invalid cube rotations. commit fac53dc Author: SnaveSutit <snavesutit@gmail.com> Date: Sat Nov 16 11:09:30 2024 -0500 🚧 Enforce Per-Face UV when converting commit d285985 Author: SnaveSutit <snavesutit@gmail.com> Date: Sat Nov 2 17:37:32 2024 -0400 🚧 Squashed v1.5.0, v1.5.1, and v1.5.2. commit bcbb6f8 Author: SnaveSutit <snavesutit@gmail.com> Date: Sat Nov 2 17:33:16 2024 -0400 🛠️ Fix broken asset download on first startup. commit 9a3b525 Author: SnaveSutit <snavesutit@gmail.com> Date: Fri Nov 1 15:08:57 2024 -0400 ✨ Improved tellraw messages commit d8dbdbd Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 30 17:53:35 2024 -0400 Fix production build script issues. commit 2dce027 Author: SnaveSutit <snavesutit@gmail.com> Date: Tue Oct 29 11:10:47 2024 -0400 🛠️ Static Export Locator / Camera Fixes - Fixed use entity locators and cameras not summoning properly in static mode commit 66986b7 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 23 09:58:02 2024 -0400 🚧 v1.5.1 commit 357bfa2 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 23 09:57:52 2024 -0400 🛠️ Fix broken passengers from summon tp command commit 7d95287 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 23 09:58:29 2024 -0400 🚧 Squashed v.1.5.1 commit 66986b7 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 23 09:58:02 2024 -0400 🚧 v1.5.1 commit 357bfa2 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 23 09:57:52 2024 -0400 🛠️ Fix broken passengers from summon tp command commit bd7c6b1 Author: SnaveSutit <snavesutit@gmail.com> Date: Sat Nov 9 04:03:22 2024 -0500 ✨ Add a toast notification for invalid cubes commit bcbb6f8 Author: SnaveSutit <snavesutit@gmail.com> Date: Sat Nov 2 17:33:16 2024 -0400 🛠️ Fix broken asset download on first startup. commit 9a3b525 Author: SnaveSutit <snavesutit@gmail.com> Date: Fri Nov 1 15:08:57 2024 -0400 ✨ Improved tellraw messages commit d8dbdbd Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 30 17:53:35 2024 -0400 Fix production build script issues. commit 2dce027 Author: SnaveSutit <snavesutit@gmail.com> Date: Tue Oct 29 11:10:47 2024 -0400 🛠️ Static Export Locator / Camera Fixes - Fixed use entity locators and cameras not summoning properly in static mode commit 66986b7 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 23 09:58:02 2024 -0400 🚧 v1.5.1 commit 357bfa2 Author: SnaveSutit <snavesutit@gmail.com> Date: Wed Oct 23 09:57:52 2024 -0400 🛠️ Fix broken passengers from summon tp command
1 parent 4482a54 commit 61ff52c

File tree

18 files changed

+411
-1026
lines changed

18 files changed

+411
-1026
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"title": "Animated Java",
55
"icon": "icon.svg",
66
"description": "A Blockbench plugin that makes complex animation a breeze in Minecraft: Java Edition.",
7-
"version": "1.6.0",
8-
"display_version": "1.6.0",
7+
"version": "1.6.1",
8+
"display_version": "1.6.1",
99
"min_blockbench_version": "4.11.1",
1010
"variant": "desktop",
1111
"tags": [

src/components/changelogDialog.svelte

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import changelog from '../pluginPackage/changelog.json'
3+
import AnimatedJavaIcon from '../assets/animated_java_icon.svg'
34
45
function formatDateFull(date: string) {
56
// @ts-expect-error
@@ -40,10 +41,13 @@
4041
</script>
4142

4243
<div class="content plugin_browser_tabbed_page" id="plugin_browser_changelog">
43-
{#each Object.values(changelog) as versions}
44-
<h3>
45-
{versions.title}
46-
</h3>
44+
{#each Object.values(changelog).reverse() as versions}
45+
<div class="title-container">
46+
<img src={AnimatedJavaIcon} alt="" />
47+
<h3>
48+
{versions.title}
49+
</h3>
50+
</div>
4751
<!-- svelte-ignore a11y-label-has-associated-control -->
4852
<label class="plugin_changelog_author">{versions.author}</label>
4953
<!-- svelte-ignore a11y-label-has-associated-control -->
@@ -83,4 +87,22 @@
8387
border-radius: 3px;
8488
font-size: 0.8em;
8589
}
90+
img {
91+
border-radius: 4px;
92+
width: 24px;
93+
height: 24px;
94+
margin-left: 0.5px;
95+
box-shadow: 1px 1px 1px #000000aa;
96+
}
97+
.title-container h3 {
98+
margin-left: 8px;
99+
margin-top: 0;
100+
}
101+
.title-container {
102+
display: flex;
103+
flex-direction: row;
104+
justify-content: flex-start;
105+
align-items: center;
106+
margin-top: 8px;
107+
}
86108
</style>

src/interface/animatedJavaBarItem.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,21 +114,6 @@ MenuBar.addAction(
114114
MENU_ID + '.animated_java:extract-open'
115115
)
116116

117-
MenuBar.addAction(
118-
createAction(`${PACKAGE.name}:extract`, {
119-
icon: 'fa-trash-can',
120-
category: 'animated_java',
121-
name: translate('action.extract.name'),
122-
condition() {
123-
return Format === BLUEPRINT_FORMAT
124-
},
125-
click() {
126-
void cleanupExportedFiles()
127-
},
128-
}),
129-
MENU.id
130-
)
131-
132117
MenuBar.addAction(
133118
createAction(`${PACKAGE.name}:export`, {
134119
icon: 'insert_drive_file',

src/lang/en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ animated_java.dialog.about.title: About Animated Java
3333
animated_java.dialog.about.close_button: Close
3434

3535
## Changelog
36-
animated_java.dialog.changelog_dialog.title: Changelog
36+
animated_java.dialog.changelog_dialog.title: Animated Java Changelog
3737

3838
## Unexpected Error Dialog
3939
animated_java.dialog.unexpected_error.title: An Unexpected Error Occurred!

src/pluginPackage/changelog.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,24 @@
3737
]
3838
}
3939
]
40+
},
41+
"1.6.1": {
42+
"title": "v1.6.1",
43+
"author": "Titus Evans (SnaveSutit)",
44+
"date": "2025-01-10",
45+
"categories": [
46+
{
47+
"title": "Changes",
48+
"list": ["Slightly improved the changelog."]
49+
},
50+
{
51+
"title": "Fixes",
52+
"list": [
53+
"Fixed overlays breaking custom function tags.",
54+
"Fixed [#350](https://github.com/Animated-Java/animated-java/issues/350)",
55+
"Fixed [#353](https://github.com/Animated-Java/animated-java/issues/353)"
56+
]
57+
}
58+
]
4059
}
4160
}

src/systems/datapackCompiler/1.20.4/animation.mcb

Lines changed: 21 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,9 @@
1-
dir global {
2-
3-
function on_load minecraft:load {
4-
# Initialize Scoreboards
5-
scoreboard objectives add <%OBJECTIVES.I()%> dummy
6-
scoreboard objectives add <%OBJECTIVES.ID()%> dummy
7-
scoreboard objectives add <%OBJECTIVES.IS_RIG_LOADED()%> dummy
8-
scoreboard objectives add <%OBJECTIVES.TWEEN_DURATION()%> dummy
9-
10-
scoreboard players add aj.last_id <%OBJECTIVES.ID()%> 0
11-
12-
# Initialize Storage
13-
data modify storage aj:temp args set value {}
14-
IF (show_outdated_warning) {
15-
# Initialize Rigs
16-
scoreboard players reset * <%OBJECTIVES.IS_RIG_LOADED()%>
17-
}
18-
function #*global/on_load
19-
}
20-
21-
function on_tick minecraft:tick {
22-
execute as @e[type=item_display,tag=<%TAGS.GLOBAL_ROOT()%>] at @s run function #*global/root/on_tick
23-
}
24-
25-
tag functions on_load {
26-
*<%export_namespace%>/on_load
27-
}
28-
29-
dir root {
30-
# TODO Maybe instead of merging tags, I should just generate it from the .ajmeta data every time a rig is exported?
31-
# That way I can also check if the rig's files still exist, and remove tag entries if they don't.
32-
# An entry will be added for each exported rig.
33-
tag functions on_tick {
34-
*<%export_namespace%>/root/on_tick
35-
}
36-
# An entry will be added for each exported rig.
37-
IF (show_outdated_warning) {
38-
tag functions on_load {
39-
*<%export_namespace%>/root/on_load
40-
}
41-
}
42-
}
43-
44-
IF (show_function_errors) {
45-
dir errors {
46-
function function_not_executed_as_root_entity {
47-
#ARGS: {export_namespace: string, function_path: string}
48-
$tellraw @a <%TELLRAW.FUNCTION_NOT_EXECUTED_AS_ROOT_ERROR('$(function_path)')%>
49-
}
50-
}
51-
}
52-
53-
dir remove {
54-
# Removes all instances of all rigs from the world.
55-
function everything {
56-
kill @e[tag=<%TAGS.GLOBAL_RIG()%>]
57-
}
58-
}
59-
60-
dir internal {
61-
# Thanks Gibbsly for this code! https://github.com/gibbsly/gu
62-
dir gu {
63-
function load minecraft:load {
64-
scoreboard players set 256 <%OBJECTIVES.I()%> 256
65-
data modify storage aj:uuid main.hex_chars set value \
66-
<%JSON.stringify([...Array(0x100).keys()].map(v => {const x = v.toString(16); return x.length > 1 ? x : '0' + x}))%>
67-
}
68-
69-
function convert_uuid_array_to_string {
70-
#ARGS: {UUID: [int, int, int, int]}
71-
72-
data modify storage aj:uuid temp set value {0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,a:0,b:0,c:0,d:0,e:0,f:0}
73-
$data modify storage aj:uuid main.in set value $(UUID)
74-
75-
execute store result score 0= <%OBJECTIVES.I()%> store result score 1= <%OBJECTIVES.I()%> run data get storage aj:uuid main.in[0]
76-
execute store result storage aj:uuid temp.0 int 1 run scoreboard players operation 0= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
77-
execute store result score 2= <%OBJECTIVES.I()%> run scoreboard players operation 1= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
78-
execute store result storage aj:uuid temp.1 int 1 run scoreboard players operation 1= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
79-
execute store result score 3= <%OBJECTIVES.I()%> run scoreboard players operation 2= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
80-
execute store result storage aj:uuid temp.2 int 1 run scoreboard players operation 2= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
81-
execute store result storage aj:uuid temp.3 int 1 run scoreboard players operation 3= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
82-
83-
execute store result score 0= <%OBJECTIVES.I()%> store result score 1= <%OBJECTIVES.I()%> run data get storage aj:uuid main.in[1]
84-
execute store result storage aj:uuid temp.4 int 1 run scoreboard players operation 0= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
85-
execute store result score 2= <%OBJECTIVES.I()%> run scoreboard players operation 1= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
86-
execute store result storage aj:uuid temp.5 int 1 run scoreboard players operation 1= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
87-
execute store result score 3= <%OBJECTIVES.I()%> run scoreboard players operation 2= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
88-
execute store result storage aj:uuid temp.6 int 1 run scoreboard players operation 2= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
89-
execute store result storage aj:uuid temp.7 int 1 run scoreboard players operation 3= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
90-
91-
execute store result score 0= <%OBJECTIVES.I()%> store result score 1= <%OBJECTIVES.I()%> run data get storage aj:uuid main.in[2]
92-
execute store result storage aj:uuid temp.8 int 1 run scoreboard players operation 0= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
93-
execute store result score 2= <%OBJECTIVES.I()%> run scoreboard players operation 1= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
94-
execute store result storage aj:uuid temp.9 int 1 run scoreboard players operation 1= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
95-
execute store result score 3= <%OBJECTIVES.I()%> run scoreboard players operation 2= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
96-
execute store result storage aj:uuid temp.a int 1 run scoreboard players operation 2= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
97-
execute store result storage aj:uuid temp.b int 1 run scoreboard players operation 3= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
98-
99-
execute store result score 0= <%OBJECTIVES.I()%> store result score 1= <%OBJECTIVES.I()%> run data get storage aj:uuid main.in[3]
100-
execute store result storage aj:uuid temp.c int 1 run scoreboard players operation 0= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
101-
execute store result score 2= <%OBJECTIVES.I()%> run scoreboard players operation 1= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
102-
execute store result storage aj:uuid temp.d int 1 run scoreboard players operation 1= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
103-
execute store result score 3= <%OBJECTIVES.I()%> run scoreboard players operation 2= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
104-
execute store result storage aj:uuid temp.e int 1 run scoreboard players operation 2= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
105-
execute store result storage aj:uuid temp.f int 1 run scoreboard players operation 3= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
106-
107-
block { with storage aj:uuid temp
108-
REPEAT (0, 15) as i {
109-
$data modify storage aj:uuid temp.<%i.toString(16)%> set from storage aj:uuid main.hex_chars[$(<%i.toString(16)%>)]
110-
}
111-
}
112-
113-
block { with storage aj:uuid temp
114-
$data modify storage aj:uuid main.out set value "$(3)$(2)$(1)$(0)-$(7)$(6)-$(5)$(4)-$(b)$(a)-$(9)$(8)$(f)$(e)$(d)$(c)"
115-
}
116-
}
117-
}
118-
}
119-
}
1201

1212
dir <%export_namespace%> {
1223
function on_load {
1234
IF (use_storage_for_animation) {
1245
REPEAT (animations) as animation {
125-
data remove storage aj.<%export_namespace%>:animations <%animation.storageSafeName%>
6+
data remove storage aj.<%export_namespace%>:animations <%animation.safe_name%>
1267
}
1278
<%animationStorage.join('\n')%>
1289
}
@@ -133,6 +14,10 @@ dir <%export_namespace%> {
13314
%%>
13415
}
13516

17+
function invalid_version_warning {
18+
# This function will contain a tellraw if the datapack is loaded in the wrong version.
19+
}
20+
13621
dir root {
13722
IF (show_outdated_warning) {
13823
function on_load {
@@ -365,6 +250,11 @@ dir <%export_namespace%> {
365250
storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).<%node.type + '_' + node.safe_name%>
366251
}
367252
}
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
257+
}
368258
execute on passengers run data modify entity @s[type=!marker] start_interpolation set value -1
369259
}
370260
function apply_frame {
@@ -378,6 +268,17 @@ dir <%export_namespace%> {
378268
storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).<%node.type + '_' + node.safe_name%>
379269
}
380270
}
271+
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
281+
}
381282
}
382283
} ELSE {
383284
function set_frame {

0 commit comments

Comments
 (0)