Skip to content

Commit

Permalink
🚧 Squashed v1.6.1
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SnaveSutit committed Jan 11, 2025
1 parent 4482a54 commit 61ff52c
Show file tree
Hide file tree
Showing 18 changed files with 411 additions and 1,026 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"title": "Animated Java",
"icon": "icon.svg",
"description": "A Blockbench plugin that makes complex animation a breeze in Minecraft: Java Edition.",
"version": "1.6.0",
"display_version": "1.6.0",
"version": "1.6.1",
"display_version": "1.6.1",
"min_blockbench_version": "4.11.1",
"variant": "desktop",
"tags": [
Expand Down
30 changes: 26 additions & 4 deletions src/components/changelogDialog.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import changelog from '../pluginPackage/changelog.json'
import AnimatedJavaIcon from '../assets/animated_java_icon.svg'
function formatDateFull(date: string) {
// @ts-expect-error
Expand Down Expand Up @@ -40,10 +41,13 @@
</script>

<div class="content plugin_browser_tabbed_page" id="plugin_browser_changelog">
{#each Object.values(changelog) as versions}
<h3>
{versions.title}
</h3>
{#each Object.values(changelog).reverse() as versions}
<div class="title-container">
<img src={AnimatedJavaIcon} alt="" />
<h3>
{versions.title}
</h3>
</div>
<!-- svelte-ignore a11y-label-has-associated-control -->
<label class="plugin_changelog_author">{versions.author}</label>
<!-- svelte-ignore a11y-label-has-associated-control -->
Expand Down Expand Up @@ -83,4 +87,22 @@
border-radius: 3px;
font-size: 0.8em;
}
img {
border-radius: 4px;
width: 24px;
height: 24px;
margin-left: 0.5px;
box-shadow: 1px 1px 1px #000000aa;
}
.title-container h3 {
margin-left: 8px;
margin-top: 0;
}
.title-container {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
margin-top: 8px;
}
</style>
15 changes: 0 additions & 15 deletions src/interface/animatedJavaBarItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,6 @@ MenuBar.addAction(
MENU_ID + '.animated_java:extract-open'
)

MenuBar.addAction(
createAction(`${PACKAGE.name}:extract`, {
icon: 'fa-trash-can',
category: 'animated_java',
name: translate('action.extract.name'),
condition() {
return Format === BLUEPRINT_FORMAT
},
click() {
void cleanupExportedFiles()
},
}),
MENU.id
)

MenuBar.addAction(
createAction(`${PACKAGE.name}:export`, {
icon: 'insert_drive_file',
Expand Down
2 changes: 1 addition & 1 deletion src/lang/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ animated_java.dialog.about.title: About Animated Java
animated_java.dialog.about.close_button: Close

## Changelog
animated_java.dialog.changelog_dialog.title: Changelog
animated_java.dialog.changelog_dialog.title: Animated Java Changelog

## Unexpected Error Dialog
animated_java.dialog.unexpected_error.title: An Unexpected Error Occurred!
Expand Down
19 changes: 19 additions & 0 deletions src/pluginPackage/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,24 @@
]
}
]
},
"1.6.1": {
"title": "v1.6.1",
"author": "Titus Evans (SnaveSutit)",
"date": "2025-01-10",
"categories": [
{
"title": "Changes",
"list": ["Slightly improved the changelog."]
},
{
"title": "Fixes",
"list": [
"Fixed overlays breaking custom function tags.",
"Fixed [#350](https://github.com/Animated-Java/animated-java/issues/350)",
"Fixed [#353](https://github.com/Animated-Java/animated-java/issues/353)"
]
}
]
}
}
141 changes: 21 additions & 120 deletions src/systems/datapackCompiler/1.20.4/animation.mcb
Original file line number Diff line number Diff line change
@@ -1,128 +1,9 @@
dir global {

function on_load minecraft:load {
# Initialize Scoreboards
scoreboard objectives add <%OBJECTIVES.I()%> dummy
scoreboard objectives add <%OBJECTIVES.ID()%> dummy
scoreboard objectives add <%OBJECTIVES.IS_RIG_LOADED()%> dummy
scoreboard objectives add <%OBJECTIVES.TWEEN_DURATION()%> dummy

scoreboard players add aj.last_id <%OBJECTIVES.ID()%> 0

# Initialize Storage
data modify storage aj:temp args set value {}
IF (show_outdated_warning) {
# Initialize Rigs
scoreboard players reset * <%OBJECTIVES.IS_RIG_LOADED()%>
}
function #*global/on_load
}

function on_tick minecraft:tick {
execute as @e[type=item_display,tag=<%TAGS.GLOBAL_ROOT()%>] at @s run function #*global/root/on_tick
}

tag functions on_load {
*<%export_namespace%>/on_load
}

dir root {
# TODO Maybe instead of merging tags, I should just generate it from the .ajmeta data every time a rig is exported?
# That way I can also check if the rig's files still exist, and remove tag entries if they don't.
# An entry will be added for each exported rig.
tag functions on_tick {
*<%export_namespace%>/root/on_tick
}
# An entry will be added for each exported rig.
IF (show_outdated_warning) {
tag functions on_load {
*<%export_namespace%>/root/on_load
}
}
}

IF (show_function_errors) {
dir errors {
function function_not_executed_as_root_entity {
#ARGS: {export_namespace: string, function_path: string}
$tellraw @a <%TELLRAW.FUNCTION_NOT_EXECUTED_AS_ROOT_ERROR('$(function_path)')%>
}
}
}

dir remove {
# Removes all instances of all rigs from the world.
function everything {
kill @e[tag=<%TAGS.GLOBAL_RIG()%>]
}
}

dir internal {
# Thanks Gibbsly for this code! https://github.com/gibbsly/gu
dir gu {
function load minecraft:load {
scoreboard players set 256 <%OBJECTIVES.I()%> 256
data modify storage aj:uuid main.hex_chars set value \
<%JSON.stringify([...Array(0x100).keys()].map(v => {const x = v.toString(16); return x.length > 1 ? x : '0' + x}))%>
}

function convert_uuid_array_to_string {
#ARGS: {UUID: [int, int, int, int]}

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}
$data modify storage aj:uuid main.in set value $(UUID)

execute store result score 0= <%OBJECTIVES.I()%> store result score 1= <%OBJECTIVES.I()%> run data get storage aj:uuid main.in[0]
execute store result storage aj:uuid temp.0 int 1 run scoreboard players operation 0= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result score 2= <%OBJECTIVES.I()%> run scoreboard players operation 1= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.1 int 1 run scoreboard players operation 1= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result score 3= <%OBJECTIVES.I()%> run scoreboard players operation 2= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.2 int 1 run scoreboard players operation 2= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.3 int 1 run scoreboard players operation 3= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>

execute store result score 0= <%OBJECTIVES.I()%> store result score 1= <%OBJECTIVES.I()%> run data get storage aj:uuid main.in[1]
execute store result storage aj:uuid temp.4 int 1 run scoreboard players operation 0= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result score 2= <%OBJECTIVES.I()%> run scoreboard players operation 1= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.5 int 1 run scoreboard players operation 1= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result score 3= <%OBJECTIVES.I()%> run scoreboard players operation 2= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.6 int 1 run scoreboard players operation 2= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.7 int 1 run scoreboard players operation 3= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>

execute store result score 0= <%OBJECTIVES.I()%> store result score 1= <%OBJECTIVES.I()%> run data get storage aj:uuid main.in[2]
execute store result storage aj:uuid temp.8 int 1 run scoreboard players operation 0= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result score 2= <%OBJECTIVES.I()%> run scoreboard players operation 1= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.9 int 1 run scoreboard players operation 1= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result score 3= <%OBJECTIVES.I()%> run scoreboard players operation 2= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.a int 1 run scoreboard players operation 2= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.b int 1 run scoreboard players operation 3= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>

execute store result score 0= <%OBJECTIVES.I()%> store result score 1= <%OBJECTIVES.I()%> run data get storage aj:uuid main.in[3]
execute store result storage aj:uuid temp.c int 1 run scoreboard players operation 0= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result score 2= <%OBJECTIVES.I()%> run scoreboard players operation 1= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.d int 1 run scoreboard players operation 1= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result score 3= <%OBJECTIVES.I()%> run scoreboard players operation 2= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.e int 1 run scoreboard players operation 2= <%OBJECTIVES.I()%> %= 256 <%OBJECTIVES.I()%>
execute store result storage aj:uuid temp.f int 1 run scoreboard players operation 3= <%OBJECTIVES.I()%> /= 256 <%OBJECTIVES.I()%>

block { with storage aj:uuid temp
REPEAT (0, 15) as i {
$data modify storage aj:uuid temp.<%i.toString(16)%> set from storage aj:uuid main.hex_chars[$(<%i.toString(16)%>)]
}
}

block { with storage aj:uuid temp
$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)"
}
}
}
}
}

dir <%export_namespace%> {
function on_load {
IF (use_storage_for_animation) {
REPEAT (animations) as animation {
data remove storage aj.<%export_namespace%>:animations <%animation.storageSafeName%>
data remove storage aj.<%export_namespace%>:animations <%animation.safe_name%>
}
<%animationStorage.join('\n')%>
}
Expand All @@ -133,6 +14,10 @@ dir <%export_namespace%> {
%%>
}

function invalid_version_warning {
# This function will contain a tellraw if the datapack is loaded in the wrong version.
}

dir root {
IF (show_outdated_warning) {
function on_load {
Expand Down Expand Up @@ -365,6 +250,11 @@ dir <%export_namespace%> {
storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).<%node.type + '_' + node.safe_name%>
}
}
IF (animation.frames.some(v => v.variant)) {
$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
$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
$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
}
execute on passengers run data modify entity @s[type=!marker] start_interpolation set value -1
}
function apply_frame {
Expand All @@ -378,6 +268,17 @@ dir <%export_namespace%> {
storage aj.<%export_namespace%>:animations <%animation.safe_name%>.$(frame).<%node.type + '_' + node.safe_name%>
}
}
IF (animation.frames.some(v => v.variant)) {
$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
$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
$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
}
}
IF (animation.frames.some(v => v.variant)) {
function apply_variant {
#ARGS: {name: string, condition: string}
$execute $(condition)run function *<%export_namespace%>/variants/$(name)/apply
}
}
} ELSE {
function set_frame {
Expand Down
Loading

0 comments on commit 61ff52c

Please sign in to comment.