Skip to content

Commit a9c236f

Browse files
committed
Squashed commit of the following:
commit e3f1d2a Author: SnaveSutit <[email protected]> Date: Sat Jan 11 02:55:06 2025 -0500 🛠️ Fix #356 commit f6c0713 Author: SnaveSutit <[email protected]> Date: Fri Jan 10 21:35:13 2025 -0500 🚧 v1.6.1 commit 779aa54 Author: SnaveSutit <[email protected]> Date: Fri Jan 10 21:35:01 2025 -0500 ✨ Changelog improvements commit b166f91 Author: SnaveSutit <[email protected]> Date: Fri Jan 10 21:14:25 2025 -0500 🛠️ Fix overlays breaking custom function tags commit 9328366 Author: SnaveSutit <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> Date: Wed Jan 8 13:33:09 2025 -0500 🛠️ Add "has_changelog" to plugin packager commit 2af409d Author: SnaveSutit <[email protected]> Date: Wed Jan 8 13:14:16 2025 -0500 ❗ Forgot a changelog item commit 3e2a0c2 Author: SnaveSutit <[email protected]> Date: Wed Jan 8 13:11:09 2025 -0500 🚧 v1.6.0 commit f54f807 Author: SnaveSutit <[email protected]> Date: Wed Jan 8 11:52:58 2025 -0500 🚧 Improved version handling commit 02b1860 Author: SnaveSutit <[email protected]> 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 <[email protected]> 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 <[email protected]> Date: Tue Jan 7 14:28:24 2025 -0500 🚧 Add extraction confirmation commit 0070b9c Author: SnaveSutit <[email protected]> Date: Mon Dec 30 12:35:17 2024 -0500 🛠️ Slightly improved empty JSON text rendering #322 commit 5781f3f Author: SnaveSutit <[email protected]> Date: Mon Dec 30 11:58:35 2024 -0500 🛠️ Fix #342 commit 83acc4f Author: SnaveSutit <[email protected]> Date: Mon Dec 30 11:45:52 2024 -0500 🛠️ Fix #340 commit 339345e Author: SnaveSutit <[email protected]> Date: Mon Dec 30 11:44:04 2024 -0500 🛠️ Fix #343 commit 9912d7c Author: SnaveSutit <[email protected]> Date: Mon Dec 30 11:33:24 2024 -0500 🛠️ Fix #341 commit e3129d1 Author: SnaveSutit <[email protected]> Date: Mon Dec 30 11:30:49 2024 -0500 🛠️ Fix #345 commit 99446a5 Author: SnaveSutit <[email protected]> Date: Mon Dec 30 11:14:42 2024 -0500 🛠️ Fixed #347 commit 89369b1 Author: SnaveSutit <[email protected]> Date: Mon Dec 30 11:06:52 2024 -0500 🛠️ Fix #349 commit a7b1753 Author: SnaveSutit <[email protected]> Date: Mon Dec 30 11:05:09 2024 -0500 🛠️ Fix #348 commit 5d24c77 Author: SnaveSutit <[email protected]> Date: Tue Dec 24 06:07:18 2024 -0500 🚧 Add .mcb file compression. commit d567389 Author: SnaveSutit <[email protected]> Date: Tue Nov 26 17:52:04 2024 -0500 Squashed commit of the following: commit 7aeec46 Author: SnaveSutit <[email protected]> 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 <[email protected]> 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 <[email protected]> Date: Sat Nov 16 11:09:30 2024 -0500 🚧 Enforce Per-Face UV when converting commit d285985 Author: SnaveSutit <[email protected]> Date: Sat Nov 2 17:37:32 2024 -0400 🚧 Squashed v1.5.0, v1.5.1, and v1.5.2. commit bcbb6f8 Author: SnaveSutit <[email protected]> Date: Sat Nov 2 17:33:16 2024 -0400 🛠️ Fix broken asset download on first startup. commit 9a3b525 Author: SnaveSutit <[email protected]> Date: Fri Nov 1 15:08:57 2024 -0400 ✨ Improved tellraw messages commit d8dbdbd Author: SnaveSutit <[email protected]> Date: Wed Oct 30 17:53:35 2024 -0400 Fix production build script issues. commit 2dce027 Author: SnaveSutit <[email protected]> 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 <[email protected]> Date: Wed Oct 23 09:58:02 2024 -0400 🚧 v1.5.1 commit 357bfa2 Author: SnaveSutit <[email protected]> Date: Wed Oct 23 09:57:52 2024 -0400 🛠️ Fix broken passengers from summon tp command commit 7d95287 Author: SnaveSutit <[email protected]> Date: Wed Oct 23 09:58:29 2024 -0400 🚧 Squashed v.1.5.1 commit 66986b7 Author: SnaveSutit <[email protected]> Date: Wed Oct 23 09:58:02 2024 -0400 🚧 v1.5.1 commit 357bfa2 Author: SnaveSutit <[email protected]> Date: Wed Oct 23 09:57:52 2024 -0400 🛠️ Fix broken passengers from summon tp command commit bd7c6b1 Author: SnaveSutit <[email protected]> Date: Sat Nov 9 04:03:22 2024 -0500 ✨ Add a toast notification for invalid cubes commit bcbb6f8 Author: SnaveSutit <[email protected]> Date: Sat Nov 2 17:33:16 2024 -0400 🛠️ Fix broken asset download on first startup. commit 9a3b525 Author: SnaveSutit <[email protected]> Date: Fri Nov 1 15:08:57 2024 -0400 ✨ Improved tellraw messages commit d8dbdbd Author: SnaveSutit <[email protected]> Date: Wed Oct 30 17:53:35 2024 -0400 Fix production build script issues. commit 2dce027 Author: SnaveSutit <[email protected]> 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 <[email protected]> Date: Wed Oct 23 09:58:02 2024 -0400 🚧 v1.5.1 commit 357bfa2 Author: SnaveSutit <[email protected]> Date: Wed Oct 23 09:57:52 2024 -0400 🛠️ Fix broken passengers from summon tp command
1 parent 202e040 commit a9c236f

File tree

10 files changed

+57
-25
lines changed

10 files changed

+57
-25
lines changed

src/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import { TRANSPARENT_TEXTURE, Variant } from './variants'
2424
import './systems/minecraft/registryManager'
2525
import { MINECRAFT_REGISTRY } from './systems/minecraft/registryManager'
2626
import resourcepackCompiler from './systems/resourcepackCompiler'
27-
import { openExportProgressDialog } from './interface/dialog/exportProgress'
27+
import { openExportProgressDialog } from './interface/exportProgressDialog'
2828
import { isDataPackPath, isResourcePackPath, parseResourcePackPath } from './util/minecraftUtil'
2929
import { blueprintSettingErrors } from './blueprintSettings'
30-
import { openUnexpectedErrorDialog } from './interface/dialog/unexpectedError'
30+
import { openUnexpectedErrorDialog } from './interface/unexpectedErrorDialog'
3131
import { BLUEPRINT_CODEC, BLUEPRINT_FORMAT } from './blueprintFormat'
3232
import { TextDisplay } from './outliner/textDisplay'
3333
import { getLatestVersionClientDownloadUrl } from './systems/minecraft/assetManager'
@@ -39,10 +39,11 @@ import { VanillaItemDisplay } from './outliner/vanillaItemDisplay'
3939
import { VanillaBlockDisplay, debugBlockState, debugBlocks } from './outliner/vanillaBlockDisplay'
4040
import { BLOCKSTATE_REGISTRY } from './systems/minecraft/blockstateManager'
4141
import { exportProject } from './systems/exporter'
42-
import { openInstallPopup } from './interface/popup/installed'
42+
import { openBlueprintLoadingDialog } from './interface/blueprintLoadingPopup'
43+
import { openInstallPopup } from './interface/installedPopup'
4344
import { cleanupExportedFiles } from './systems/cleaner'
4445
import mcbFiles from './systems/datapackCompiler/mcbFiles'
45-
import { openChangelogDialog } from './interface/dialog/changelog'
46+
import { openChangelogDialog } from './interface/changelogDialog'
4647

4748
// @ts-ignore
4849
globalThis.AnimatedJava = {
@@ -72,6 +73,7 @@ globalThis.AnimatedJava = {
7273
debugBlockState,
7374
BLOCKSTATE_REGISTRY,
7475
exportProject,
76+
openBlueprintLoadingDialog,
7577
openInstallPopup,
7678
removeCubesAssociatedWithTexture(texture: Texture) {
7779
const cubes = Cube.all.filter(cube =>

src/interface/animatedJavaBarItem.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import { cleanupExportedFiles } from '../systems/cleaner'
55
import { exportProject } from '../systems/exporter'
66
import { createAction, createBarMenu } from '../util/moddingTools'
77
import { translate } from '../util/translation'
8-
import { openAboutDialog } from './dialog/about'
9-
import { openBlueprintSettingsDialog } from './dialog/blueprintSettings'
10-
import { openChangelogDialog } from './dialog/changelog'
8+
import { openAboutDialog } from './aboutDialog'
9+
import { openBlueprintSettingsDialog } from './blueprintSettingsDialog'
10+
import { openChangelogDialog } from './changelogDialog'
1111

1212
function createIconImg() {
1313
const IMG = document.createElement('img')

src/interface/changelogDialog.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import ChangelogDialog from '../components/changelogDialog.svelte'
2+
import { PACKAGE } from '../constants'
3+
import { SvelteDialog } from '../util/svelteDialog'
4+
import { translate } from '../util/translation'
5+
6+
export const DIALOG_ID = `${PACKAGE.name}:animationPropertiesDialog`
7+
8+
export function openChangelogDialog() {
9+
new SvelteDialog({
10+
id: DIALOG_ID,
11+
title: translate('dialog.changelog_dialog.title'),
12+
width: 600,
13+
component: ChangelogDialog,
14+
props: {},
15+
buttons: ['OK!'],
16+
preventKeybinds: true,
17+
}).show()
18+
}

src/outliner/textDisplay.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ import { createAction, createBlockbenchMod } from '../util/moddingTools'
99
import { getVanillaFont } from '../systems/minecraft/fontManager'
1010
import { JsonText } from '../systems/minecraft/jsonText'
1111
import { Valuable } from '../util/stores'
12+
import { toSafeFuntionName } from '../util/minecraftUtil'
1213
import { TextDisplayConfig } from '../nodeConfigs'
13-
import { TEXT_DISPLAY_CONFIG_ACTION } from '../interface/dialog/textDisplayConfig'
14+
import { TEXT_DISPLAY_CONFIG_ACTION } from '../interface/textDisplayConfigDialog'
1415
import { events } from '../util/events'
1516
import { translate } from '../util/translation'
1617
import { ResizableOutlinerElement } from './resizableOutlinerElement'
18+
import { VanillaBlockDisplay } from './vanillaBlockDisplay'
19+
import { VanillaItemDisplay } from './vanillaItemDisplay'
1720
import { sanitizeOutlinerElementName } from './util'
1821

1922
interface TextDisplayOptions {
@@ -289,7 +292,7 @@ export class TextDisplay extends ResizableOutlinerElement {
289292

290293
async waitForReady() {
291294
while (!this.ready) {
292-
await new Promise(resolve => requestAnimationFrame(resolve))
295+
await new Promise(resolve => setTimeout(resolve, 1000 / framespersecond))
293296
}
294297
}
295298

src/outliner/util.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ import { VanillaItemDisplay } from './vanillaItemDisplay'
55

66
export function sanitizeOutlinerElementName(name: string, elementUUID: string): string {
77
name = toSafeFuntionName(name)
8-
const otherNodes: OutlinerElement[] = [
9-
...VanillaBlockDisplay.all.filter(v => v.uuid !== elementUUID),
8+
let otherNodes: OutlinerElement[] = [
9+
...VanillaBlockDisplay.all,
1010
...Group.all,
1111
...TextDisplay.all,
1212
...VanillaItemDisplay.all,
13+
...Locator.all,
1314
]
1415
if (OutlinerElement.types.camera) {
1516
otherNodes.push(...OutlinerElement.types.camera.all)
1617
}
18+
otherNodes = otherNodes.filter(v => v.uuid !== elementUUID)
19+
1720
const otherNames = new Set(otherNodes.map(v => v.name))
1821

1922
if (!otherNames.has(name)) {

src/outliner/vanillaBlockDisplay.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
import { IBlueprintBoneConfigJSON, isCurrentFormat } from '../blueprintFormat'
22
import { PACKAGE } from '../constants'
3-
import { VANILLA_BLOCK_DISPLAY_CONFIG_ACTION } from '../interface/dialog/vanillaBlockDisplayConfig'
3+
import { VANILLA_BLOCK_DISPLAY_CONFIG_ACTION } from '../interface/vanillaBlockDisplayConfigDialog'
44
import { BoneConfig } from '../nodeConfigs'
55
import { getBlockModel } from '../systems/minecraft/blockModelManager'
66
import { BlockStateValue, getBlockState } from '../systems/minecraft/blockstateManager'
77
import { MINECRAFT_REGISTRY } from '../systems/minecraft/registryManager'
88
import { getCurrentVersion } from '../systems/minecraft/versionManager'
99
import { events } from '../util/events'
10-
import { parseBlock } from '../util/minecraftUtil'
10+
import { parseBlock, toSafeFuntionName } from '../util/minecraftUtil'
1111
import { createAction, createBlockbenchMod } from '../util/moddingTools'
1212
import { Valuable } from '../util/stores'
1313
import { translate } from '../util/translation'
1414
import { ResizableOutlinerElement } from './resizableOutlinerElement'
15+
import { TextDisplay } from './textDisplay'
1516
import { sanitizeOutlinerElementName } from './util'
17+
import { VanillaItemDisplay } from './vanillaItemDisplay'
1618

1719
const ERROR_OUTLINE_MATERIAL = Canvas.outlineMaterial.clone()
1820
ERROR_OUTLINE_MATERIAL.color.set('#ff0000')
@@ -110,7 +112,7 @@ export class VanillaBlockDisplay extends ResizableOutlinerElement {
110112

111113
async waitForReady() {
112114
while (!this.ready) {
113-
await new Promise(resolve => requestAnimationFrame(resolve))
115+
await new Promise(resolve => setTimeout(resolve, 1000 / framespersecond))
114116
}
115117
}
116118

src/outliner/vanillaItemDisplay.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
import { IBlueprintBoneConfigJSON, isCurrentFormat } from '../blueprintFormat'
22
import { PACKAGE } from '../constants'
3-
import { VANILLA_ITEM_DISPLAY_CONFIG_ACTION } from '../interface/dialog/vanillaItemDisplayConfig'
3+
import { VANILLA_ITEM_DISPLAY_CONFIG_ACTION } from '../interface/vanillaItemDisplayConfigDialog'
44
import { BoneConfig } from '../nodeConfigs'
55
import { getItemModel } from '../systems/minecraft/itemModelManager'
66
import { MINECRAFT_REGISTRY } from '../systems/minecraft/registryManager'
77
import { getCurrentVersion } from '../systems/minecraft/versionManager'
88
import { events } from '../util/events'
9+
import { toSafeFuntionName } from '../util/minecraftUtil'
910
import { createAction, createBlockbenchMod } from '../util/moddingTools'
1011
import { Valuable } from '../util/stores'
1112
import { translate } from '../util/translation'
1213
import { ResizableOutlinerElement } from './resizableOutlinerElement'
14+
import { TextDisplay } from './textDisplay'
1315
import { sanitizeOutlinerElementName } from './util'
16+
import { VanillaBlockDisplay } from './vanillaBlockDisplay'
1417

1518
interface VanillaItemDisplayOptions {
1619
name?: string
@@ -118,7 +121,7 @@ export class VanillaItemDisplay extends ResizableOutlinerElement {
118121

119122
async waitForReady() {
120123
while (!this.ready) {
121-
await new Promise(resolve => requestAnimationFrame(resolve))
124+
await new Promise(resolve => setTimeout(resolve, 1000 / framespersecond))
122125
}
123126
}
124127

src/systems/datapackCompiler/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
parseResourceLocation,
2323
} from '../../util/minecraftUtil'
2424
import { JsonText } from '../minecraft/jsonText'
25-
import { MAX_PROGRESS, PROGRESS, PROGRESS_DESCRIPTION } from '../../interface/dialog/exportProgress'
25+
import { MAX_PROGRESS, PROGRESS, PROGRESS_DESCRIPTION } from '../../interface/exportProgressDialog'
2626
import { eulerFromQuaternion, floatToHex, roundTo, tinycolorToDecimal } from '../../util/misc'
2727
import { MSLimiter } from '../../util/msLimiter'
2828
import { compile } from './compiler'
@@ -344,8 +344,7 @@ async function generateRootEntityPassengers(rig: IRenderedRig, rigHash: string)
344344
break
345345
}
346346
case '1.20.5':
347-
case '1.21.0':
348-
case '1.21.2': {
347+
case '1.21.0': {
349348
item.set(
350349
'components',
351350
new NbtCompound().set(
@@ -356,6 +355,7 @@ async function generateRootEntityPassengers(rig: IRenderedRig, rigHash: string)
356355
item.set('count', new NbtInt(1))
357356
break
358357
}
358+
case '1.21.2':
359359
case '1.21.4': {
360360
item.set(
361361
'components',

src/systems/resourcepackCompiler/1.21.4.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MAX_PROGRESS, PROGRESS, PROGRESS_DESCRIPTION } from '../../interface/dialog/exportProgress'
1+
import { MAX_PROGRESS, PROGRESS, PROGRESS_DESCRIPTION } from '../../interface/exportProgressDialog'
22
import { isResourcePackPath, toSafeFuntionName } from '../../util/minecraftUtil'
33
import { TRANSPARENT_TEXTURE, Variant } from '../../variants'
44
import { IntentionalExportError } from '../exporter'
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import _1_20_4 from './1.20.4'
1+
import _1_20_5 from './1.21.1'
2+
import _1_21_2 from './1.21.2'
23
import _1_21_4 from './1.21.4'
34

45
export default {
5-
'1.20.4': _1_20_4,
6-
'1.20.5': _1_20_4,
7-
'1.21.0': _1_20_4,
8-
'1.21.2': _1_20_4,
6+
'1.20.4': _1_20_5,
7+
'1.20.5': _1_20_5,
8+
'1.21.0': _1_20_5,
9+
'1.21.2': _1_21_2,
910
'1.21.4': _1_21_4,
1011
}

0 commit comments

Comments
 (0)