From da86a6c20141e4da4f42045ae1a852c2fcbb4bf7 Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Wed, 24 Jun 2026 09:50:44 -0400 Subject: [PATCH 01/19] =?UTF-8?q?=F0=9F=A9=B9=20Update=20release=20notes?= =?UTF-8?q?=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../releaseNoteTemplates/discord_release_notes_template | 7 +++---- .../releaseNoteTemplates/github_release_notes_template | 7 +++---- bun.lock | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.scripts/plugins/releaseNoteTemplates/discord_release_notes_template b/.scripts/plugins/releaseNoteTemplates/discord_release_notes_template index 747f9d28..353e14bf 100644 --- a/.scripts/plugins/releaseNoteTemplates/discord_release_notes_template +++ b/.scripts/plugins/releaseNoteTemplates/discord_release_notes_template @@ -6,9 +6,8 @@ ## How to Install -For now, you can download and install the latest build of AJ [here](https://builds.animated-java.dev/latest) or install it via this link: -https://builds.animated-java.dev/latest/download/animated_java.js -Once [this PR](https://github.com/JannisX11/blockbench-plugins/pull/{pr_number}) has been merged, you can install the latest release of AJ from the Blockbench plugin list. -[Follow this tutorial](https://animated-java.github.io/docs/getting-started/installing-animated-java) if you don't know how to install plugins in Blockbench. +Download `animated_java.js` from the [release page](), then [Follow this tutorial]() + +Once [this PR]() has been merged, you can install the latest release of AJ directly from the Blockbench plugin list. -# {pings} diff --git a/.scripts/plugins/releaseNoteTemplates/github_release_notes_template b/.scripts/plugins/releaseNoteTemplates/github_release_notes_template index 87690e56..c26f0d77 100644 --- a/.scripts/plugins/releaseNoteTemplates/github_release_notes_template +++ b/.scripts/plugins/releaseNoteTemplates/github_release_notes_template @@ -4,7 +4,6 @@ ## How to Install -For now, you can download and install the latest build of AJ [here](https://builds.animated-java.dev/latest) or install it via this link: -https://builds.animated-java.dev/latest/download/animated_java.js -Once [this PR](https://github.com/JannisX11/blockbench-plugins/pull/{pr_number}) has been merged, you can install the latest release of AJ from the Blockbench plugin list. -[Follow this tutorial](https://animated-java.github.io/docs/getting-started/installing-animated-java) if you don't know how to install plugins in Blockbench. +Download `animated_java.js` from the [release page](https://github.com/Animated-Java/animated-java/releases/tag/v1.10.1), then [Follow this tutorial](https://animated-java.dev/docs/getting-started/installing#advanced-installation-url) + +Once [this PR](https://github.com/JannisX11/blockbench-plugins/pull/930) has been merged, you can install the latest release of AJ directly from the Blockbench plugin list. diff --git a/bun.lock b/bun.lock index ed4cbd80..0a05cac1 100644 --- a/bun.lock +++ b/bun.lock @@ -37,7 +37,7 @@ "firebase": "^9.19.0", "jiti": "^2.6.1", "js-yaml": "^4.1.0", - "mc-build": "^4.1.2", + "mc-build": "^4.1.3", "node-modules-vscode-problems-patch": "^1.0.9", "octokit": "^5.0.3", "prettier": "^3.8.2", @@ -829,7 +829,7 @@ "matcher": ["matcher@3.0.0", "", { "dependencies": { "escape-string-regexp": "^4.0.0" } }, "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng=="], - "mc-build": ["mc-build@4.1.2", "", { "bin": { "mcb3": "dist/mcb.js", "mc-build": "dist/mcb.js", "mcb": "dist/mcb.js" } }, "sha512-C/Su40vSUn2IPtbtLPzkQXUUiv2ATCOwvkE4dE4JhORIWM6qTWHwCZlABeqpegcjRvR6PuqWQeyqd2cVeCW8BQ=="], + "mc-build": ["mc-build@4.1.3", "", { "bin": { "mcb3": "dist/mcb.js", "mc-build": "dist/mcb.js", "mcb": "dist/mcb.js" } }, "sha512-toWLAGIkd69Dc5V+RnTtuZQJkyFYR9H7rLWHMN3+e/0lIWp/srJZalE2qTVS1+HHdbMaq1iKtBADW0rW9JbAnQ=="], "md5": ["md5@2.3.0", "", { "dependencies": { "charenc": "0.0.2", "crypt": "0.0.2", "is-buffer": "~1.1.6" } }, "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g=="], From 68a265478ca210fa42a16557996d8625aaeb43ce Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Wed, 24 Jun 2026 09:51:17 -0400 Subject: [PATCH 02/19] =?UTF-8?q?=F0=9F=90=9B=20Disable=20DisplayEntityCon?= =?UTF-8?q?fig=20on=20Structure=20Groups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../displayEntityConfig/displayEntityConfig.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/dialogs/displayEntityConfig/displayEntityConfig.ts b/src/dialogs/displayEntityConfig/displayEntityConfig.ts index 5e6520a7..23c2a301 100644 --- a/src/dialogs/displayEntityConfig/displayEntityConfig.ts +++ b/src/dialogs/displayEntityConfig/displayEntityConfig.ts @@ -13,7 +13,7 @@ export type DisplayEntity = Group | TextDisplay | VanillaItemDisplay | VanillaBl function isDisplayEntity(object: any): object is DisplayEntity { return ( - object instanceof Group || + (object instanceof Group && object.children.some(child => child instanceof Cube)) || object instanceof TextDisplay || object instanceof VanillaItemDisplay || object instanceof VanillaBlockDisplay @@ -58,8 +58,11 @@ const COPY_DISPLAY_ENTITY_CONFIG_ACTION = registerDeletableHandlerPatch({ return new Blockbench.Action(`animated_java:action/copy-display-entity-config`, { icon: 'content_copy', name: translate('action.copy_display_entity_config.name'), + condition: () => + activeProjectIsBlueprintFormat() && + isDisplayEntity(Group.first_selected ?? Outliner.selected.at(0)), click: () => { - const displayEntity = Group.first_selected ?? selected.at(0) + const displayEntity = Group.first_selected ?? Outliner.selected.at(0) if (isDisplayEntity(displayEntity)) { clipboard = { sourceName: displayEntity.name, @@ -85,7 +88,10 @@ const PASTE_DISPLAY_ENTITY_CONFIG_ACTION = registerDeletableHandlerPatch({ return new Blockbench.Action(`animated_java:action/paste-display-entity-config`, { icon: 'content_paste', name: translate('action.paste_display_entity_config.name'), - condition: () => !!clipboard && activeProjectIsBlueprintFormat(), + condition: () => + !!clipboard && + activeProjectIsBlueprintFormat() && + isDisplayEntity(Group.first_selected ?? Outliner.selected.at(0)), click: () => { if (!clipboard) return const displayEntity = Group.first_selected ?? selected.at(0) @@ -127,7 +133,9 @@ export const DISPLAY_ENTITY_CONFIG_ACTION = registerDeletableHandlerPatch({ const action = new Blockbench.Action(`animated_java:action/open-display-entity-config`, { icon: 'settings', name: translate('action.open_display_entity_config.name'), - condition: activeProjectIsBlueprintFormat, + condition: () => + activeProjectIsBlueprintFormat() && + isDisplayEntity(Group.first_selected ?? Outliner.selected.at(0)), click: () => { const displayEntity = Group.first_selected ?? selected.at(0) if (isDisplayEntity(displayEntity)) { From 6df482275c615fe6581ec8106ce064521aa9a63b Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Wed, 24 Jun 2026 09:51:40 -0400 Subject: [PATCH 03/19] =?UTF-8?q?=E2=9C=A8=20Add=20textBox=20DilaogItem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../displayEntityConfig.svelte | 2 -- .../dialogItems/baseDialogItem.svelte | 16 +++++----- .../dialogItems/textBox.svelte | 32 +++++++++++++++++++ 3 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 src/svelteComponents/dialogItems/textBox.svelte diff --git a/src/dialogs/displayEntityConfig/displayEntityConfig.svelte b/src/dialogs/displayEntityConfig/displayEntityConfig.svelte index fc69db0e..fe929e69 100644 --- a/src/dialogs/displayEntityConfig/displayEntityConfig.svelte +++ b/src/dialogs/displayEntityConfig/displayEntityConfig.svelte @@ -134,8 +134,6 @@
- - void + onReset?: () => void children?: import('svelte').Snippet<[any]> } let { - label, tooltip = '', warningText = $bindable(''), errorText = $bindable(''), @@ -48,11 +46,13 @@
- + {#if onReset} + + {/if} diff --git a/src/svelteComponents/dialogItems/textBox.svelte b/src/svelteComponents/dialogItems/textBox.svelte new file mode 100644 index 00000000..6ca974ae --- /dev/null +++ b/src/svelteComponents/dialogItems/textBox.svelte @@ -0,0 +1,32 @@ + + + + {#snippet children({ id })} +
+ +

{@html text}

+
+ {/snippet} +
+ + From 5478a7d053f632be6058848a416379ff1cd04f54 Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Wed, 24 Jun 2026 09:51:57 -0400 Subject: [PATCH 04/19] =?UTF-8?q?=F0=9F=A9=B9=20Remove=20debugger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 914058a3..6f56deb3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -4,7 +4,6 @@ export const PACKAGE: typeof PACKAGEJSON = PACKAGEJSON let cachedFsModule: ScopedFS | null = null export function getFsModule() { - debugger cachedFsModule ??= requireNativeModule('fs', { message: localize('require.fs'), optional: false, From 0163bc5e0ee489bc7163ed90f6e4453d019bed7e Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Wed, 24 Jun 2026 11:22:12 -0400 Subject: [PATCH 05/19] =?UTF-8?q?=E2=9C=A8=20Rework=20DisplayEntityConfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../displayEntityConfig.ts | 54 +++-- .../displayEntityConfig/pages/general.svelte | 29 +++ .../pages/perVariant.svelte | 218 ++++++++++++++++++ src/lang/en.yml | 35 ++- .../sidebarDialogItems/select.svelte | 55 +++++ 5 files changed, 351 insertions(+), 40 deletions(-) create mode 100644 src/dialogs/displayEntityConfig/pages/general.svelte create mode 100644 src/dialogs/displayEntityConfig/pages/perVariant.svelte create mode 100644 src/svelteComponents/sidebarDialogItems/select.svelte diff --git a/src/dialogs/displayEntityConfig/displayEntityConfig.ts b/src/dialogs/displayEntityConfig/displayEntityConfig.ts index 23c2a301..605fcdb7 100644 --- a/src/dialogs/displayEntityConfig/displayEntityConfig.ts +++ b/src/dialogs/displayEntityConfig/displayEntityConfig.ts @@ -1,13 +1,13 @@ import { registerDeletableHandlerPatch } from 'blockbench-patch-manager' -import { observable } from 'svelte-observable-store' -import { SvelteDialog } from 'svelte-patching-tools/blockbench' +import { SvelteDialogSidebar } from 'svelte-patching-tools/blockbench' import { activeProjectIsBlueprintFormat } from '../../formats/blueprint' import { TextDisplay } from '../../outliner/textDisplay' import { VanillaBlockDisplay } from '../../outliner/vanillaBlockDisplay' import { VanillaItemDisplay } from '../../outliner/vanillaItemDisplay' import { type IDisplayEntityConfigs } from '../../systems/rigRenderer' -import { localize as translate } from '../../util/lang' -import DisplayEntityConfigDialog from './displayEntityConfig.svelte' +import { localize } from '../../util/lang' +import GeneralPage from './pages/general.svelte' +import PerVariantPage from './pages/perVariant.svelte' export type DisplayEntity = Group | TextDisplay | VanillaItemDisplay | VanillaBlockDisplay @@ -21,28 +21,26 @@ function isDisplayEntity(object: any): object is DisplayEntity { } export function openDisplayEntityConfigDialog(displayEntity: DisplayEntity) { - const onSummonFunction = observable(displayEntity.onSummonFunction ?? '') - const configs = structuredClone(displayEntity.configs) - - new SvelteDialog({ + new SvelteDialogSidebar({ id: `animated_java:displayEntityConfig`, - title: translate('dialog.display_entity.title', displayEntity.name), - width: 800, - component: DisplayEntityConfigDialog, - props: { - displayEntity, - onSummonFunction, - configs, + title: localize('dialog.display_entity.title', displayEntity.name), + width: 1024, + pages: { + general: { + label: localize('dialog.display_entity.pages.general.title'), + icon: 'settings', + component: GeneralPage, + props: { displayEntity }, + }, + per_variant: { + label: localize('dialog.display_entity.pages.per_variant.title'), + icon: 'view_list', + component: PerVariantPage, + props: { displayEntity }, + }, }, + buttons: [tl('dialog.close')], disableKeybinds: true, - onConfirm() { - console.log('Saving display entity config for', displayEntity.name, configs) - - displayEntity.onSummonFunction = onSummonFunction.get().trim() - displayEntity.configs = configs - - Project!.saved = false - }, }).show() } @@ -57,7 +55,7 @@ const COPY_DISPLAY_ENTITY_CONFIG_ACTION = registerDeletableHandlerPatch({ create() { return new Blockbench.Action(`animated_java:action/copy-display-entity-config`, { icon: 'content_copy', - name: translate('action.copy_display_entity_config.name'), + name: localize('action.copy_display_entity_config.name'), condition: () => activeProjectIsBlueprintFormat() && isDisplayEntity(Group.first_selected ?? Outliner.selected.at(0)), @@ -70,7 +68,7 @@ const COPY_DISPLAY_ENTITY_CONFIG_ACTION = registerDeletableHandlerPatch({ configs: structuredClone(displayEntity.configs), } Blockbench.showQuickMessage( - translate('action.copy_display_entity_config.message', clipboard.sourceName) + localize('action.copy_display_entity_config.message', clipboard.sourceName) ) } else { console.error( @@ -87,7 +85,7 @@ const PASTE_DISPLAY_ENTITY_CONFIG_ACTION = registerDeletableHandlerPatch({ create() { return new Blockbench.Action(`animated_java:action/paste-display-entity-config`, { icon: 'content_paste', - name: translate('action.paste_display_entity_config.name'), + name: localize('action.paste_display_entity_config.name'), condition: () => !!clipboard && activeProjectIsBlueprintFormat() && @@ -103,7 +101,7 @@ const PASTE_DISPLAY_ENTITY_CONFIG_ACTION = registerDeletableHandlerPatch({ } displayEntity.onSummonFunction = clipboard.onSummonFunction displayEntity.configs = structuredClone(clipboard.configs) - const message = translate( + const message = localize( 'action.paste_display_entity_config.message', clipboard.sourceName ) @@ -132,7 +130,7 @@ export const DISPLAY_ENTITY_CONFIG_ACTION = registerDeletableHandlerPatch({ create() { const action = new Blockbench.Action(`animated_java:action/open-display-entity-config`, { icon: 'settings', - name: translate('action.open_display_entity_config.name'), + name: localize('action.open_display_entity_config.name'), condition: () => activeProjectIsBlueprintFormat() && isDisplayEntity(Group.first_selected ?? Outliner.selected.at(0)), diff --git a/src/dialogs/displayEntityConfig/pages/general.svelte b/src/dialogs/displayEntityConfig/pages/general.svelte new file mode 100644 index 00000000..e725f50d --- /dev/null +++ b/src/dialogs/displayEntityConfig/pages/general.svelte @@ -0,0 +1,29 @@ + + + diff --git a/src/dialogs/displayEntityConfig/pages/perVariant.svelte b/src/dialogs/displayEntityConfig/pages/perVariant.svelte new file mode 100644 index 00000000..df1905b5 --- /dev/null +++ b/src/dialogs/displayEntityConfig/pages/perVariant.svelte @@ -0,0 +1,218 @@ + + + + +
+ + +
+ + + + + + + + {#if overrideBrightness} + + + + {/if} + + {#if !(displayEntity instanceof TextDisplay)} + + + + + + + + {/if} + + + + +
+ + diff --git a/src/lang/en.yml b/src/lang/en.yml index d16c7550..b967709e 100644 --- a/src/lang/en.yml +++ b/src/lang/en.yml @@ -432,10 +432,17 @@ animated_java: display_entity: title: Display Entity Config for "%s" - node_options: - title: Node - per_variant_options: - title: Per-Variant + pages: + general.title: General + per_variant.title: Per-Variant + + variant: + title: Target Variant + description: |- + [Markdown] + The variant to configure the display entity for. + + This allows you to have different display entity settings for each variant. on_summon_function: title: On-Summon Function description: |- @@ -508,15 +515,19 @@ animated_java: description: |- [Markdown] Controls if this nodes model should pivot to face player when rendered. - - **Fixed**: Both vertical and horizontal angles are fixed. - - **Vertical**: Pivots around vertical axis. - - **Horizontal**: Pivots around horizontal axis. - - **Center**: Pivots around center point. options: - fixed: Fixed - vertical: Vertical - horizontal: Horizontal - center: Center + fixed: + label: Fixed + description: Do not pivot to face the player. + vertical: + label: Vertical + description: Pivot around the vertical axis to face the player. + horizontal: + label: Horizontal + description: Pivot around the horizontal axis to face the player. + center: + label: Center + description: Pivot around both the vertical and horizontal axes to face the player. locator_config: title: Locator Config plugin_mode_warning: |- diff --git a/src/svelteComponents/sidebarDialogItems/select.svelte b/src/svelteComponents/sidebarDialogItems/select.svelte new file mode 100644 index 00000000..b3716225 --- /dev/null +++ b/src/svelteComponents/sidebarDialogItems/select.svelte @@ -0,0 +1,55 @@ + + + + + + {#snippet inlineChildren()} +
+
+ {/snippet} +
+ + From 30f86b2cbe8ddaf427e54897476017686593986c Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Wed, 24 Jun 2026 11:56:39 -0400 Subject: [PATCH 06/19] =?UTF-8?q?=F0=9F=90=9B=20Fix=20outdated=20rig=20war?= =?UTF-8?q?ning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapackCompiler/1.20.4/global.mcb | 22 ++++++++++++++----- src/systems/datapackCompiler/1.20.4/main.mcb | 6 +++++ src/systems/datapackCompiler/1.20.5/main.mcb | 6 +++++ .../datapackCompiler/1.21.0/global.mcb | 22 ++++++++++++++----- src/systems/datapackCompiler/1.21.0/main.mcb | 6 +++++ src/systems/datapackCompiler/1.21.2/main.mcb | 6 +++++ src/systems/datapackCompiler/1.21.4/main.mcb | 6 +++++ .../datapackCompiler/1.21.5/global.mcb | 22 ++++++++++++++----- src/systems/datapackCompiler/1.21.5/main.mcb | 6 +++++ src/systems/datapackCompiler/26.2/global.mcb | 22 ++++++++++++++----- src/systems/datapackCompiler/tellraw.ts | 16 +++++++++----- 11 files changed, 114 insertions(+), 26 deletions(-) diff --git a/src/systems/datapackCompiler/1.20.4/global.mcb b/src/systems/datapackCompiler/1.20.4/global.mcb index ecac0c6b..7a33de9f 100644 --- a/src/systems/datapackCompiler/1.20.4/global.mcb +++ b/src/systems/datapackCompiler/1.20.4/global.mcb @@ -31,10 +31,10 @@ dir global { dir root { function on_tick { + data_manager prep read IF (debug_mode) { execute unless score @s <%OBJECTIVES.IS_RIG_LOADED()%> matches 1 run function *global/root/on_load } - data_manager prep read function *global/root/run_project_tick with storage <%temp_storage%> entry.data } @@ -62,11 +62,23 @@ dir global { # Overwrite the rig hash so the warning doesn't show again. data modify storage <%temp_storage%> entry.data.rig_hash set value '<%rig_hash%>' data_manager write + block run_print { with storage <%temp_storage%> entry.data + $function $(blueprint_id)/zzz/outdated_rig_warning with storage <%temp_storage%> args + } - block print { with storage <%temp_storage%> args - $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + # Loop over rig entities and glow them red. + data modify storage <%temp_storage%> list set from storage <%temp_storage%> entry.data.uuids + block loop { + data modify storage <%temp_storage%> args.uuid set from storage <%temp_storage%> list[-1] + data remove storage <%temp_storage%> list[-1] + block as_uuid { with storage <%temp_storage%> args + $data merge entity $(uuid) {Glowing: 1b, glow_color_override: <%0xff0000%>} + } + + execute store result score #length <%OBJECTIVES.I()%> run data get storage <%temp_storage%> list + execute if score #length <%OBJECTIVES.I()%> matches 1.. run function ^0 } - execute on passengers run data merge entity @s {Glowing: 1b, glow_color_override: <%0xff0000%>} + summon minecraft:text_display ~ ~ ~ { \ Tags:[ \ '<%TAGS.GLOBAL_ENTITY()%>', \ @@ -153,7 +165,7 @@ dir global { # Returns 1 if the rig is outdated, else returns 0. function is_rig_outdated { data_manager prep read - block { with storage <%temp_storage%> entry.data + return run block { with storage <%temp_storage%> entry.data # REVIEW - The replace here is a bit hacky. # Because this is a core function, I need to create a generic version of # project_storage that uses a macro to get the blueprint ID instead of hardcoding it. diff --git a/src/systems/datapackCompiler/1.20.4/main.mcb b/src/systems/datapackCompiler/1.20.4/main.mcb index ab5c9c9d..43d29e1b 100644 --- a/src/systems/datapackCompiler/1.20.4/main.mcb +++ b/src/systems/datapackCompiler/1.20.4/main.mcb @@ -29,6 +29,12 @@ IF (has_animations) { } } +dir zzz { + function outdated_rig_warning { + $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + } +} + dir root { function on_tick { # Custom pre-tick function diff --git a/src/systems/datapackCompiler/1.20.5/main.mcb b/src/systems/datapackCompiler/1.20.5/main.mcb index 713934b6..3cfbc6c2 100644 --- a/src/systems/datapackCompiler/1.20.5/main.mcb +++ b/src/systems/datapackCompiler/1.20.5/main.mcb @@ -32,6 +32,12 @@ IF (has_animations) { } } +dir zzz { + function outdated_rig_warning { + $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + } +} + dir root { function on_tick { # Custom pre-tick function diff --git a/src/systems/datapackCompiler/1.21.0/global.mcb b/src/systems/datapackCompiler/1.21.0/global.mcb index ce13c472..38bf4eff 100644 --- a/src/systems/datapackCompiler/1.21.0/global.mcb +++ b/src/systems/datapackCompiler/1.21.0/global.mcb @@ -34,10 +34,10 @@ dir global { dir root { function on_tick { + data_manager prep read IF (debug_mode) { execute unless score @s <%OBJECTIVES.IS_RIG_LOADED()%> matches 1 run function *global/root/on_load } - data_manager prep read function *global/root/run_project_tick with storage <%temp_storage%> entry.data } @@ -65,11 +65,23 @@ dir global { # Overwrite the rig hash so the warning doesn't show again. data modify storage <%temp_storage%> entry.data.rig_hash set value '<%rig_hash%>' data_manager write + block run_print { with storage <%temp_storage%> entry.data + $function $(blueprint_id)/zzz/outdated_rig_warning with storage <%temp_storage%> args + } - block print { with storage <%temp_storage%> args - $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + # Loop over rig entities and glow them red. + data modify storage <%temp_storage%> list set from storage <%temp_storage%> entry.data.uuids + block loop { + data modify storage <%temp_storage%> args.uuid set from storage <%temp_storage%> list[-1] + data remove storage <%temp_storage%> list[-1] + block as_uuid { with storage <%temp_storage%> args + $data merge entity $(uuid) {Glowing: 1b, glow_color_override: <%0xff0000%>} + } + + execute store result score #length <%OBJECTIVES.I()%> run data get storage <%temp_storage%> list + execute if score #length <%OBJECTIVES.I()%> matches 1.. run function ^0 } - execute on passengers run data merge entity @s {Glowing: 1b, glow_color_override: <%0xff0000%>} + summon minecraft:text_display ~ ~ ~ { \ Tags:[ \ '<%TAGS.GLOBAL_ENTITY()%>', \ @@ -156,7 +168,7 @@ dir global { # Returns 1 if the rig is outdated, else returns 0. function is_rig_outdated { data_manager prep read - block { with storage <%temp_storage%> entry.data + return run block { with storage <%temp_storage%> entry.data # REVIEW - The replace here is a bit hacky. # Because this is a core function, I need to create a generic version of # project_storage that uses a macro to get the blueprint ID instead of hardcoding it. diff --git a/src/systems/datapackCompiler/1.21.0/main.mcb b/src/systems/datapackCompiler/1.21.0/main.mcb index 9970d1cd..d73e8a49 100644 --- a/src/systems/datapackCompiler/1.21.0/main.mcb +++ b/src/systems/datapackCompiler/1.21.0/main.mcb @@ -33,6 +33,12 @@ IF (has_animations) { } } +dir zzz { + function outdated_rig_warning { + $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + } +} + dir root { function on_tick { # Custom pre-tick function diff --git a/src/systems/datapackCompiler/1.21.2/main.mcb b/src/systems/datapackCompiler/1.21.2/main.mcb index f15230dc..4f7be04c 100644 --- a/src/systems/datapackCompiler/1.21.2/main.mcb +++ b/src/systems/datapackCompiler/1.21.2/main.mcb @@ -32,6 +32,12 @@ IF (has_animations) { } } +dir zzz { + function outdated_rig_warning { + $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + } +} + dir root { function on_tick { # Custom pre-tick function diff --git a/src/systems/datapackCompiler/1.21.4/main.mcb b/src/systems/datapackCompiler/1.21.4/main.mcb index 0ebd7ccd..ad320ba5 100644 --- a/src/systems/datapackCompiler/1.21.4/main.mcb +++ b/src/systems/datapackCompiler/1.21.4/main.mcb @@ -33,6 +33,12 @@ IF (has_animations) { } } +dir zzz { + function outdated_rig_warning { + $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + } +} + dir root { function on_tick { # Custom pre-tick function diff --git a/src/systems/datapackCompiler/1.21.5/global.mcb b/src/systems/datapackCompiler/1.21.5/global.mcb index 09bc8ed6..926d375d 100644 --- a/src/systems/datapackCompiler/1.21.5/global.mcb +++ b/src/systems/datapackCompiler/1.21.5/global.mcb @@ -34,10 +34,10 @@ dir global { dir root { function on_tick { + data_manager prep read IF (debug_mode) { execute unless score @s <%OBJECTIVES.IS_RIG_LOADED()%> matches 1 run function *global/root/on_load } - data_manager prep read function *global/root/run_project_tick with storage <%temp_storage%> entry.data } @@ -65,11 +65,23 @@ dir global { # Overwrite the rig hash so the warning doesn't show again. data modify storage <%temp_storage%> entry.data.rig_hash set value '<%rig_hash%>' data_manager write + block run_print { with storage <%temp_storage%> entry.data + $function $(blueprint_id)/zzz/outdated_rig_warning with storage <%temp_storage%> args + } - block print { with storage <%temp_storage%> args - $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + # Loop over rig entities and glow them red. + data modify storage <%temp_storage%> list set from storage <%temp_storage%> entry.data.uuids + block loop { + data modify storage <%temp_storage%> args.uuid set from storage <%temp_storage%> list[-1] + data remove storage <%temp_storage%> list[-1] + block as_uuid { with storage <%temp_storage%> args + $data merge entity $(uuid) {Glowing: 1b, glow_color_override: <%0xff0000%>} + } + + execute store result score #length <%OBJECTIVES.I()%> run data get storage <%temp_storage%> list + execute if score #length <%OBJECTIVES.I()%> matches 1.. run function ^0 } - execute on passengers run data merge entity @s {Glowing: 1b, glow_color_override: <%0xff0000%>} + summon minecraft:text_display ~ ~ ~ { \ Tags:[ \ '<%TAGS.GLOBAL_ENTITY()%>', \ @@ -156,7 +168,7 @@ dir global { # Returns 1 if the rig is outdated, else returns 0. function is_rig_outdated { data_manager prep read - block { with storage <%temp_storage%> entry.data + return run block { with storage <%temp_storage%> entry.data # REVIEW - The replace here is a bit hacky. # Because this is a core function, I need to create a generic version of # project_storage that uses a macro to get the blueprint ID instead of hardcoding it. diff --git a/src/systems/datapackCompiler/1.21.5/main.mcb b/src/systems/datapackCompiler/1.21.5/main.mcb index 78b5af29..1bee11a5 100644 --- a/src/systems/datapackCompiler/1.21.5/main.mcb +++ b/src/systems/datapackCompiler/1.21.5/main.mcb @@ -32,6 +32,12 @@ IF (has_animations) { } } +dir zzz { + function outdated_rig_warning { + $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + } +} + dir root { function on_tick { # Custom pre-tick function diff --git a/src/systems/datapackCompiler/26.2/global.mcb b/src/systems/datapackCompiler/26.2/global.mcb index b3df6418..d70b7d51 100644 --- a/src/systems/datapackCompiler/26.2/global.mcb +++ b/src/systems/datapackCompiler/26.2/global.mcb @@ -34,10 +34,10 @@ dir global { dir root { function on_tick { + data_manager prep read IF (debug_mode) { execute unless score @s <%OBJECTIVES.IS_RIG_LOADED()%> matches 1 run function *global/root/on_load } - data_manager prep read function *global/root/run_project_tick with storage <%temp_storage%> entry.data } @@ -65,11 +65,23 @@ dir global { # Overwrite the rig hash so the warning doesn't show again. data modify storage <%temp_storage%> entry.data.rig_hash set value '<%rig_hash%>' data_manager write + block run_print { with storage <%temp_storage%> entry.data + $function $(blueprint_id)/zzz/outdated_rig_warning with storage <%temp_storage%> args + } - block print { with storage <%temp_storage%> args - $tellraw @a <%TELLRAW.RIG_OUTDATED()%> + # Loop over rig entities and glow them red. + data modify storage <%temp_storage%> list set from storage <%temp_storage%> entry.data.uuids + block loop { + data modify storage <%temp_storage%> args.uuid set from storage <%temp_storage%> list[-1] + data remove storage <%temp_storage%> list[-1] + block as_uuid { with storage <%temp_storage%> args + $data merge entity $(uuid) {Glowing: 1b, glow_color_override: <%0xff0000%>} + } + + execute store result score #length <%OBJECTIVES.I()%> run data get storage <%temp_storage%> list + execute if score #length <%OBJECTIVES.I()%> matches 1.. run function ^0 } - execute on passengers run data merge entity @s {Glowing: 1b, glow_color_override: <%0xff0000%>} + summon minecraft:text_display ~ ~ ~ { \ Tags:[ \ '<%TAGS.GLOBAL_ENTITY()%>', \ @@ -156,7 +168,7 @@ dir global { # Returns 1 if the rig is outdated, else returns 0. function is_rig_outdated { data_manager prep read - block { with storage <%temp_storage%> entry.data + return run block { with storage <%temp_storage%> entry.data # REVIEW - The replace here is a bit hacky. # Because this is a core function, I need to create a generic version of # project_storage that uses a macro to get the blueprint ID instead of hardcoding it. diff --git a/src/systems/datapackCompiler/tellraw.ts b/src/systems/datapackCompiler/tellraw.ts index 36dd8129..a6bd06a3 100644 --- a/src/systems/datapackCompiler/tellraw.ts +++ b/src/systems/datapackCompiler/tellraw.ts @@ -1,4 +1,5 @@ import { TextComponent, type TextElement } from 'book-and-quill' +import { projectTargetVersionIsAtLeast } from '../../formats/blueprint' import { toSmallCaps } from '../../util/minecraftUtil' import { type IRenderedAnimation } from '../animationRenderer' import { type IRenderedVariant } from '../rigRenderer' @@ -111,14 +112,17 @@ namespace TELLRAW { }, ]) - export const RIG_OUTDATED_TEXT_DISPLAY = () => - new TextComponent([ + export const RIG_OUTDATED_TEXT_DISPLAY = () => { + let text = new TextComponent([ { text: '⚠ This rig instance is outdated! ⚠', color: 'red' }, '\n It should be removed and re-summoned to ensure it functions correctly.', - ]) - // Because this is used as NBT in a summon command, we need to double-escape the newlines. - .toString() - .replaceAll('\\n', '\\\\n') + ]).toString() + if (!projectTargetVersionIsAtLeast('1.21.5')) { + // Because this is used as an NBT string in 1.21.4 and below, we need to double-escape the newlines. + text = text.replaceAll('\\n', '\\\\n') + } + return text + } export const FUNCTION_NOT_EXECUTED_AS_ROOT_ERROR = (functionPath: string, tag: string) => { const hoverText = new TextComponent([ From 3f6669c7c59ea307764a9b0296b019c90657a23d Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Wed, 24 Jun 2026 13:16:25 -0400 Subject: [PATCH 07/19] =?UTF-8?q?=F0=9F=90=9B=20Fix=20painter=20breaking?= =?UTF-8?q?=20when=20painting=20over=20Interactions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mods/painter.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/mods/painter.ts diff --git a/src/mods/painter.ts b/src/mods/painter.ts new file mode 100644 index 00000000..58ed1db2 --- /dev/null +++ b/src/mods/painter.ts @@ -0,0 +1,25 @@ +import { registerPropertyOverridePatch } from 'blockbench-patch-manager' +import { Interaction } from '../outliner/interaction' + +declare global { + namespace Painter { + function startPaintToolCanvas( + data: { element?: OutlinerElement }, + event: PointerEvent + ): void + } +} + +registerPropertyOverridePatch({ + id: `animated_java:painter/startPaintToolCanvas`, + target: Painter, + key: 'startPaintToolCanvas', + get(value) { + return function (this: typeof Painter, data, event: PointerEvent) { + if (data.element instanceof Interaction) { + return + } + return value.apply(this, [data, event]) + } + }, +}) From ef7b1105f1a98710b5e87d2a716cd5c7649cb9dc Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Wed, 24 Jun 2026 14:40:27 -0400 Subject: [PATCH 08/19] =?UTF-8?q?=E2=9C=A8=20Enchantment=20Glint=20Preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../displayEntityConfig.svelte | 257 ------------------ .../pages/perVariant.svelte | 14 +- src/formats/blueprint/index.ts | 5 +- src/index.ts | 10 +- src/mods/cube.ts | 49 +++- src/outliner/vanillaItemDisplay.ts | 16 +- src/shaders/enchantmentGlint.ts | 118 ++++++++ src/variants.ts | 15 +- 8 files changed, 214 insertions(+), 270 deletions(-) delete mode 100644 src/dialogs/displayEntityConfig/displayEntityConfig.svelte create mode 100644 src/shaders/enchantmentGlint.ts diff --git a/src/dialogs/displayEntityConfig/displayEntityConfig.svelte b/src/dialogs/displayEntityConfig/displayEntityConfig.svelte deleted file mode 100644 index fe929e69..00000000 --- a/src/dialogs/displayEntityConfig/displayEntityConfig.svelte +++ /dev/null @@ -1,257 +0,0 @@ - - - - -
- - - - -
- -
- - - - +
+
+ +
-
-{#if $error} -
- {$error} -
+ {#if $error} +
+ {$error} +
+ {/if} {/if}