Skip to content

Commit 37414fe

Browse files
authored
🔀 Merge #458: 🔖 v1.8.0-beta.3
### Fixes - Fixed On-Summon Functions and On-Apply Functions not functioning.
2 parents b6571c5 + ec7a8bc commit 37414fe

File tree

12 files changed

+152
-8
lines changed

12 files changed

+152
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"title": "Animated Java",
55
"icon": "icon.svg",
66
"description": "Effortlessly craft complex animations for Minecraft: Java Edition",
7-
"version": "1.8.0-beta.2",
7+
"version": "1.8.0-beta.3",
88
"min_blockbench_version": "4.12.0",
99
"max_blockbench_version": "4.12.6",
1010
"variant": "desktop",

src/pluginPackage/changelog.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,5 +379,16 @@
379379
]
380380
}
381381
]
382+
},
383+
"1.8.0-beta.3": {
384+
"title": "v1.8.0-beta.3",
385+
"author": "Titus Evans (SnaveSutit)",
386+
"date": "2025-10-15",
387+
"categories": [
388+
{
389+
"title": "Fixes",
390+
"list": ["Fixed On-Summon Functions and On-Apply Functions not functioning."]
391+
}
392+
]
382393
}
383394
}

src/systems/datapackCompiler/1.20.4/animation.mcb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,16 @@ function summon {
695695
}
696696
}
697697

698+
REPEAT (Object.values(rig.nodes).filter(node => BONE_TYPES.includes(node.type) && node.on_summon_function?.trim())) as node {
699+
execute \
700+
on passengers if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
701+
run block node_on_summon_<%node.storage_name%> {
702+
<%%
703+
emit.mcb(node.on_summon_function.trim())
704+
%%>
705+
}
706+
}
707+
698708
IF (on_summon_function) {
699709
execute at @s run block rig_on_summon {
700710
<%%
@@ -989,6 +999,7 @@ IF (Object.keys(rig.variants).length > 1) {
989999
execute \
9901000
on passengers \
9911001
if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
1002+
at @s \
9921003
run \
9931004
block zzz/apply_to_node_<%node.storage_name%> {
9941005
IF (node.type === 'bone' && variant.models[node.uuid] !== undefined) {
@@ -1006,6 +1017,11 @@ IF (Object.keys(rig.variants).length > 1) {
10061017
IF (!global.config.isDefault()) {
10071018
data merge entity @s <%global.config.toNBT(undefined, variant.is_default)%>
10081019
}
1020+
IF (global.config.onApplyFunction) {
1021+
<%%
1022+
emit.mcb(global.config.onApplyFunction)
1023+
%%>
1024+
}
10091025
}
10101026
}
10111027
}

src/systems/datapackCompiler/1.20.4/static.mcb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,16 @@ function summon {
276276
}
277277
}
278278

279+
REPEAT (Object.values(rig.nodes).filter(node => BONE_TYPES.includes(node.type) && node.on_summon_function?.trim())) as node {
280+
execute \
281+
on passengers if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
282+
run block node_on_summon_<%node.storage_name%> {
283+
<%%
284+
emit.mcb(node.on_summon_function.trim())
285+
%%>
286+
}
287+
}
288+
279289
IF (on_summon_function) {
280290
execute at @s run block rig_on_summon {
281291
<%%
@@ -570,6 +580,7 @@ IF (Object.keys(rig.variants).length > 1) {
570580
execute \
571581
on passengers \
572582
if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
583+
at @s \
573584
run \
574585
block zzz/apply_to_node_<%node.storage_name%> {
575586
IF (node.type === 'bone' && variant.models[node.uuid] !== undefined) {
@@ -587,6 +598,11 @@ IF (Object.keys(rig.variants).length > 1) {
587598
IF (!global.config.isDefault()) {
588599
data merge entity @s <%global.config.toNBT(undefined, variant.is_default)%>
589600
}
601+
IF (global.config.onApplyFunction) {
602+
<%%
603+
emit.mcb(global.config.onApplyFunction)
604+
%%>
605+
}
590606
}
591607
}
592608
}

src/systems/datapackCompiler/1.20.5/animation.mcb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,16 @@ function summon {
695695
}
696696
}
697697

698+
REPEAT (Object.values(rig.nodes).filter(node => BONE_TYPES.includes(node.type) && node.on_summon_function?.trim())) as node {
699+
execute \
700+
on passengers if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
701+
run block node_on_summon_<%node.storage_name%> {
702+
<%%
703+
emit.mcb(node.on_summon_function.trim())
704+
%%>
705+
}
706+
}
707+
698708
IF (on_summon_function) {
699709
execute at @s run block rig_on_summon {
700710
<%%
@@ -989,6 +999,7 @@ IF (Object.keys(rig.variants).length > 1) {
989999
execute \
9901000
on passengers \
9911001
if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
1002+
at @s \
9921003
run \
9931004
block zzz/apply_to_node_<%node.storage_name%> {
9941005
IF (node.type === 'bone' && variant.models[node.uuid] !== undefined) {
@@ -1006,6 +1017,11 @@ IF (Object.keys(rig.variants).length > 1) {
10061017
IF (!global.config.isDefault()) {
10071018
data merge entity @s <%global.config.toNBT(undefined, variant.is_default)%>
10081019
}
1020+
IF (global.config.onApplyFunction) {
1021+
<%%
1022+
emit.mcb(global.config.onApplyFunction)
1023+
%%>
1024+
}
10091025
}
10101026
}
10111027
}

src/systems/datapackCompiler/1.20.5/static.mcb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,16 @@ function summon {
276276
}
277277
}
278278

279+
REPEAT (Object.values(rig.nodes).filter(node => BONE_TYPES.includes(node.type) && node.on_summon_function?.trim())) as node {
280+
execute \
281+
on passengers if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
282+
run block node_on_summon_<%node.storage_name%> {
283+
<%%
284+
emit.mcb(node.on_summon_function.trim())
285+
%%>
286+
}
287+
}
288+
279289
IF (on_summon_function) {
280290
execute at @s run block rig_on_summon {
281291
<%%
@@ -570,6 +580,7 @@ IF (Object.keys(rig.variants).length > 1) {
570580
execute \
571581
on passengers \
572582
if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
583+
at @s \
573584
run \
574585
block zzz/apply_to_node_<%node.storage_name%> {
575586
IF (node.type === 'bone' && variant.models[node.uuid] !== undefined) {
@@ -587,6 +598,11 @@ IF (Object.keys(rig.variants).length > 1) {
587598
IF (!global.config.isDefault()) {
588599
data merge entity @s <%global.config.toNBT(undefined, variant.is_default)%>
589600
}
601+
IF (global.config.onApplyFunction) {
602+
<%%
603+
emit.mcb(global.config.onApplyFunction)
604+
%%>
605+
}
590606
}
591607
}
592608
}

src/systems/datapackCompiler/1.21.2/animation.mcb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,16 @@ function summon {
695695
}
696696
}
697697

698+
REPEAT (Object.values(rig.nodes).filter(node => BONE_TYPES.includes(node.type) && node.on_summon_function?.trim())) as node {
699+
execute \
700+
on passengers if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
701+
run block node_on_summon_<%node.storage_name%> {
702+
<%%
703+
emit.mcb(node.on_summon_function.trim())
704+
%%>
705+
}
706+
}
707+
698708
IF (on_summon_function) {
699709
execute at @s run block rig_on_summon {
700710
<%%
@@ -989,6 +999,7 @@ IF (Object.keys(rig.variants).length > 1) {
989999
execute \
9901000
on passengers \
9911001
if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
1002+
at @s \
9921003
run \
9931004
block zzz/apply_to_node_<%node.storage_name%> {
9941005
IF (node.type === 'bone' && variant.models[node.uuid] !== undefined) {
@@ -1006,6 +1017,11 @@ IF (Object.keys(rig.variants).length > 1) {
10061017
IF (!global.config.isDefault()) {
10071018
data merge entity @s <%global.config.toNBT(undefined, variant.is_default)%>
10081019
}
1020+
IF (global.config.onApplyFunction) {
1021+
<%%
1022+
emit.mcb(global.config.onApplyFunction)
1023+
%%>
1024+
}
10091025
}
10101026
}
10111027
}

src/systems/datapackCompiler/1.21.2/static.mcb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,16 @@ function summon {
276276
}
277277
}
278278

279+
REPEAT (Object.values(rig.nodes).filter(node => BONE_TYPES.includes(node.type) && node.on_summon_function?.trim())) as node {
280+
execute \
281+
on passengers if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
282+
run block node_on_summon_<%node.storage_name%> {
283+
<%%
284+
emit.mcb(node.on_summon_function.trim())
285+
%%>
286+
}
287+
}
288+
279289
IF (on_summon_function) {
280290
execute at @s run block rig_on_summon {
281291
<%%
@@ -570,6 +580,7 @@ IF (Object.keys(rig.variants).length > 1) {
570580
execute \
571581
on passengers \
572582
if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
583+
at @s \
573584
run \
574585
block zzz/apply_to_node_<%node.storage_name%> {
575586
IF (node.type === 'bone' && variant.models[node.uuid] !== undefined) {
@@ -587,6 +598,11 @@ IF (Object.keys(rig.variants).length > 1) {
587598
IF (!global.config.isDefault()) {
588599
data merge entity @s <%global.config.toNBT(undefined, variant.is_default)%>
589600
}
601+
IF (global.config.onApplyFunction) {
602+
<%%
603+
emit.mcb(global.config.onApplyFunction)
604+
%%>
605+
}
590606
}
591607
}
592608
}

src/systems/datapackCompiler/1.21.4/animation.mcb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,16 @@ function summon {
695695
}
696696
}
697697

698+
REPEAT (Object.values(rig.nodes).filter(node => BONE_TYPES.includes(node.type) && node.on_summon_function?.trim())) as node {
699+
execute \
700+
on passengers if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
701+
run block node_on_summon_<%node.storage_name%> {
702+
<%%
703+
emit.mcb(node.on_summon_function.trim())
704+
%%>
705+
}
706+
}
707+
698708
IF (on_summon_function) {
699709
execute at @s run block rig_on_summon {
700710
<%%
@@ -989,6 +999,7 @@ IF (Object.keys(rig.variants).length > 1) {
989999
execute \
9901000
on passengers \
9911001
if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
1002+
at @s \
9921003
run \
9931004
block zzz/apply_to_node_<%node.storage_name%> {
9941005
IF (node.type === 'bone' && variant.models[node.uuid] !== undefined) {
@@ -1006,6 +1017,11 @@ IF (Object.keys(rig.variants).length > 1) {
10061017
IF (!global.config.isDefault()) {
10071018
data merge entity @s <%global.config.toNBT(undefined, variant.is_default)%>
10081019
}
1020+
IF (global.config.onApplyFunction) {
1021+
<%%
1022+
emit.mcb(global.config.onApplyFunction)
1023+
%%>
1024+
}
10091025
}
10101026
}
10111027
}

src/systems/datapackCompiler/1.21.4/static.mcb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,16 @@ function summon {
276276
}
277277
}
278278

279+
REPEAT (Object.values(rig.nodes).filter(node => BONE_TYPES.includes(node.type) && node.on_summon_function?.trim())) as node {
280+
execute \
281+
on passengers if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
282+
run block node_on_summon_<%node.storage_name%> {
283+
<%%
284+
emit.mcb(node.on_summon_function.trim())
285+
%%>
286+
}
287+
}
288+
279289
IF (on_summon_function) {
280290
execute at @s run block rig_on_summon {
281291
<%%
@@ -570,6 +580,7 @@ IF (Object.keys(rig.variants).length > 1) {
570580
execute \
571581
on passengers \
572582
if entity @s[tag=<%TAGS.PROJECT_NODE_NAMED(export_namespace, node.storage_name)%>] \
583+
at @s \
573584
run \
574585
block zzz/apply_to_node_<%node.storage_name%> {
575586
IF (node.type === 'bone' && variant.models[node.uuid] !== undefined) {
@@ -587,6 +598,11 @@ IF (Object.keys(rig.variants).length > 1) {
587598
IF (!global.config.isDefault()) {
588599
data merge entity @s <%global.config.toNBT(undefined, variant.is_default)%>
589600
}
601+
IF (global.config.onApplyFunction) {
602+
<%%
603+
emit.mcb(global.config.onApplyFunction)
604+
%%>
605+
}
590606
}
591607
}
592608
}

0 commit comments

Comments
 (0)