From 804b6956a5e80dcb0b0f4926fcbe430dd8afeeea Mon Sep 17 00:00:00 2001 From: SnaveSutit Date: Sun, 19 Jan 2025 16:40:43 -0500 Subject: [PATCH 01/56] =?UTF-8?q?=F0=9F=9A=A7=20Major=20source=20reorganiz?= =?UTF-8?q?ation,=20and=20new=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/impulse_command_block.png | Bin 0 -> 21623 bytes src/assets/mc-build-base.tmLanguage.json | 942 ++++++++++++++++++ src/assets/mcfunction.tmLanguage.json | 686 +++++++++++++ src/assets/papermc.svg | 1 + src/blueprintFormat.ts | 2 + src/blueprintSettings.ts | 20 +- src/components/blueprintSettingsDialog.svelte | 881 ---------------- .../dialogItems/dialogItemUtil.d.ts | 5 - .../dialogItems/numberSlider.svelte | 85 -- src/index.ts | 8 +- src/interface/animatedJavaBarItem.ts | 142 ++- src/interface/changelogDialog.ts | 2 +- src/interface/dialog/about.ts | 2 +- src/interface/dialog/animationProperties.ts | 2 +- src/interface/dialog/blueprintSettings.ts | 128 --- src/interface/dialog/boneConfig.ts | 2 +- src/interface/dialog/changelog.ts | 2 +- src/interface/dialog/exportProgress.ts | 2 +- src/interface/dialog/locatorConfig.ts | 2 +- src/interface/dialog/textDisplayConfig.ts | 2 +- src/interface/dialog/unexpectedError.ts | 2 +- .../dialog/vanillaBlockDisplayConfig.ts | 2 +- .../dialog/vanillaItemDisplayConfig.ts | 2 +- src/interface/dialog/variantConfig.ts | 2 +- src/interface/importAJModelLoader.ts | 6 +- src/interface/index.ts | 1 - src/interface/keyframeEasings.ts | 2 +- src/interface/panel/customKeyframe.ts | 2 +- src/interface/panel/textDisplayElement.ts | 2 +- .../panel/vanillaBlockDisplayElement.ts | 2 +- .../panel/vanillaItemDisplayElement.ts | 2 +- src/interface/panel/variants.ts | 2 +- src/interface/popup/animatedJavaLoading.ts | 2 +- src/interface/popup/blueprintLoading.ts | 2 +- src/interface/popup/incompatabilityPopup.ts | 2 +- src/interface/popup/installed.ts | 2 +- src/lang/en.yml | 83 ++ src/mods/formatIconMod.ts | 2 +- src/mods/index.ts | 1 + src/mods/pluginsDialogMod.ts | 2 +- src/mods/prismMod.ts | 351 +++++++ src/mods/projectSettingsActionOverride.ts | 2 +- src/svelte/about.svelte | 209 ++++ .../animatedJavaLoadingPopup.svelte | 0 .../animationProperties.svelte | 10 +- .../blueprintLoadingPopup.svelte | 0 src/svelte/blueprintSettings/index.ts | 109 ++ .../blueprintSettings/pages/datapack.svelte | 217 ++++ .../blueprintSettings/pages/general.svelte | 211 ++++ .../blueprintSettings/pages/plugin.svelte | 45 + .../pages/resourcepack.svelte | 157 +++ .../requiredAsteriskInform.svelte | 12 + .../boneConfigDialog.svelte | 14 +- .../changelogDialog.svelte | 0 .../dialogItems/baseDialogItem.svelte | 34 +- .../components/dialogItems/checkbox.svelte | 2 +- .../components/dialogItems/codeInput.svelte | 2 +- .../components/dialogItems/collection.svelte | 2 +- .../components/dialogItems/colorPicker.svelte | 4 +- .../dialogItems/dialogItemUtil.d.ts | 10 + .../components/dialogItems/fileSelect.svelte | 2 +- .../dialogItems/folderSelect.svelte | 2 +- .../components/dialogItems/lineInput.svelte | 2 +- .../dialogItems/numberSlider.svelte | 76 ++ .../dialogItems/sectionHeader.svelte | 0 .../components/dialogItems/select.svelte | 9 +- .../components/dialogItems/vector2d.svelte | 16 +- .../components/dialogItems/vector3d.svelte | 16 +- .../baseSidebarDialogItem.svelte | 112 +++ .../sidebarDialogItems/boxSelect.svelte | 89 ++ .../sidebarDialogItems/checkbox.svelte | 31 + .../sidebarDialogItems/codeBox.svelte | 136 +++ .../sidebarDialogItems/fileSelect.svelte | 92 ++ .../sidebarDialogItems/folderSelect.svelte | 92 ++ .../sidebarDialogItems/lineEdit.svelte | 90 ++ .../sidebarDialogItems/numberSlider.svelte | 141 +++ .../sidebarDialogItems/optionSelect.svelte | 46 + .../requiredAsteriskInform.svelte | 12 + .../sidebarDialogItems/vector2d.svelte | 168 ++++ .../customKeyframePanel.svelte | 0 .../exportProgressDialog.svelte | 0 src/{components => svelte}/formatPage.svelte | 0 src/{components => svelte}/icon.svelte | 0 .../importAJModelLoaderDialog.svelte | 0 .../incompatabilityPopup.svelte | 0 .../incompatiblePluginNotice.svelte | 0 .../installedPopup.svelte | 0 .../keyframeEasings.svelte | 0 .../commandsKeyframePanel.svelte | 97 ++ .../variantKeyframePanel.svelte | 0 .../locatorConfigDialog.svelte | 25 +- .../dialogItems => svelte}/multiSelect.svelte | 0 .../projectTitle.svelte | 0 .../textDisplayConfigDialog.svelte | 14 +- .../textDisplayElementPanel.svelte | 0 .../unexpectedErrorDialog.svelte | 0 .../vanillaBlockDisplayConfigDialog.svelte | 14 +- .../vanillaBlockDisplayElementPanel.svelte | 0 .../vanillaItemDisplayConfigDialog.svelte | 14 +- .../vanillaItemDisplayElementPanel.svelte | 0 .../variantConfigDialog.svelte | 6 +- .../variantsPanel.svelte | 0 src/systems/ajmeta.ts | 48 + src/systems/datapackCompiler/index.ts | 221 ++-- src/systems/datapackCompiler/objectives.ts | 7 + src/systems/datapackCompiler/tags.ts | 503 ++++++++-- src/systems/datapackCompiler/tellraw.ts | 201 ++++ src/systems/exporter.ts | 2 +- src/systems/minecraft/itemModelManager.ts | 4 +- src/systems/resourcepackCompiler/1.20.4.ts | 28 +- src/systems/resourcepackCompiler/1.21.2.ts | 32 +- src/systems/resourcepackCompiler/1.21.4.ts | 17 +- src/util/fileUtil.ts | 8 + src/util/minecraftUtil.ts | 33 +- src/util/misc.ts | 10 + src/util/moddingTools.ts | 14 +- src/util/stores.ts | 13 + src/util/svelteDialog.ts | 134 ++- src/util/translation.ts | 32 +- tools/plugins/packagerPlugin.ts | 3 +- 120 files changed, 5441 insertions(+), 1601 deletions(-) create mode 100644 src/assets/impulse_command_block.png create mode 100644 src/assets/mc-build-base.tmLanguage.json create mode 100644 src/assets/mcfunction.tmLanguage.json create mode 100644 src/assets/papermc.svg delete mode 100644 src/components/blueprintSettingsDialog.svelte delete mode 100644 src/components/dialogItems/dialogItemUtil.d.ts delete mode 100644 src/components/dialogItems/numberSlider.svelte delete mode 100644 src/interface/dialog/blueprintSettings.ts create mode 100644 src/mods/prismMod.ts create mode 100644 src/svelte/about.svelte rename src/{components => svelte}/animatedJavaLoadingPopup.svelte (100%) rename src/{components => svelte}/animationProperties.svelte (88%) rename src/{components => svelte}/blueprintLoadingPopup.svelte (100%) create mode 100644 src/svelte/blueprintSettings/index.ts create mode 100644 src/svelte/blueprintSettings/pages/datapack.svelte create mode 100644 src/svelte/blueprintSettings/pages/general.svelte create mode 100644 src/svelte/blueprintSettings/pages/plugin.svelte create mode 100644 src/svelte/blueprintSettings/pages/resourcepack.svelte create mode 100644 src/svelte/blueprintSettings/requiredAsteriskInform.svelte rename src/{components => svelte}/boneConfigDialog.svelte (95%) rename src/{components => svelte}/changelogDialog.svelte (100%) rename src/{ => svelte}/components/dialogItems/baseDialogItem.svelte (74%) rename src/{ => svelte}/components/dialogItems/checkbox.svelte (94%) rename src/{ => svelte}/components/dialogItems/codeInput.svelte (96%) rename src/{ => svelte}/components/dialogItems/collection.svelte (99%) rename src/{ => svelte}/components/dialogItems/colorPicker.svelte (90%) create mode 100644 src/svelte/components/dialogItems/dialogItemUtil.d.ts rename src/{ => svelte}/components/dialogItems/fileSelect.svelte (97%) rename src/{ => svelte}/components/dialogItems/folderSelect.svelte (97%) rename src/{ => svelte}/components/dialogItems/lineInput.svelte (96%) create mode 100644 src/svelte/components/dialogItems/numberSlider.svelte rename src/{ => svelte}/components/dialogItems/sectionHeader.svelte (100%) rename src/{ => svelte}/components/dialogItems/select.svelte (81%) rename src/{ => svelte}/components/dialogItems/vector2d.svelte (91%) rename src/{ => svelte}/components/dialogItems/vector3d.svelte (92%) create mode 100644 src/svelte/components/sidebarDialogItems/baseSidebarDialogItem.svelte create mode 100644 src/svelte/components/sidebarDialogItems/boxSelect.svelte create mode 100644 src/svelte/components/sidebarDialogItems/checkbox.svelte create mode 100644 src/svelte/components/sidebarDialogItems/codeBox.svelte create mode 100644 src/svelte/components/sidebarDialogItems/fileSelect.svelte create mode 100644 src/svelte/components/sidebarDialogItems/folderSelect.svelte create mode 100644 src/svelte/components/sidebarDialogItems/lineEdit.svelte create mode 100644 src/svelte/components/sidebarDialogItems/numberSlider.svelte create mode 100644 src/svelte/components/sidebarDialogItems/optionSelect.svelte create mode 100644 src/svelte/components/sidebarDialogItems/requiredAsteriskInform.svelte create mode 100644 src/svelte/components/sidebarDialogItems/vector2d.svelte rename src/{components => svelte}/customKeyframePanel.svelte (100%) rename src/{components => svelte}/exportProgressDialog.svelte (100%) rename src/{components => svelte}/formatPage.svelte (100%) rename src/{components => svelte}/icon.svelte (100%) rename src/{components => svelte}/importAJModelLoaderDialog.svelte (100%) rename src/{components => svelte}/incompatabilityPopup.svelte (100%) rename src/{components => svelte}/incompatiblePluginNotice.svelte (100%) rename src/{components => svelte}/installedPopup.svelte (100%) rename src/{components => svelte}/keyframeEasings.svelte (100%) create mode 100644 src/svelte/keyframePanels/commandsKeyframePanel.svelte rename src/{components => svelte}/keyframePanels/variantKeyframePanel.svelte (100%) rename src/{components => svelte}/locatorConfigDialog.svelte (78%) rename src/{components/dialogItems => svelte}/multiSelect.svelte (100%) rename src/{components => svelte}/projectTitle.svelte (100%) rename src/{components => svelte}/textDisplayConfigDialog.svelte (93%) rename src/{components => svelte}/textDisplayElementPanel.svelte (100%) rename src/{components => svelte}/unexpectedErrorDialog.svelte (100%) rename src/{components => svelte}/vanillaBlockDisplayConfigDialog.svelte (94%) rename src/{components => svelte}/vanillaBlockDisplayElementPanel.svelte (100%) rename src/{components => svelte}/vanillaItemDisplayConfigDialog.svelte (94%) rename src/{components => svelte}/vanillaItemDisplayElementPanel.svelte (100%) rename src/{components => svelte}/variantConfigDialog.svelte (97%) rename src/{components => svelte}/variantsPanel.svelte (100%) create mode 100644 src/systems/ajmeta.ts create mode 100644 src/systems/datapackCompiler/objectives.ts create mode 100644 src/systems/datapackCompiler/tellraw.ts diff --git a/src/assets/impulse_command_block.png b/src/assets/impulse_command_block.png new file mode 100644 index 0000000000000000000000000000000000000000..6553b9c7015265e04a00b7c25b7cc329c10d5da7 GIT binary patch literal 21623 zcmZs@2{_d2`#(No8fq-nDLc{eX+yGR8Ovy)Q`Qj>zu(UJeE;9y@A_R==hA52&pgll+{^3ry6-tR%}k92aS}Kb z3MKf*iDTv{6j~AaZ!<6aCO9Qs<`p3`quPk zx>7zvr6DPNf~@DBcRomrE8*0%)O3xlt-s>X(=)U3>-*i6^$F>cz}{~W*Z3x+7qjqF zY3tu!zo{L{&|m-cbwTJWeu_5$m2SSmdq3>ZH1aO}4?_FXReznG=Z3M7XM$>^-!U!f z(x%Q%?CHjPO){@_N8nC$uU_j;TPfXGdrLq%|C7$LeL*j;ZP{4SA%G-8pwCS@S4|9U ze703bgyqy&{IzJ~imDmpL%xj&t$qp&Wj(JlF2+3)3%?lux-5L5Y!cZj8jorzphbuz zIE4qs^XV@C65d#p7(nU!dr5Bil9PHRzTtdl^EDdsd#`Gt{bo8Tk3VMzYLxrh6$mff z+jx5}zE@Ut#|q1Fx%13=oSREr+oL3|&BB61dj)1eNU9@ZeR^_zfIoca?}$duD6WFz0>Gcuz7bFwHM80tbc^EG+QvTumCX+O9tLk8_K;H=E{MHR%r@ zKFO>R($b<{#BJtFln0BKXEDI@Yz#*Ey4f1mu~^@W9R@C?C; zZ*lw?W^bN0`giR652-p0w+1U*J-Y3EkdI90LVKFd37<60Cme6EF#CA*IbB;PI5ey+ zK__A58nQ5R45jHbP$iPJQ#Btg-z`~`7&wd=mC=R%lPNCU>(i1%J#fRtKcr_&%*tSP z%=Q{*>FX@=$;^FeAu~N;6XlLm9|uQW!x~etJ4dP}4~22~^@U_rhNIdvDg3*7dZ@4eG~t{Xo! z9l%7($6j`dA!%H|KI_;g9uYrFGee*EDV7dY$iN9@_y(0~qctoK0 z;*F+dO5>Ooqd^LPc>eb&^L>@xe=W3tm#ho*UQrpQyyr|kjE>B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B%~VE*ea=$sNCL6deE&XEz2E42;PL zzi7gs&LJEJKW+8&&B@jlyp~C%kj?C28g$-YGAk&UxsSS zy=RH(GHcAND3$m8Movg_ydoZQhX&Oj1M} zR=svmVrK;170bWo&yBVgD#l|PY^D_a2asF%J`~xM<$FNrxS#L-c@eNlXQARrx?;MS zt=g;c6$3echOomoF7(pP?py0Z+$~F7f7Iu4ZAPb*?=2Ou#qfjwosLKa1ZsYB#fSO= z>DHH7nOnlHWsMoLxNM;sG(0`er<=FA$j`7Ca6{=XqLXNn_9W zyh5Rkk4e-p|BWz<8e3#m`>fwq{P(Tu0z=s2H)+0-c9;n&_Cmo#iHLgNjug184jHw(q z1Wdv^M9VG`CoAk%+&6?iw%{R0as7Gp5H8{-5B*xYWFT&&6-I@a+P!v1he|TT@9>%%<0XjqkK>z>% literal 0 HcmV?d00001 diff --git a/src/assets/mc-build-base.tmLanguage.json b/src/assets/mc-build-base.tmLanguage.json new file mode 100644 index 00000000..59ac65e5 --- /dev/null +++ b/src/assets/mc-build-base.tmLanguage.json @@ -0,0 +1,942 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "mc-build", + "scopeName": "source.mc-build", + "patterns": [ + { + "include": "#folder_context" + } + ], + "repository": { + "folder_context": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#import" + }, + { + "include": "#multiline_js" + }, + { + "include": "#dir_definition" + }, + { + "include": "#clock_definition" + }, + { + "include": "#function_definition" + }, + + { + "include": "#advancement_definition" + }, + { + "include": "#enchantment_definition" + }, + { + "include": "#item_modifier_definition" + }, + { + "include": "#loot_table_definition" + }, + { + "include": "#predicate_definition" + }, + { + "include": "#recipe_definition" + }, + { + "include": "#chat_type_definition" + }, + { + "include": "#damage_type_definition" + }, + { + "include": "#dimension_definition" + }, + { + "include": "#dimension_type_definition" + }, + { + "include": "#worldgen_definition" + }, + + { + "include": "#tag_definition" + }, + + { + "include": "#folder_context.compile_if_else" + }, + { + "include": "#folder_context.compile_repeat" + } + ] + }, + "function_context": { + "patterns": [ + { + "include": "#inline_js" + }, + { + "include": "#multiline_js" + }, + { + "include": "#special_function_call" + }, + { + "include": "#function_context.compile_if_else" + }, + { + "include": "#function_context.compile_repeat" + }, + { + "include": "#tick/load_block" + }, + { + "include": "#schedule_block" + }, + { + "include": "#function_block" + }, + { + "include": "#execute" + }, + { + "include": "#execute_if_function" + }, + { + "include": "#multiline_command" + }, + { + "include": "source.injected-mcfunction" + } + ] + }, + "import": { + "match": "^[ \t]*(import)\\s*(.+)$", + "name": "entity.name.function", + "captures": { + "1": { + "name": "keyword.control" + }, + "2": { + "name": "string" + } + } + }, + + "macro_argument_embed": { + "match": "(\\$)\\((\\w+)\\)", + "captures": { + "1": { + "name": "keyword.control" + }, + "2": { + "name": "variable.name" + } + } + }, + + "dir_definition": { + "name": "meta.dir_definition", + "begin": "^[ \t]*(dir) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.dir" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#folder_context" + } + ] + }, + "function_definition": { + "name": "meta.function_definition", + "begin": "^[ \t]*(function) (.+?)(?: (tick|load))? ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + }, + "3": { + "name": "keyword.other" + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#function_context" + } + ] + }, + + "tick/load_block": { + "name": "meta.tick/load_block", + "begin": "^[ \t]*(tick|load) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#function_context" + } + ] + }, + + "comment": { + "match": "^[ \t]*(#.+)$", + "captures": { + "1": { + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "name": "comment.line" + }, + + "inline_js": { + "match": "<%(.+)%>", + "name": "meta.inline_js", + "captures": { + "0": { + "name": "keyword.operator" + }, + "1": { + "patterns": [ + { + "include": "source.js" + } + ] + } + } + }, + "multiline_js": { + "begin": "<%%", + "end": "%%>", + "name": "meta.multiline_js", + "captures": { + "0": { + "name": "keyword.operator" + } + }, + "patterns": [ + { + "include": "source.js" + } + ] + }, + + "folder_context.compile_repeat": { + "begin": "^[ \t]*(REPEAT) ?\\((.+?)\\)( ?(as) (\\w+)) ?{$", + "end": "^[ \t]*}$", + "beginCaptures": { + "1": { + "name": "keyword.control" + }, + "2": { + "patterns": [ + { + "match": "-?(\\d+) ?(,) ?-?(\\d+)", + "captures": { + "1": { + "name": "constant.numeric" + }, + "2": { + "name": "keyword.operator" + }, + "3": { + "name": "constant.numeric" + } + } + }, + { + "match": "(-?[\\d\\.]+) ?(,) ?(-?[\\d\\.]+) ?(,) ?(-?[\\d\\.]+)", + "captures": { + "1": { + "name": "constant.numeric" + }, + "2": { + "name": "keyword.operator" + }, + "3": { + "name": "constant.numeric" + }, + "4": { + "name": "keyword.operator" + }, + "5": { + "name": "constant.numeric" + } + } + }, + { + "include": "source.js" + } + ] + }, + "4": { + "name": "entity.name" + }, + "5": { + "name": "string.other" + } + }, + "name": "folder_context.compile_repeat", + "patterns": [ + { + "include": "#folder_context" + } + ] + }, + "function_context.compile_repeat": { + "begin": "^[ \t]*(REPEAT) ?\\((.+?)\\)( ?(as) (\\w+)) ?{$", + "end": "^[ \t]*}$", + "beginCaptures": { + "1": { + "name": "keyword.control" + }, + "2": { + "patterns": [ + { + "match": "-?(\\d+) ?(,) ?-?(\\d+)", + "captures": { + "1": { + "name": "constant.numeric" + }, + "2": { + "name": "keyword.operator" + }, + "3": { + "name": "constant.numeric" + } + } + }, + { + "match": "(-?[\\d\\.]+) ?(,) ?(-?[\\d\\.]+) ?(,) ?(-?[\\d\\.]+)", + "captures": { + "1": { + "name": "constant.numeric" + }, + "2": { + "name": "keyword.operator" + }, + "3": { + "name": "constant.numeric" + }, + "4": { + "name": "keyword.operator" + }, + "5": { + "name": "constant.numeric" + } + } + }, + { + "include": "source.js" + } + ] + }, + "4": { + "name": "entity.name" + }, + "5": { + "name": "string.other" + } + }, + "name": "function_context.compile_repeat", + "patterns": [ + { + "include": "#function_context" + } + ] + }, + + "folder_context.compile_if_else": { + "name": "meta.folder_context.compile_if_else.if", + "begin": "^[ \t]*(IF) ?(.+) ?{$", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#folder_context.compile_if_else.else" + }, + { + "include": "#folder_context" + } + ] + }, + "folder_context.compile_if_else.else": { + "name": "meta.folder_context.compile_if_else.else", + "begin": "^[ \t]*} ?(ELSE IF ?(.+) ?{|ELSE ?{|)$", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#folder_context.compile_if_else.else" + }, + { + "include": "#folder_context" + } + ] + }, + + "function_context.compile_if_else": { + "name": "meta.function_context.compile_if_else.if", + "begin": "^[ \t]*(IF) ?(.+) ?{$", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#function_context.compile_if_else.else" + }, + { + "include": "#function_context" + } + ] + }, + "function_context.compile_if_else.else": { + "name": "meta.function_context.compile_if_else.else", + "begin": "^[ \t]*} ?(ELSE IF ?(.+) ?{|ELSE ?{|)$", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "patterns": [ + { + "include": "source.js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#function_context.compile_if_else.else" + }, + { + "include": "#function_context" + } + ] + }, + + "advancement_definition": { + "begin": "^[ \t]*(advancement) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "enchantment_definition": { + "begin": "^[ \t]*(enchantment) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "item_modifier_definition": { + "begin": "^[ \t]*(item_modifier) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "loot_table_definition": { + "begin": "^[ \t]*(loot_table) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "predicate_definition": { + "begin": "^[ \t]*(predicate) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "recipe_definition": { + "begin": "^[ \t]*(recipe) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "chat_type_definition": { + "begin": "^[ \t]*(chat_type) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "damage_type_definition": { + "begin": "^[ \t]*(damage_type) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "dimension_definition": { + "begin": "^[ \t]*(dimension) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "dimension_type_definition": { + "begin": "^[ \t]*(dimension_type) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + "worldgen_definition": { + "begin": "^[ \t]*(worldgen) (biome|configured_carver|configured_feature|density_function|noise|noise_settings|placed_feature|processor_list|structure|structure_set|template_pool|world_preset|flat_level_generator_preset) (.+?) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name" + }, + "3": { + "name": "entity.name.function" + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "source.json" + } + ] + }, + + "tag_definition": { + "name": "meta.tag_definition", + "begin": "^[ \t]*(tag) ([a-z]+) (.+?)( replace)? ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name" + }, + "3": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + }, + "4": { + "name": "keyword.other" + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "match": "^[ \t]*(.+?)(:[a-z0-9_]+)?( replace)?$", + "captures": { + "1": { + "name": "entity.name.function" + }, + "2": { + "name": "entity.name.function" + }, + "3": { + "name": "keyword.other" + } + }, + "patterns": [ + { + "include": "#inline_js" + } + ] + } + ] + }, + + "clock_definition": { + "name": "meta.clock_definition", + "begin": "^[ \t]*(clock) (.+?) (\\d+(?:t|s|d)) ?{", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + }, + "3": { + "name": "constant.numeric" + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#function_context" + } + ] + }, + + "schedule_block": { + "name": "schedule_block", + "begin": "^[ \t]*(\\$?)(schedule)( [^ \n\t]+)(?: (replace|append))? ?{", + "beginCaptures": { + "1": { + "name": "markup.italic" + }, + "2": { + "name": "keyword.control.function" + }, + "3": { + "name": "constant.numeric", + "patterns": [ + { + "include": "#macro_argument_embed" + } + ] + }, + "4": { + "name": "keyword.other" + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#function_context" + } + ] + }, + + "function_block": { + "name": "meta.function_block", + "begin": "(block( [a-z0-9_]+)?)? ?{(?:$| ({.+|with .+)$)", + "beginCaptures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + }, + "3": { + "patterns": [ + { + "include": "source.injected-mcfunction" + } + ] + } + }, + "end": "^[ \t]*}$", + "patterns": [ + { + "include": "#function_context" + } + ] + }, + + "execute": { + "name": "meta.execute", + "begin": "((?: |^[ \t]*)(\\$?)(execute\\b)|(\\belse (\\$?)execute\\b)|(else))", + "beginCaptures": { + "1": { + "name": "keyword.control" + }, + "2": { + "name": "markup.italic" + }, + "5": { + "name": "markup.italic" + } + }, + "end": "(?: |^[ \t]*)(\\$?)(run\\b)", + "endCaptures": { + "1": { + "name": "markup.italic" + }, + "2": { + "name": "keyword.control" + } + }, + "patterns": [ + { + "include": "#execute" + }, + { + "include": "#execute_if_function" + }, + { + "include": "source.injected-mcfunction" + } + ] + }, + + "execute_if_function": { + "name": "execute_if_function", + "begin": "(if|unless) (function) ?{$", + "beginCaptures": { + "1": { + "name": "entity.name" + }, + "2": { + "name": "entity.name" + } + }, + "end": "^[ \t]*}", + "patterns": [ + { + "include": "#function_context" + } + ] + }, + + "special_function_call": { + "name": "meta.special_function_call", + "match": "^[ \t]*(function) (#?)(?:(\\*|\\.?\\./)(.+?(?: |$))|(\\^)(\\d+))", + "captures": { + "1": { + "name": "keyword.control.function" + }, + "2": { + "name": "entity.name.function" + }, + "3": { + "name": "keyword.operator" + }, + "4": { + "name": "entity.name.function", + "patterns": [ + { + "include": "#inline_js" + } + ] + }, + "5": { + "name": "keyword.operator" + }, + "6": { + "name": "constant.numeric" + } + } + } + } +} diff --git a/src/assets/mcfunction.tmLanguage.json b/src/assets/mcfunction.tmLanguage.json new file mode 100644 index 00000000..1be0dcc1 --- /dev/null +++ b/src/assets/mcfunction.tmLanguage.json @@ -0,0 +1,686 @@ +{ + "name": "Syntax Mcfunction", + "scopeName": "source.injected-mcfunction", + "uuid": "a339b5ad-d627-4019-a062-1fec13f43274", + "patterns": [ + { + "include": "#root" + } + ], + "repository": { + "root": { + "patterns": [ + { + "include": "#inline-js" + }, + { + "include": "#literals" + }, + { + "include": "#comments" + }, + { + "include": "#names" + }, + { + "include": "#comments_inline" + }, + { + "include": "#subcommands" + }, + { + "include": "#property" + }, + { + "include": "#operators" + }, + { + "include": "#selectors" + } + ] + }, + "comments": { + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "^\\s*(#[>!#])(.+)$", + "beginCaptures": { + "1": { + "name": "comment.block.mcfunction" + }, + "2": { + "name": "markup.bold.mcfunction" + } + }, + "captures": { + "0": { + "name": "comment.block.mcfunction" + } + }, + "end": "^(?!#)", + "name": "meta.comments", + "patterns": [ + { + "include": "#comments_block" + } + ] + }, + { + "captures": { + "0": { + "name": "comment.line.mcfunction" + } + }, + "match": "$#(?!<%).*$", + "name": "meta.comments" + } + ] + }, + "comments_inline": { + "patterns": [ + { + "captures": { + "0": { + "name": "comment.line.mcfunction" + } + }, + "match": "#.*$", + "name": "meta.comments" + } + ] + }, + "comments_block": { + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "^\\s*#[>!]", + "captures": { + "0": { + "name": "comment.block.mcfunction" + } + }, + "end": "$", + "name": "meta.comments_block", + "patterns": [ + { + "include": "#comments_block_emphasized" + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "^\\s*#", + "captures": { + "0": { + "name": "comment.block.mcfunction" + } + }, + "end": "$", + "name": "meta.comments_block", + "patterns": [ + { + "include": "#comments_block_normal" + } + ] + } + ] + }, + "comments_block_emphasized": { + "patterns": [ + { + "include": "#comments_block_special" + }, + { + "captures": { + "0": { + "name": "markup.bold.mcfunction" + } + }, + "match": "\\S+", + "name": "meta.comments_block_emphasized" + } + ] + }, + "comments_block_normal": { + "patterns": [ + { + "include": "#comments_block_special" + }, + { + "captures": { + "0": { + "name": "comment.block.mcfunction" + } + }, + "match": "\\S+", + "name": "meta.comments_block_normal" + }, + { + "include": "#whitespace" + } + ] + }, + "comments_block_special": { + "patterns": [ + { + "captures": { + "0": { + "name": "markup.heading.mcfunction" + } + }, + "match": "@\\S+", + "name": "meta.comments_block_special" + }, + { + "include": "#resource-name" + }, + { + "captures": { + "0": { + "name": "variable.other.mcfunction" + } + }, + "match": "[#%$][A-Za-z0-9_.#%$]+", + "name": "meta.comments_block_special" + } + ] + }, + "literals": { + "patterns": [ + { + "captures": { + "0": { + "name": "literal.mcfunction" + } + }, + "match": "\\.\\.", + "name": "meta.literals" + }, + { + "captures": { + "0": { + "name": "constant.numeric.boolean.mcfunction" + } + }, + "match": "(true|false|True|False)", + "name": "meta.literals" + }, + { + "captures": { + "0": { + "name": "variable.uuid.mcfunction" + } + }, + "match": "\\b[0-9a-fA-F]+(?:-[0-9a-fA-F]+){4}\\b", + "name": "meta.names" + }, + { + "captures": { + "0": { + "name": "constant.numeric.float.mcfunction" + } + }, + "match": "[+-]?\\d*\\.?\\d+([eE]?[+-]?\\d+)?[df]?\\b", + "name": "meta.literals" + }, + { + "captures": { + "0": { + "name": "constant.numeric.integer.mcfunction" + } + }, + "match": "[+-]?\\d+(b|B|L|l)\\b", + "name": "meta.literals" + }, + { + "captures": { + "0": { + "name": "constant.numeric.integer.mcfunction" + } + }, + "match": "[+-]?\\d+\\b", + "name": "meta.literals" + }, + { + "applyEndPatternLast": 1, + "begin": "\"", + "captures": { + "0": { + "name": "string.quoted.double.mcfunction" + } + }, + "end": "(\"|$)", + "name": "meta.literals", + "patterns": [ + { + "include": "#inline-js" + }, + { + "include": "#literals_string-double" + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "'", + "captures": { + "0": { + "name": "string.quoted.single.mcfunction" + } + }, + "end": "('|$)", + "name": "meta.literals", + "patterns": [ + { + "include": "#inline-js" + }, + { + "include": "#literals_string-single" + } + ] + } + ] + }, + "subcommands": { + "patterns": [ + { + "captures": { + "0": { + "name": "entity.name.class.mcfunction" + } + }, + "match": "[A-Za-z_]+", + "name": "meta.literals" + } + ] + }, + "literals_string-double": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.mcfunction" + } + }, + "match": "\\\\.", + "name": "meta.literals_string-double" + }, + { + "include": "#macro-name" + }, + { + "captures": { + "0": { + "name": "string.quoted.double.mcfunction" + } + }, + "match": "[^\\\\\"]", + "name": "meta.literals_string-double" + } + ] + }, + "literals_string-single": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.mcfunction" + } + }, + "match": "\\\\.", + "name": "meta.literals_string-single" + }, + { + "include": "#inline-js" + }, + { + "include": "#macro-name" + }, + { + "captures": { + "0": { + "name": "string.quoted.single.mcfunction" + } + }, + "match": "[^\\\\']", + "name": "meta.literals_string-single" + } + ] + }, + "names": { + "patterns": [ + { + "captures": { + "1": { + "name": "whitespace.mcfunction" + }, + "2": { + "name": "keyword.control.flow.mcfunction" + } + }, + "match": "^(\\s*)([a-z_]+)(?=\\s)", + "name": "meta.names" + }, + { + "captures": { + "1": { + "name": "whitespace.mcfunction" + }, + "2": { + "name": "markup.italic.mcfunction" + }, + "3": { + "name": "whitespace.mcfunction" + }, + "4": { + "name": "keyword.control.flow.mcfunction" + } + }, + "match": "^(\\s*)(\\$)( ?)([a-z_]*)", + "name": "meta.names" + }, + { + "captures": { + "1": { + "name": "entity.name.mcfunction" + }, + "2": { + "name": "whitespace.mcfunction" + }, + "3": { + "name": "keyword.control.flow.mcfunction" + } + }, + "match": "(run)(\\s+)([a-z_]+)", + "name": "meta.names" + }, + { + "include": "#resource-name" + }, + { + "captures": { + "0": { + "name": "entity.name.mcfunction" + } + }, + "match": "[A-Za-z]+(?=\\W)", + "name": "meta.names" + }, + { + "captures": { + "0": { + "name": "string.unquoted.mcfunction" + } + }, + "match": "[A-Za-z_][A-Za-z0-9_.#%$]*", + "name": "meta.names" + }, + { + "include": "#macro-name" + }, + { + "include": "#inline-js" + }, + { + "captures": { + "0": { + "name": "variable.other.mcfunction" + } + }, + "match": "([#%$]|((?<=\\s)\\.))[A-Za-z0-9_.#%$\\-]+", + "name": "meta.names" + } + ] + }, + "macro-name": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.template-expression.begin.mcfunction" + }, + "2": { + "name": "variable.other.mcfunction" + }, + "3": { + "name": "punctuation.definition.template-expression.end.mcfunction" + } + }, + "match": "(\\$\\()([A-Za-z0-9_]*)(\\))", + "name": "meta.macro-name" + } + ] + }, + "operators": { + "patterns": [ + { + "captures": { + "0": { + "name": "keyword.operator.mcfunction" + } + }, + "match": "[\\-~%^?!+*<>\\\\/|&=.:,;]", + "name": "meta.operators" + } + ] + }, + "property": { + "patterns": [ + { + "applyEndPatternLast": 1, + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.mcfunction" + } + }, + "end": "\\}", + "name": "meta.property.curly", + "patterns": [ + { + "include": "#inline-js" + }, + { + "include": "#resource-name" + }, + { + "include": "#literals" + }, + { + "include": "#property_key" + }, + { + "include": "#operators" + }, + { + "include": "#property_value" + }, + { + "include": "$self" + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "\\[", + "captures": { + "0": { + "name": "variable.other.mcfunction" + } + }, + "end": "\\]", + "name": "meta.property.square", + "patterns": [ + { + "include": "#inline-js" + }, + { + "include": "#resource-name" + }, + { + "include": "#literals" + }, + { + "include": "#property_key" + }, + { + "include": "#operators" + }, + { + "include": "#property_value" + }, + { + "include": "$self" + } + ] + }, + { + "applyEndPatternLast": 1, + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.mcfunction" + } + }, + "end": "\\)", + "name": "meta.property.paren", + "patterns": [ + { + "include": "#inline-js" + }, + { + "include": "#resource-name" + }, + { + "include": "#literals" + }, + { + "include": "#property_key" + }, + { + "include": "#operators" + }, + { + "include": "#property_value" + }, + { + "include": "$self" + } + ] + } + ] + }, + "property_key": { + "patterns": [ + { + "captures": { + "0": { + "name": "entity.name.type.mcfunction" + } + }, + "match": "#?[a-z_][a-z_\\.\\-]*\\:[a-z0-9_\\.\\-/]+(?=\\s*\\=)", + "name": "meta.property_key" + }, + { + "captures": { + "0": { + "name": "entity.name.type.mcfunction" + } + }, + "match": "#?[a-z_][a-z0-9_\\.\\-/]+", + "name": "meta.property_key" + }, + { + "captures": { + "0": { + "name": "entity.name.type.mcfunction" + } + }, + "match": "[A-Za-z_]+[A-Za-z_\\-\\+]*", + "name": "meta.property_key" + } + ] + }, + "property_value": { + "patterns": [ + { + "captures": { + "0": { + "name": "entity.name.tag.mcfunction" + } + }, + "match": "#?[a-z_][a-z_\\.\\-]*\\:[a-z0-9_\\.\\-/]+", + "name": "meta.property_value" + }, + { + "captures": { + "0": { + "name": "entity.name.tag.mcfunction" + } + }, + "match": "#?[a-z_][a-z0-9_\\.\\-/]+", + "name": "meta.property_value" + } + ] + }, + "resource-name": { + "patterns": [ + { + "captures": { + "0": { + "name": "entity.name.function.mcfunction" + } + }, + "match": "#?[a-z_][a-z\\_\\.\\-]*:((<%)(.+?)(%>))?[a-z0-9_\\.\\/\\-]+", + "name": "meta.resource-name" + }, + { + "captures": { + "0": { + "name": "entity.name.function.mcfunction" + } + }, + "match": "#?[a-z0-9_\\.\\-]+\\/[a-z0-9_\\.\\-\\/]+", + "name": "meta.resource-name" + } + ] + }, + "selectors": { + "patterns": [ + { + "captures": { + "0": { + "name": "support.class.mcfunction" + } + }, + "match": "@[a-z]+", + "name": "meta.selectors" + } + ] + }, + "inline-js": { + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.template-expression.begin.lang-mc" + }, + "2": { + "name": "inline-js", + "patterns": [ + { + "include": "source.js" + } + ] + }, + "3": { + "name": "punctuation.definition.template-expression.end.lang-mc" + } + }, + "match": "(<%)(.+?)(%>)", + "name": "meta.inline-js" + } + ] + } + } +} \ No newline at end of file diff --git a/src/assets/papermc.svg b/src/assets/papermc.svg new file mode 100644 index 00000000..6b44eda9 --- /dev/null +++ b/src/assets/papermc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/blueprintFormat.ts b/src/blueprintFormat.ts index 24515ee3..3d61621f 100644 --- a/src/blueprintFormat.ts +++ b/src/blueprintFormat.ts @@ -3,6 +3,8 @@ import FormatPageSvelte from './components/formatPage.svelte' import ProjectTitleSvelte from './components/projectTitle.svelte' import { PACKAGE } from './constants' import { BillboardMode, BoneConfig, LocatorConfig } from './nodeConfigs' +import FormatPageSvelte from './svelte/formatPage.svelte' +import ProjectTitleSvelte from './svelte/projectTitle.svelte' import { process } from './systems/modelDataFixerUpper' import { events } from './util/events' import { injectSvelteCompomponent } from './util/injectSvelteComponent' diff --git a/src/blueprintSettings.ts b/src/blueprintSettings.ts index f9f4e5e6..7a57c670 100644 --- a/src/blueprintSettings.ts +++ b/src/blueprintSettings.ts @@ -1,23 +1,27 @@ import { MinecraftVersion } from './systems/global' import { Valuable } from './util/stores' -export type ExportMode = 'raw' | 'zip' | 'none' +export type ExportMode = 'folder' | 'zip' | 'none' +export type ExportEnvironment = 'vanilla' | 'plugin' +export type DataPackAnimationSystem = 'functions' | 'storage' export const defaultValues = { - export_namespace: 'blueprint', + id: 'animated_java:new_blueprint', + tag_prefix: `aj.new_blueprint`, + auto_generate_tag_prefix: true, show_bounding_box: false, auto_bounding_box: true, bounding_box: [48, 48], // Export Settings - enable_plugin_mode: false, - resource_pack_export_mode: 'raw' as ExportMode, - data_pack_export_mode: 'raw' as ExportMode, + environment: 'vanilla' as ExportEnvironment, + resource_pack_export_mode: 'folder' as ExportMode, + data_pack_export_mode: 'folder' as ExportMode, target_minecraft_versions: ['1.21.4'] as MinecraftVersion[], // Resource Pack Settings - display_item: 'minecraft:white_dye', custom_model_data_offset: 0, enable_advanced_resource_pack_settings: false, resource_pack: '', + display_item: 'minecraft:white_dye', // Data Pack Settings enable_advanced_data_pack_settings: false, data_pack: '', @@ -26,11 +30,11 @@ export const defaultValues = { ticking_commands: '', interpolation_duration: 1, teleportation_duration: 1, - use_storage_for_animation: false, + animation_system: 'functions' as DataPackAnimationSystem, show_function_errors: true, show_outdated_warning: true, // Plugin Settings - baked_animations: true, + bake_animations: false, json_file: '', } diff --git a/src/components/blueprintSettingsDialog.svelte b/src/components/blueprintSettingsDialog.svelte deleted file mode 100644 index 9cc9fda1..00000000 --- a/src/components/blueprintSettingsDialog.svelte +++ /dev/null @@ -1,881 +0,0 @@ - - - - -
- -
- - - - - - - - - {#if !$autoBoundingBox} - - {/if} - - - - - - - - {#if $enablePluginMode} - - - - - - {:else} - - - - - {#if $resourcePackExportMode !== 'none'} - - - - - - - {#if $enableAdvancedResourcePackSettings} -

- {translate('dialog.blueprint_settings.advanced_settings_warning')} -

- - - {/if} - - {#if $resourcePackExportMode === 'raw'} - - {:else if $resourcePackExportMode === 'zip'} - - {/if} - {/if} - - {#if $dataPackExportMode !== 'none'} - - - {#if $dataPackExportMode === 'raw'} - - {:else if $dataPackExportMode === 'zip'} - - {/if} - - - - - - - - - - - - - - - - - {/if} - {/if} -
- -{#if showSupportMePopup} -
-
-
- ❤️ - Animated Java? - - - close - -
- - - -
-
-
-{/if} - - diff --git a/src/components/dialogItems/dialogItemUtil.d.ts b/src/components/dialogItems/dialogItemUtil.d.ts deleted file mode 100644 index 4ff027dc..00000000 --- a/src/components/dialogItems/dialogItemUtil.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -type DialogItemValueChecker = - | ((value: Value) => { type: string; message: string }) - | undefined - -type CollectionItem = { icon?: string; name: string; value: string } diff --git a/src/components/dialogItems/numberSlider.svelte b/src/components/dialogItems/numberSlider.svelte deleted file mode 100644 index 9195d5f7..00000000 --- a/src/components/dialogItems/numberSlider.svelte +++ /dev/null @@ -1,85 +0,0 @@ - - - -
- -
- -
- code -
-
-
-
diff --git a/src/index.ts b/src/index.ts index db3e1408..c65e7e5c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,7 +25,12 @@ import './systems/minecraft/registryManager' import { MINECRAFT_REGISTRY } from './systems/minecraft/registryManager' import resourcepackCompiler from './systems/resourcepackCompiler' import { openExportProgressDialog } from './interface/dialog/exportProgress' -import { isDataPackPath, isResourcePackPath, parseResourcePackPath } from './util/minecraftUtil' +import { + isDataPackPath, + isResourcePackPath, + parseResourceLocation, + parseResourcePackPath, +} from './util/minecraftUtil' import { blueprintSettingErrors } from './blueprintSettings' import { openUnexpectedErrorDialog } from './interface/dialog/unexpectedError' import { BLUEPRINT_CODEC, BLUEPRINT_FORMAT } from './blueprintFormat' @@ -50,6 +55,7 @@ import { checkForIncompatabilities } from './interface/popup/incompatabilityPopu globalThis.AnimatedJava = { API: { parseResourcePackPath, + parseResourceLocation, datapackCompiler, resourcepackCompiler, Variant, diff --git a/src/interface/animatedJavaBarItem.ts b/src/interface/animatedJavaBarItem.ts index b09d3aa2..b782382c 100644 --- a/src/interface/animatedJavaBarItem.ts +++ b/src/interface/animatedJavaBarItem.ts @@ -6,7 +6,7 @@ import { exportProject } from '../systems/exporter' import { createAction, createBarMenu } from '../util/moddingTools' import { translate } from '../util/translation' import { openAboutDialog } from './dialog/about' -import { openBlueprintSettingsDialog } from './dialog/blueprintSettings' +import { openBlueprintSettingsDialog } from '../svelte/blueprintSettings' import { openChangelogDialog } from './changelogDialog' function createIconImg() { @@ -35,61 +35,53 @@ MENU.label.innerHTML = 'Animated Java' MENU.label.prepend(createIconImg()) BLOCKBENCH_MENU_BAR.appendChild(MENU.label) -MenuBar.addAction( - createAction(`${PACKAGE.name}:about`, { - icon: 'info', - category: 'animated_java', - name: translate('action.open_about.name'), - click() { - openAboutDialog() - }, - }), - MENU.id -) +export const OPEN_ABOUT_ACTION = createAction(`${PACKAGE.name}:about`, { + icon: 'info', + category: 'animated_java', + name: translate('action.open_about.name'), + click() { + openAboutDialog() + }, + menu_path: MENU.id, +}) -MenuBar.addAction( - createAction(`${PACKAGE.name}:documentation`, { - icon: 'find_in_page', - category: 'animated_java', - name: translate('action.open_documentation.name'), - click() { - Blockbench.openLink('https://animated-java.dev/docs') - }, - }), - MENU.id -) +export const OPEN_DOCUMENTATION_ACTION = createAction(`${PACKAGE.name}:documentation`, { + icon: 'find_in_page', + category: 'animated_java', + name: translate('action.open_documentation.name'), + click() { + Blockbench.openLink('https://animated-java.dev/docs') + }, + menu_path: MENU.id, +}) -MenuBar.addAction( - createAction(`${PACKAGE.name}:changelog`, { - icon: 'history', - category: 'animated_java', - name: translate('action.open_changelog.name'), - click() { - openChangelogDialog() - }, - }), - MENU.id -) +export const OPEN_CHANGELOG_ACTION = createAction(`${PACKAGE.name}:changelog`, { + icon: 'history', + category: 'animated_java', + name: translate('action.open_changelog.name'), + click() { + openChangelogDialog() + }, + menu_path: MENU.id, +}) MENU.structure.push(new MenuSeparator()) -MenuBar.addAction( - createAction(`${PACKAGE.name}:blueprint_settings`, { - icon: 'settings', - category: 'animated_java', - name: translate('action.open_blueprint_settings.name'), - condition() { - return Format === BLUEPRINT_FORMAT - }, - click() { - openBlueprintSettingsDialog() - }, - }), - MENU.id -) +export const OPEN_BLUEPRINT_SETTINGS_ACTION = createAction(`${PACKAGE.name}:blueprint_settings`, { + icon: 'settings', + category: 'animated_java', + name: translate('action.open_blueprint_settings.name'), + condition() { + return Format === BLUEPRINT_FORMAT + }, + click() { + openBlueprintSettingsDialog() + }, + menu_path: MENU.id, +}) MenuBar.menus[MENU_ID].structure.push({ - id: 'animated_java:extract-open', + id: `${PACKAGE.name}:extract-open`, name: translate('action.extract.name'), icon: 'fa-trash-can', searchable: false, @@ -99,32 +91,28 @@ MenuBar.menus[MENU_ID].structure.push({ }, }) -MenuBar.addAction( - createAction(`${PACKAGE.name}:extract`, { - icon: 'fa-trash-can', - category: 'animated_java', - name: translate('action.extract.confirm'), - condition() { - return Format === BLUEPRINT_FORMAT - }, - click() { - void cleanupExportedFiles() - }, - }), - MENU_ID + '.animated_java:extract-open' -) +export const EXTRACT_ACTION = createAction(`${PACKAGE.name}:extract`, { + icon: 'fa-trash-can', + category: `${PACKAGE.name}`, + name: translate('action.extract.confirm'), + condition() { + return Format === BLUEPRINT_FORMAT + }, + click() { + void cleanupExportedFiles() + }, + menu_path: MENU_ID + `.${PACKAGE.name}:extract-open`, +}) -MenuBar.addAction( - createAction(`${PACKAGE.name}:export`, { - icon: 'insert_drive_file', - category: 'animated_java', - name: translate('action.export.name'), - condition() { - return Format === BLUEPRINT_FORMAT - }, - click() { - void exportProject() - }, - }), - MENU.id -) +export const EXPORT_ACTION = createAction(`${PACKAGE.name}:export`, { + icon: 'insert_drive_file', + category: 'animated_java', + name: translate('action.export.name'), + condition() { + return Format === BLUEPRINT_FORMAT + }, + click() { + void exportProject() + }, + menu_path: MENU.id, +}) diff --git a/src/interface/changelogDialog.ts b/src/interface/changelogDialog.ts index d3070fd7..25cb8ccc 100644 --- a/src/interface/changelogDialog.ts +++ b/src/interface/changelogDialog.ts @@ -1,4 +1,4 @@ -import ChangelogDialog from '../components/changelogDialog.svelte' +import ChangelogDialog from '../svelte/changelogDialog.svelte' import { PACKAGE } from '../constants' import { SvelteDialog } from '../util/svelteDialog' import { translate } from '../util/translation' diff --git a/src/interface/dialog/about.ts b/src/interface/dialog/about.ts index 050186e3..1c5d4830 100644 --- a/src/interface/dialog/about.ts +++ b/src/interface/dialog/about.ts @@ -1,5 +1,5 @@ import { PACKAGE } from '../../constants' -import AboutSvelte from '../../components/about.svelte' +import AboutSvelte from '../../svelte/about.svelte' import { SvelteDialog } from '../../util/svelteDialog' import { translate } from '../../util/translation' diff --git a/src/interface/dialog/animationProperties.ts b/src/interface/dialog/animationProperties.ts index c867ecf3..8b61331e 100644 --- a/src/interface/dialog/animationProperties.ts +++ b/src/interface/dialog/animationProperties.ts @@ -1,4 +1,4 @@ -import AniamtionPropertiesSvelteComponent from '../../components/animationProperties.svelte' +import AniamtionPropertiesSvelteComponent from '../../svelte/animationProperties.svelte' import { PACKAGE } from '../../constants' import { Valuable } from '../../util/stores' import { SvelteDialog } from '../../util/svelteDialog' diff --git a/src/interface/dialog/blueprintSettings.ts b/src/interface/dialog/blueprintSettings.ts deleted file mode 100644 index ba5fad0a..00000000 --- a/src/interface/dialog/blueprintSettings.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { updateBoundingBox } from '../../blueprintFormat' -import { defaultValues, ExportMode } from '../../blueprintSettings' -import BlueprintSettingsDialogSvelteComponent from '../../components/blueprintSettingsDialog.svelte' -import { PACKAGE } from '../../constants' -import { MinecraftVersion } from '../../systems/global' -import { sanitizePathName } from '../../util/minecraftUtil' -import { Valuable } from '../../util/stores' -import { SvelteDialog } from '../../util/svelteDialog' -import { translate } from '../../util/translation' - -function getSettings() { - return { - blueprintName: new Valuable(Project!.name, value => { - if (!value) { - return 'My Blueprint' - } - return value - }), - textureSizeX: new Valuable(Project!.texture_width), - textureSizeY: new Valuable(Project!.texture_height), - showBoundingBox: new Valuable(Project!.animated_java.show_bounding_box), - autoBoundingBox: new Valuable(Project!.animated_java.auto_bounding_box), - boundingBoxX: new Valuable(Project!.animated_java.bounding_box[0]), - boundingBoxY: new Valuable(Project!.animated_java.bounding_box[1]), - // Export Settings - enablePluginMode: new Valuable(Project!.animated_java.enable_plugin_mode), - exportNamespace: new Valuable(Project!.animated_java.export_namespace, value => { - if (!value) { - return defaultValues.export_namespace - } - return sanitizePathName(value) - }), - resourcePackExportMode: new Valuable( - Project!.animated_java.resource_pack_export_mode as string - ), - dataPackExportMode: new Valuable(Project!.animated_java.data_pack_export_mode as string), - targetMinecraftVersions: new Valuable(Project!.animated_java.target_minecraft_versions), - // Resource Pack Settings - displayItem: new Valuable(Project!.animated_java.display_item, value => { - if (!value) { - return defaultValues.display_item - } - return value - }), - customModelDataOffset: new Valuable(Project!.animated_java.custom_model_data_offset), - enableAdvancedResourcePackSettings: new Valuable( - Project!.animated_java.enable_advanced_resource_pack_settings - ), - resourcePack: new Valuable(Project!.animated_java.resource_pack), - // Data Pack Settings - enableAdvancedDataPackSettings: new Valuable( - Project!.animated_java.enable_advanced_data_pack_settings - ), - dataPack: new Valuable(Project!.animated_java.data_pack), - summonCommands: new Valuable(Project!.animated_java.summon_commands), - removeCommands: new Valuable(Project!.animated_java.remove_commands), - tickingCommands: new Valuable(Project!.animated_java.ticking_commands), - interpolationDuration: new Valuable(Project!.animated_java.interpolation_duration), - teleportationDuration: new Valuable(Project!.animated_java.teleportation_duration), - useStorageForAnimation: new Valuable(Project!.animated_java.use_storage_for_animation), - showFunctionErrors: new Valuable(Project!.animated_java.show_function_errors), - showOutdatedWarning: new Valuable(Project!.animated_java.show_outdated_warning), - // Plugin Settings - bakedAnimations: new Valuable(Project!.animated_java.baked_animations), - jsonFile: new Valuable(Project!.animated_java.json_file), - } -} - -function setSettings(settings: ReturnType) { - if (!Project) return - Project.name = settings.blueprintName.get() - - setProjectResolution(settings.textureSizeX.get(), settings.textureSizeY.get(), true) - - Project.animated_java.show_bounding_box = settings.showBoundingBox.get() - Project.animated_java.auto_bounding_box = settings.autoBoundingBox.get() - Project.animated_java.bounding_box = [settings.boundingBoxX.get(), settings.boundingBoxY.get()] - - // Export Settings - Project.animated_java.enable_plugin_mode = settings.enablePluginMode.get() - Project.pluginMode.set(settings.enablePluginMode.get()) // Required to update the project title. - Project.animated_java.export_namespace = settings.exportNamespace.get() - Project.animated_java.resource_pack_export_mode = - settings.resourcePackExportMode.get() as ExportMode - Project.animated_java.data_pack_export_mode = settings.dataPackExportMode.get() as ExportMode - Project.animated_java.target_minecraft_versions = - settings.targetMinecraftVersions.get() as MinecraftVersion[] - // Resource Pack Settings - Project.animated_java.display_item = settings.displayItem.get() - Project.animated_java.custom_model_data_offset = settings.customModelDataOffset.get() - Project.animated_java.enable_advanced_resource_pack_settings = - settings.enableAdvancedResourcePackSettings.get() - Project.animated_java.resource_pack = settings.resourcePack.get() - // Data Pack Settings - Project.animated_java.enable_advanced_data_pack_settings = - settings.enableAdvancedDataPackSettings.get() - Project.animated_java.data_pack = settings.dataPack.get() - Project.animated_java.summon_commands = settings.summonCommands.get() - Project.animated_java.remove_commands = settings.removeCommands.get() - Project.animated_java.ticking_commands = settings.tickingCommands.get() - Project.animated_java.interpolation_duration = settings.interpolationDuration.get() - Project.animated_java.teleportation_duration = settings.teleportationDuration.get() - Project.animated_java.use_storage_for_animation = settings.useStorageForAnimation.get() - Project.animated_java.show_function_errors = settings.showFunctionErrors.get() - Project.animated_java.show_outdated_warning = settings.showOutdatedWarning.get() - // Plugin Settings - Project.animated_java.baked_animations = settings.bakedAnimations.get() - Project.animated_java.json_file = settings.jsonFile.get() - console.log('Successfully saved project settings', Project) -} - -export function openBlueprintSettingsDialog() { - if (!Project) return - - const settings = getSettings() - return new SvelteDialog({ - id: `${PACKAGE.name}:blueprintSettingsDialog`, - title: translate('dialog.blueprint_settings.title'), - width: 700, - component: BlueprintSettingsDialogSvelteComponent, - props: settings, - preventKeybinds: true, - onConfirm() { - setSettings(settings) - updateBoundingBox() - }, - }).show() -} diff --git a/src/interface/dialog/boneConfig.ts b/src/interface/dialog/boneConfig.ts index 94dacfa5..2755b89a 100644 --- a/src/interface/dialog/boneConfig.ts +++ b/src/interface/dialog/boneConfig.ts @@ -1,6 +1,6 @@ import { BLUEPRINT_FORMAT } from '../../blueprintFormat' import { BoneConfig } from '../../nodeConfigs' -import BoneConfigDialogSvelteComponent from '../../components/boneConfigDialog.svelte' +import BoneConfigDialogSvelteComponent from '../../svelte/boneConfigDialog.svelte' import { PACKAGE } from '../../constants' import { createAction } from '../../util/moddingTools' import { Valuable } from '../../util/stores' diff --git a/src/interface/dialog/changelog.ts b/src/interface/dialog/changelog.ts index de6aa3b6..308c67d8 100644 --- a/src/interface/dialog/changelog.ts +++ b/src/interface/dialog/changelog.ts @@ -1,4 +1,4 @@ -import ChangelogDialog from '../../components/changelogDialog.svelte' +import ChangelogDialog from '../../svelte/changelogDialog.svelte' import { PACKAGE } from '../../constants' import { SvelteDialog } from '../../util/svelteDialog' import { translate } from '../../util/translation' diff --git a/src/interface/dialog/exportProgress.ts b/src/interface/dialog/exportProgress.ts index 38fa54da..38db18d4 100644 --- a/src/interface/dialog/exportProgress.ts +++ b/src/interface/dialog/exportProgress.ts @@ -1,4 +1,4 @@ -import ExportProgressDialogSvelteComponent from '../../components/exportProgressDialog.svelte' +import ExportProgressDialogSvelteComponent from '../../svelte/exportProgressDialog.svelte' import { PACKAGE } from '../../constants' import { Valuable } from '../../util/stores' import { SvelteDialog } from '../../util/svelteDialog' diff --git a/src/interface/dialog/locatorConfig.ts b/src/interface/dialog/locatorConfig.ts index 5e75e6a2..1f56446e 100644 --- a/src/interface/dialog/locatorConfig.ts +++ b/src/interface/dialog/locatorConfig.ts @@ -1,5 +1,5 @@ import { BLUEPRINT_FORMAT } from '../../blueprintFormat' -import LocatorConfigDialog from '../../components/locatorConfigDialog.svelte' +import LocatorConfigDialog from '../../svelte/locatorConfigDialog.svelte' import { PACKAGE } from '../../constants' import { LocatorConfig } from '../../nodeConfigs' import { createAction } from '../../util/moddingTools' diff --git a/src/interface/dialog/textDisplayConfig.ts b/src/interface/dialog/textDisplayConfig.ts index 2042ed9e..e6e30698 100644 --- a/src/interface/dialog/textDisplayConfig.ts +++ b/src/interface/dialog/textDisplayConfig.ts @@ -6,7 +6,7 @@ import { Valuable } from '../../util/stores' import { SvelteDialog } from '../../util/svelteDialog' import { translate } from '../../util/translation' import { Variant } from '../../variants' -import TextDisplayConfigDialog from '../../components/textDisplayConfigDialog.svelte' +import TextDisplayConfigDialog from '../../svelte/textDisplayConfigDialog.svelte' import { TextDisplay } from '../../outliner/textDisplay' export function openBoneConfigDialog(bone: TextDisplay) { diff --git a/src/interface/dialog/unexpectedError.ts b/src/interface/dialog/unexpectedError.ts index c15aa402..e913f432 100644 --- a/src/interface/dialog/unexpectedError.ts +++ b/src/interface/dialog/unexpectedError.ts @@ -1,4 +1,4 @@ -import UnexpectedErrorDialog from '../../components/unexpectedErrorDialog.svelte' +import UnexpectedErrorDialog from '../../svelte/unexpectedErrorDialog.svelte' import { PACKAGE } from '../../constants' import { SvelteDialog } from '../../util/svelteDialog' import { translate } from '../../util/translation' diff --git a/src/interface/dialog/vanillaBlockDisplayConfig.ts b/src/interface/dialog/vanillaBlockDisplayConfig.ts index c1773a56..a8d99350 100644 --- a/src/interface/dialog/vanillaBlockDisplayConfig.ts +++ b/src/interface/dialog/vanillaBlockDisplayConfig.ts @@ -7,7 +7,7 @@ import { SvelteDialog } from '../../util/svelteDialog' import { translate } from '../../util/translation' import { Variant } from '../../variants' import { VanillaBlockDisplay } from '../../outliner/vanillaBlockDisplay' -import VanillaBlockDisplayConfigDialog from '../../components/vanillaBlockDisplayConfigDialog.svelte' +import VanillaBlockDisplayConfigDialog from '../../svelte/vanillaBlockDisplayConfigDialog.svelte' export function openVanillaBlockDisplayConfigDialog(display: VanillaBlockDisplay) { // Blockbench's JSON stringifier doesn't handle custom toJSON functions, so I'm storing the config JSON in the bone instead of the actual BoneConfig object diff --git a/src/interface/dialog/vanillaItemDisplayConfig.ts b/src/interface/dialog/vanillaItemDisplayConfig.ts index 1cf0ae90..d75fc0c5 100644 --- a/src/interface/dialog/vanillaItemDisplayConfig.ts +++ b/src/interface/dialog/vanillaItemDisplayConfig.ts @@ -7,7 +7,7 @@ import { SvelteDialog } from '../../util/svelteDialog' import { translate } from '../../util/translation' import { Variant } from '../../variants' import { VanillaItemDisplay } from '../../outliner/vanillaItemDisplay' -import VanillaItemDisplayConfigDialog from '../../components/vanillaItemDisplayConfigDialog.svelte' +import VanillaItemDisplayConfigDialog from '../../svelte/vanillaItemDisplayConfigDialog.svelte' export function openVanillaItemDisplayConfigDialog(display: VanillaItemDisplay) { // Blockbench's JSON stringifier doesn't handle custom toJSON functions, so I'm storing the config JSON in the bone instead of the actual BoneConfig object diff --git a/src/interface/dialog/variantConfig.ts b/src/interface/dialog/variantConfig.ts index afcec7dd..f5a6b4a0 100644 --- a/src/interface/dialog/variantConfig.ts +++ b/src/interface/dialog/variantConfig.ts @@ -1,4 +1,4 @@ -import VariantConfigDialogSvelteComponent from '../../components/variantConfigDialog.svelte' +import VariantConfigDialogSvelteComponent from '../../svelte/variantConfigDialog.svelte' import { PACKAGE } from '../../constants' import { events } from '../../util/events' import { Valuable } from '../../util/stores' diff --git a/src/interface/importAJModelLoader.ts b/src/interface/importAJModelLoader.ts index a0d31fb6..e3537e4f 100644 --- a/src/interface/importAJModelLoader.ts +++ b/src/interface/importAJModelLoader.ts @@ -1,13 +1,13 @@ import { SvelteComponentDev } from 'svelte/internal' -import { BLUEPRINT_CODEC, IBlueprintFormatJSON } from '../blueprintFormat' -import ImportAjModelLoaderDialog from '../components/importAJModelLoaderDialog.svelte' +import ImportAjModelLoaderDialog from '../svelte/importAJModelLoaderDialog.svelte' import { PACKAGE } from '../constants' -import * as ModelDatFixerUpper from '../systems/modelDataFixerUpper' import { injectSvelteCompomponent } from '../util/injectSvelteComponent' import { sanitizePathName } from '../util/minecraftUtil' import { createModelLoader } from '../util/moddingTools' import { translate } from '../util/translation' import { openUnexpectedErrorDialog } from './dialog/unexpectedError' +import * as ModelDatFixerUpper from '../systems/modelDataFixerUpper' +import { BLUEPRINT_CODEC, IBlueprintFormatJSON } from '../blueprintFormat' let activeComponent: SvelteComponentDev | null = null diff --git a/src/interface/index.ts b/src/interface/index.ts index ddad7aca..a6494698 100644 --- a/src/interface/index.ts +++ b/src/interface/index.ts @@ -1,6 +1,5 @@ import './dialog/about' import './dialog/animationProperties' -import './dialog/blueprintSettings' import './dialog/boneConfig' import './dialog/changelog' import './dialog/exportProgress' diff --git a/src/interface/keyframeEasings.ts b/src/interface/keyframeEasings.ts index 787d916b..be77e659 100644 --- a/src/interface/keyframeEasings.ts +++ b/src/interface/keyframeEasings.ts @@ -1,4 +1,4 @@ -import KeyframeEasingsSvelte from '../components/keyframeEasings.svelte' +import KeyframeEasingsSvelte from '../svelte/keyframeEasings.svelte' import { injectSvelteCompomponentMod } from '../util/injectSvelteComponent' injectSvelteCompomponentMod({ diff --git a/src/interface/panel/customKeyframe.ts b/src/interface/panel/customKeyframe.ts index df918b17..f2f087b9 100644 --- a/src/interface/panel/customKeyframe.ts +++ b/src/interface/panel/customKeyframe.ts @@ -1,6 +1,6 @@ import type { SvelteComponentDev } from 'svelte/internal' import { isCurrentFormat } from '../../blueprintFormat' -import CustomKeyframePanelSvelteComponent from '../../components/customKeyframePanel.svelte' +import CustomKeyframePanelSvelteComponent from '../../svelte/customKeyframePanel.svelte' import { CUSTOM_CHANNELS } from '../../mods/customKeyframesMod' import { events } from '../../util/events' import { injectSvelteCompomponent } from '../../util/injectSvelteComponent' diff --git a/src/interface/panel/textDisplayElement.ts b/src/interface/panel/textDisplayElement.ts index dc42a04c..325a315d 100644 --- a/src/interface/panel/textDisplayElement.ts +++ b/src/interface/panel/textDisplayElement.ts @@ -1,5 +1,5 @@ import { isCurrentFormat } from '../../blueprintFormat' -import TextDisplayElementPanel from '../../components/textDisplayElementPanel.svelte' +import TextDisplayElementPanel from '../../svelte/textDisplayElementPanel.svelte' import { PACKAGE } from '../../constants' import { Alignment, TextDisplay } from '../../outliner/textDisplay' import { injectSvelteCompomponentMod } from '../../util/injectSvelteComponent' diff --git a/src/interface/panel/vanillaBlockDisplayElement.ts b/src/interface/panel/vanillaBlockDisplayElement.ts index f55ba202..427dbb7b 100644 --- a/src/interface/panel/vanillaBlockDisplayElement.ts +++ b/src/interface/panel/vanillaBlockDisplayElement.ts @@ -1,4 +1,4 @@ -import VanillaBlockDisplayElementPanel from '../../components/vanillaBlockDisplayElementPanel.svelte' +import VanillaBlockDisplayElementPanel from '../../svelte/vanillaBlockDisplayElementPanel.svelte' import { injectSvelteCompomponentMod } from '../../util/injectSvelteComponent' injectSvelteCompomponentMod({ diff --git a/src/interface/panel/vanillaItemDisplayElement.ts b/src/interface/panel/vanillaItemDisplayElement.ts index 2b1dfee7..664acdd0 100644 --- a/src/interface/panel/vanillaItemDisplayElement.ts +++ b/src/interface/panel/vanillaItemDisplayElement.ts @@ -1,5 +1,5 @@ import { isCurrentFormat } from '../../blueprintFormat' -import VanillaItemDisplayElementPanel from '../../components/vanillaItemDisplayElementPanel.svelte' +import VanillaItemDisplayElementPanel from '../../svelte/vanillaItemDisplayElementPanel.svelte' import { PACKAGE } from '../../constants' import { ItemDisplayMode, VanillaItemDisplay } from '../../outliner/vanillaItemDisplay' import { events } from '../../util/events' diff --git a/src/interface/panel/variants.ts b/src/interface/panel/variants.ts index 26ca68ff..9f4731b8 100644 --- a/src/interface/panel/variants.ts +++ b/src/interface/panel/variants.ts @@ -1,5 +1,5 @@ import { isCurrentFormat } from '../../blueprintFormat' -import VariantsPanel from '../../components/variantsPanel.svelte' +import VariantsPanel from '../../svelte/variantsPanel.svelte' import { PACKAGE } from '../../constants' import { createAction, createMenu } from '../../util/moddingTools' import { SveltePanel } from '../../util/sveltePanel' diff --git a/src/interface/popup/animatedJavaLoading.ts b/src/interface/popup/animatedJavaLoading.ts index ec808005..8503ebbd 100644 --- a/src/interface/popup/animatedJavaLoading.ts +++ b/src/interface/popup/animatedJavaLoading.ts @@ -1,5 +1,5 @@ import { SvelteComponentDev } from 'svelte/internal' -import AnimatedJavaLoadingPopup from '../../components/animatedJavaLoadingPopup.svelte' +import AnimatedJavaLoadingPopup from '../../svelte/animatedJavaLoadingPopup.svelte' import { injectSvelteCompomponent } from '../../util/injectSvelteComponent' import { Valuable } from '../../util/stores' diff --git a/src/interface/popup/blueprintLoading.ts b/src/interface/popup/blueprintLoading.ts index 9ae44be5..6c4d9a04 100644 --- a/src/interface/popup/blueprintLoading.ts +++ b/src/interface/popup/blueprintLoading.ts @@ -1,4 +1,4 @@ -import BlueprintLoadingPopup from '../../components/blueprintLoadingPopup.svelte' +import BlueprintLoadingPopup from '../../svelte/blueprintLoadingPopup.svelte' import { PACKAGE } from '../../constants' import { Valuable } from '../../util/stores' import { SvelteDialog } from '../../util/svelteDialog' diff --git a/src/interface/popup/incompatabilityPopup.ts b/src/interface/popup/incompatabilityPopup.ts index 65032eee..a03861cf 100644 --- a/src/interface/popup/incompatabilityPopup.ts +++ b/src/interface/popup/incompatabilityPopup.ts @@ -1,4 +1,4 @@ -import IncompatabilityPopup from '../../components/incompatabilityPopup.svelte' +import IncompatabilityPopup from '../../svelte/incompatabilityPopup.svelte' import { PACKAGE } from '../../constants' import { SvelteDialog } from '../../util/svelteDialog' import { translate } from '../../util/translation' diff --git a/src/interface/popup/installed.ts b/src/interface/popup/installed.ts index 9ea89d25..1e2141fe 100644 --- a/src/interface/popup/installed.ts +++ b/src/interface/popup/installed.ts @@ -1,4 +1,4 @@ -import InstalledPopup from '../../components/installedPopup.svelte' +import InstalledPopup from '../../svelte/installedPopup.svelte' import { PACKAGE } from '../../constants' import { SvelteDialog } from '../../util/svelteDialog' import { translate } from '../../util/translation' diff --git a/src/lang/en.yml b/src/lang/en.yml index 2d7a9cee..b3ddd821 100644 --- a/src/lang/en.yml +++ b/src/lang/en.yml @@ -1,3 +1,86 @@ +# ---------------------------------------- +# NEW TRANSLATIONS +# ---------------------------------------- +dialog: + error: + # Generic Errors + function_file.no_leading_slash: Commands inside of function files cannot start with a leading slash! + no_folder_selected: No folder selected! + folder_does_not_exist: The selected folder does not exist! + not_a_folder: The selected path is not a folder! + no_file_selected: No file selected! + file_does_not_exist: The selected file does not exist! + not_a_file: The selected path is not a file! + not_a_zip_file: The selected file is not a `.zip` file! + + placeholder: + select_a_folder: Select a folder... + select_a_file: Select a file... + + blueprint_settings: + title: Blueprint Settings + general: + plugin: + + resourcepack: + error: + missing_assets_folder: The selected Resource Pack is missing an assets folder! + + datapack: + error: + missing_pack_mcmeta: The selected folder is missing a pack.mcmeta file! + warning: + missing_data_folder: The selected Data Pack is missing a data folder! + + export_mode.folder: + label: Export to Folder + description: Export the generated Data Pack to a folder. + export_mode.zip: + label: Export to Zip + description: Export the generated Data Pack to a `.zip` file. + export_mode.none: + label: Do Not Export + description: Do not export the generated Data Pack. + + export_folder.label: Export Folder + export_folder.description: Choose the folder to export the Data Pack into. + + export_zip.label: Export Zip + export_zip.description: Choose the `.zip` file to export the Data Pack into. + + on_summon_commands.label: On-Summon Commands + on_summon_commands.description: |- + Commands that will be run as the root entity when the model is summoned. + This input is treated as a function file, and supports [MC-Build](https://mcbuild.dev/) syntax. + + on_tick_commands.label: On-Tick Commands + on_tick_commands.description: |- + Commands that will be run as the root entity every tick. + This input is treated as a function file, and supports [MC-Build](https://mcbuild.dev/) syntax. + + interpolation_duration.label: Interpolation Duration + interpolation_duration.description: |- + How much time it takes for the model to transition from one frame to the next. Higher values will cause animations to lose precision. + Usually you want this to have a value of 1 or 2. + + teleportation_duration.label: Teleport Duration + teleportation_duration.description: |- + How much time over which the model will visually interpolate between it's old position to it's new position when teleported. + + animation_system.label: Animation System + animation_system.description: |- + Choose the animation system to use for the project. + animation_system.functions: + label: Function-based + description: Fast and simple, but creates a lot of function files. + animation_system.storage: + label: Storage-based + description: 42% Slower than function-based, but creates far fewer function files. + +# ---------------------------------------- +# OLD TRANSLATIONS +# ---------------------------------------- + ### Actions animated_java.action.open_blueprint_settings.name: Blueprint Settings animated_java.action.open_documentation.name: Documentation diff --git a/src/mods/formatIconMod.ts b/src/mods/formatIconMod.ts index 4a855724..9d845a32 100644 --- a/src/mods/formatIconMod.ts +++ b/src/mods/formatIconMod.ts @@ -1,4 +1,4 @@ -import Icon from '../components/icon.svelte' +import Icon from '../svelte/icon.svelte' import { PACKAGE } from '../constants' import { injectSvelteCompomponent } from '../util/injectSvelteComponent' import { createBlockbenchMod } from '../util/moddingTools' diff --git a/src/mods/index.ts b/src/mods/index.ts index 7776807d..c6aaa7f3 100644 --- a/src/mods/index.ts +++ b/src/mods/index.ts @@ -29,3 +29,4 @@ import './showDefaultPoseMod' import './variantPreviewCubeFaceMod' import './cameraNameMod' import './pluginsDialogMod' +import './prismMod' diff --git a/src/mods/pluginsDialogMod.ts b/src/mods/pluginsDialogMod.ts index 36d841c9..0958900e 100644 --- a/src/mods/pluginsDialogMod.ts +++ b/src/mods/pluginsDialogMod.ts @@ -1,4 +1,4 @@ -import IncompatiblePluginNotice from '../components/incompatiblePluginNotice.svelte' +import IncompatiblePluginNotice from '../svelte/incompatiblePluginNotice.svelte' import { PACKAGE } from '../constants' import { injectSvelteCompomponentMod } from '../util/injectSvelteComponent' import { createBlockbenchMod } from '../util/moddingTools' diff --git a/src/mods/prismMod.ts b/src/mods/prismMod.ts new file mode 100644 index 00000000..6cb920eb --- /dev/null +++ b/src/mods/prismMod.ts @@ -0,0 +1,351 @@ +Prism.languages.clike = { + comment: [ + { + pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, + lookbehind: true, + greedy: true, + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true, + greedy: true, + }, + ], + string: { + pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + greedy: true, + }, + 'class-name': { + pattern: + /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, + lookbehind: true, + inside: { + punctuation: /[.\\]/, + }, + }, + keyword: + /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, + boolean: /\b(?:false|true)\b/, + function: /\b\w+(?=\()/, + number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, + operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, + punctuation: /[{}[\];(),.:]/, +} + +Prism.languages.javascript = Prism.languages.extend('clike', { + 'class-name': [ + // @ts-expect-error + Prism.languages.clike['class-name'], + { + pattern: + /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, + lookbehind: true, + }, + ], + keyword: [ + { + pattern: /((?:^|\})\s*)catch\b/, + lookbehind: true, + }, + { + pattern: + /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + lookbehind: true, + }, + ], + // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) + function: + /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, + number: { + pattern: RegExp( + /(^|[^\w$])/.source + + '(?:' + + // constant + (/NaN|Infinity/.source + + '|' + + // binary integer + /0[bB][01]+(?:_[01]+)*n?/.source + + '|' + + // octal integer + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + + '|' + + // hexadecimal integer + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + + '|' + + // decimal bigint + /\d+(?:_\d+)*n/.source + + '|' + + // decimal number (integer or float) but no bigint + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/ + .source) + + ')' + + /(?![\w$])/.source + ), + lookbehind: true, + }, + operator: + /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/, +}) + +// @ts-expect-error +Prism.languages.javascript['class-name'][0].pattern = + /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/ + +Prism.languages.insertBefore('javascript', 'keyword', { + regex: { + pattern: RegExp( + // lookbehind + /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + + // Regex pattern: + // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character + // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible + // with the only syntax, so we have to define 2 different regex patterns. + /\//.source + + '(?:' + + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\[\r\n])+\/[dgimyus]{0,7}/.source + + '|' + + // `v` flag syntax. This supports 3 levels of nested character classes. + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/ + .source + + ')' + + // lookahead + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source + ), + lookbehind: true, + greedy: true, + inside: { + 'regex-source': { + pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, + lookbehind: true, + alias: 'language-regex', + inside: Prism.languages.regex, + }, + 'regex-delimiter': /^\/|\/$/, + 'regex-flags': /^[a-z]+$/, + }, + }, + // This must be declared before keyword because we use "function" inside the look-forward + 'function-variable': { + pattern: + /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, + alias: 'function', + }, + parameter: [ + { + pattern: + /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, + lookbehind: true, + inside: Prism.languages.javascript, + }, + { + pattern: + /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, + lookbehind: true, + inside: Prism.languages.javascript, + }, + { + pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, + lookbehind: true, + inside: Prism.languages.javascript, + }, + { + pattern: + /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, + lookbehind: true, + inside: Prism.languages.javascript, + }, + ], + constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/, +}) + +Prism.languages.insertBefore('javascript', 'string', { + hashbang: { + pattern: /^#!.*/, + greedy: true, + alias: 'comment', + }, + 'template-string': { + pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, + greedy: true, + inside: { + 'template-punctuation': { + pattern: /^`|`$/, + alias: 'string', + }, + interpolation: { + pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, + lookbehind: true, + inside: { + 'interpolation-punctuation': { + pattern: /^\$\{|\}$/, + alias: 'punctuation', + }, + rest: Prism.languages.javascript, + }, + }, + string: /[\s\S]+/, + }, + }, + 'string-property': { + pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, + lookbehind: true, + greedy: true, + alias: 'property', + }, +}) + +Prism.languages.insertBefore('javascript', 'operator', { + 'literal-property': { + pattern: + /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, + lookbehind: true, + alias: 'property', + }, +}) + +Prism.languages['mcfunction'] = { + comment: { + pattern: /^#.*/m, + greedy: true, + }, + string: { + pattern: /"(?:\\.|[^\\"])*"/, + greedy: true, + }, + number: { + pattern: /\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/, + greedy: true, + }, + boolean: { + pattern: /\b(?:true|false)\b/, + greedy: true, + }, + uuid: { + pattern: /\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b/, + greedy: true, + }, + selector: { + pattern: /@[a-z]/, + greedy: true, + }, + keyword: { + pattern: + /\b(?:execute|run|if|unless|function|schedule|tag|advancement|enchantment|item_modifier|loot_table|predicate|recipe|chat_type|damage_type|dimension|dimension_type|worldgen|block|tick|load|clock|REPEAT|IF|ELSE)\b/, + greedy: true, + }, + operator: { + pattern: /[~%^?!+*<>\\/|&=.:,;-]/, + greedy: true, + }, + 'macro-indicator': { + pattern: /^[ \t]*\$/, + alias: ['italic', 'operator'], + }, + property: { + pattern: /[a-z_][a-z0-9_]*\s*:/, + greedy: true, + }, + function: { + pattern: /\b[a-z_][a-z0-9_]*\b/, + greedy: true, + }, +} + +Prism.languages['mc-build'] = { + comment: { + pattern: /^[ \t]*#.*/m, + greedy: true, + }, + 'inline-js': { + pattern: /<%[^%]+%>/, + inside: { + keyword: /<%|%>/, + js: { + pattern: /.+/, + inside: Prism.languages.javascript, + }, + }, + }, + 'multiline-js': { + pattern: /<%%[\s\S]*?%%>/, + inside: { + keyword: /<%%|%%>/, + js: { + pattern: /[\s\S]+/, + inside: Prism.languages.javascript, + }, + }, + }, + 'schedule-block': { + pattern: /^[ \t]*\$?schedule\s+(\d+(t|s|d))(?:\s+(replace|append))?\s*{[\s\S]*?^[ \t]*}$/m, + inside: { + operator: /\$(?=schedule)/, + keyword: /^[ \t]*\$?schedule/, + constant: /(\d+(t|s|d))/, + 'keyword-other': { + pattern: /\b(replace|append)\b/, + alias: 'keyword', + }, + content: { + pattern: /{[\s\S]*}/, + get inside() { + return Prism.languages['mc-build'] + }, + }, + }, + }, + 'function-block': { + pattern: /block\s*[a-z0-9_]*\s*{(?:$|({.+|with .+)$)/m, + inside: { + keyword: /^block/, + entity: /[a-z0-9_]+/, + content: { + pattern: /{[\s\S]*}/, + get inside() { + return Prism.languages['mc-build'] + }, + }, + }, + }, + execute: { + pattern: + /((?: |^[ \t]*)(\$?execute\b)|(\belse \$?execute\b)|else)[\s\S]*?(?: |^[ \t]*)(\$?run\b)/m, + inside: { + keyword: /(\$?execute\b|\belse \$?execute\b|else|\$?run\b)/, + operator: /\$/, + content: { + pattern: /[\s\S]+/, + get inside() { + return Prism.languages['mc-build'] + }, + }, + }, + }, + 'execute-if-function': { + pattern: /(if|unless)\s+function\s*{[\s\S]*?^[ \t]*}$/m, + inside: { + keyword: /(if|unless)/, + entity: /function/, + content: { + pattern: /{[\s\S]*}/, + get inside() { + return Prism.languages['mc-build'] + }, + }, + }, + }, + 'special-function-call': { + pattern: /^[ \t]*function\s+#?(?:\*|\.?\.\/).+?(?: |$)/m, + inside: { + keyword: /^function/, + entity: /#?(?:\*|\.?\.\/).+?(?: |$)/, + content: { + pattern: /.+/, + get inside() { + return Prism.languages['mc-build'] + }, + }, + }, + }, + ...Prism.languages['mcfunction'], +} diff --git a/src/mods/projectSettingsActionOverride.ts b/src/mods/projectSettingsActionOverride.ts index 2cdd50d8..d14a47c9 100644 --- a/src/mods/projectSettingsActionOverride.ts +++ b/src/mods/projectSettingsActionOverride.ts @@ -1,6 +1,6 @@ import PACKAGE from '../../package.json' import { BLUEPRINT_FORMAT } from '../blueprintFormat' -import { openBlueprintSettingsDialog } from '../interface/dialog/blueprintSettings' +import { openBlueprintSettingsDialog } from '../svelte/blueprintSettings' import { createBlockbenchMod } from '../util/moddingTools' createBlockbenchMod( diff --git a/src/svelte/about.svelte b/src/svelte/about.svelte new file mode 100644 index 00000000..7d3c8bbc --- /dev/null +++ b/src/svelte/about.svelte @@ -0,0 +1,209 @@ + + +
+
+ + +
+

Animated Java

+

{PACKAGE.display_version}

+
+
+ + + +

Created by Titus Evans (SnaveSutit)

+

+ {PACKAGE.description} +

+ +

Special Thanks to

+
+
+

Ian Senne (FetchBot)

+

For always being there to help.

+
+
+

Jesse Spicer (Dominexis)

+

For making quaternions and matrices make sense.

+
+
+

Jannis Petersen

+

For creating an amazing tool and community.

+
+
+

Ewan Howell

+

For keeping me sane as I dig through Blockbench source code.

+
+
+

Boxic

+

For throwing absurd amounts of money at me.

+
+
+

Flubberschnub

+

For showing off the power of AJ with his boss fights.

+
+
+ +

Ko-fi Supporters

+
+ {#each PACKAGE.subscription_supporters.sort() as special} +

{special}

+ {/each} +
+ +

Cool People who helped make AJ what it is today

+
+ {#each PACKAGE.special_thanks.sort() as special} +

{special}

+ {/each} +
+
+ + diff --git a/src/components/animatedJavaLoadingPopup.svelte b/src/svelte/animatedJavaLoadingPopup.svelte similarity index 100% rename from src/components/animatedJavaLoadingPopup.svelte rename to src/svelte/animatedJavaLoadingPopup.svelte diff --git a/src/components/animationProperties.svelte b/src/svelte/animationProperties.svelte similarity index 88% rename from src/components/animationProperties.svelte rename to src/svelte/animationProperties.svelte index 35fe7b57..65016624 100644 --- a/src/components/animationProperties.svelte +++ b/src/svelte/animationProperties.svelte @@ -1,14 +1,14 @@ + + + +{#if $datapackExportMode !== 'none'} + {#if $datapackExportMode === 'folder'} + + {:else} + + {/if} + + + + + + + + + + +{/if} diff --git a/src/svelte/blueprintSettings/pages/general.svelte b/src/svelte/blueprintSettings/pages/general.svelte new file mode 100644 index 00000000..0e297903 --- /dev/null +++ b/src/svelte/blueprintSettings/pages/general.svelte @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + diff --git a/src/svelte/blueprintSettings/pages/plugin.svelte b/src/svelte/blueprintSettings/pages/plugin.svelte new file mode 100644 index 00000000..b2af133a --- /dev/null +++ b/src/svelte/blueprintSettings/pages/plugin.svelte @@ -0,0 +1,45 @@ + + + diff --git a/src/svelte/blueprintSettings/pages/resourcepack.svelte b/src/svelte/blueprintSettings/pages/resourcepack.svelte new file mode 100644 index 00000000..1eafec49 --- /dev/null +++ b/src/svelte/blueprintSettings/pages/resourcepack.svelte @@ -0,0 +1,157 @@ + + + + +{#if $resourcePackExportMode !== 'none'} + {#if $resourcePackExportMode === 'folder'} + + {:else if $resourcePackExportMode === 'zip'} + + {/if} +{/if} + + + +{#if compareVersions('1.21.4', $targetMinecraftVersion)} + +{/if} + + diff --git a/src/svelte/blueprintSettings/requiredAsteriskInform.svelte b/src/svelte/blueprintSettings/requiredAsteriskInform.svelte new file mode 100644 index 00000000..59025adf --- /dev/null +++ b/src/svelte/blueprintSettings/requiredAsteriskInform.svelte @@ -0,0 +1,12 @@ +
* = Required
+ + diff --git a/src/components/boneConfigDialog.svelte b/src/svelte/boneConfigDialog.svelte similarity index 95% rename from src/components/boneConfigDialog.svelte rename to src/svelte/boneConfigDialog.svelte index 38cfef2e..bb93544a 100644 --- a/src/components/boneConfigDialog.svelte +++ b/src/svelte/boneConfigDialog.svelte @@ -1,9 +1,9 @@
-
-
+
+
+ {#if tooltip} + + + {:else} +