Skip to content

Commit 5233f68

Browse files
committed
✨ Adjust model format list
1 parent 3cfcc76 commit 5233f68

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

src/blueprintFormat.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,6 @@ export const BLUEPRINT_CODEC = new Blockbench.Codec('animated_java_blueprint', {
389389
})
390390
}
391391

392-
// if (model.history) {
393-
// Undo.history = model.history.slice()
394-
// Undo.index = model.history_index || 0
395-
// }
396-
397392
Canvas.updateAll()
398393
Validator.validate()
399394
BLUEPRINT_CODEC.dispatchEvent('parsed', { model })
@@ -534,7 +529,7 @@ export const BLUEPRINT_FORMAT = new Blockbench.ModelFormat({
534529
id: 'animated_java_blueprint',
535530
name: 'Animated Java Blueprint',
536531
icon: 'icon-armor_stand',
537-
category: 'minecraft',
532+
category: 'animated_java',
538533
target: 'Minecraft: Java Edition',
539534
confidential: false,
540535
condition: () => true,

src/interface/importAJModelLoader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { toSafeFuntionName } from '../util/minecraftUtil'
1212
let activeComponent: SvelteComponentDev | null = null
1313

1414
createModelLoader(`${PACKAGE.name}-upgradeAJModelLoader`, {
15-
icon: 'folder_open',
15+
icon: 'upload_file',
1616
category: 'animated_java',
1717
name: translate('action.upgrade_old_aj_model_loader.name'),
1818
condition() {

src/mods/formatIconMod.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,25 @@ createBlockbenchMod(
2727
document.querySelector('#animated_java\\:icon')?.remove()
2828
}
2929
)
30+
31+
createBlockbenchMod(
32+
`${PACKAGE.name}:prioritizeAnimatedJavaFormats`,
33+
undefined,
34+
() => {
35+
const interval = setInterval(() => {
36+
const ajFormats = $("li.format_category > label:contains('Animated Java')")
37+
.first()
38+
.parent()
39+
if (ajFormats.length === 0) return
40+
41+
const mcFormats = $("li.format_category > label:contains('General')").first().parent()
42+
43+
ajFormats.insertBefore(mcFormats)
44+
45+
clearInterval(interval)
46+
}, 16)
47+
},
48+
() => {
49+
// Pass
50+
}
51+
)

0 commit comments

Comments
 (0)