From c7870a9f5b79841a3c1fc00be25319d31b6752ad Mon Sep 17 00:00:00 2001 From: TomatoCake <60300461+DEVTomatoCake@users.noreply.github.com> Date: Mon, 20 May 2024 09:11:13 +0200 Subject: [PATCH] DP/RP folders + better dialogs + vsc ext icon --- assets/script.js | 327 +++++++++++++++++---------------- assets/style.css | 47 +---- index.html | 74 ++++---- minify.js | 2 +- package-lock.json | 8 +- package.json | 2 +- vscExtension/icon.png | Bin 0 -> 707 bytes vscExtension/package-lock.json | 223 ++++++++++------------ vscExtension/package.json | 4 +- vscExtension/src/extension.js | 59 +++--- vscExtension/temp_icon.png | Bin 7592 -> 0 bytes 11 files changed, 347 insertions(+), 399 deletions(-) create mode 100644 vscExtension/icon.png delete mode 100644 vscExtension/temp_icon.png diff --git a/assets/script.js b/assets/script.js index d4b3f0f..b5c94af 100644 --- a/assets/script.js +++ b/assets/script.js @@ -45,8 +45,11 @@ let dpExclusive = { datapacks: 0, dimension: 0, dimension_type: 0, + enchantment: 0, + enchantment_provider: 0, item_modifiers: 0, loot_tables: 0, + painting_variant: 0, predicates: 0, recipes: 0, structures: 0, @@ -96,22 +99,13 @@ let rpExclusive = { lang: 0, models: 0, particles: 0, + resourcepacks: 0, shaders: 0, sounds: 0, texts: 0, textures: 0 } -const openDialog = dialog => { - dialog.style.display = "block" - dialog.getElementsByClassName("close")[0].onclick = function() { - dialog.style.display = "none" - } - window.onclick = function(event) { - if (event.target == dialog) dialog.style.display = "none" - } -} - const encode = s => s.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'") const localize = str => typeof str == "number" ? str.toLocaleString() : encode(str) + " (Please report if you see this)" @@ -134,11 +128,11 @@ const createImage = () => { let y = 1 const lineHeight = 21 const maxWidth = 400 - ctx.font = lineHeight - 1 + "px Arial" + ctx.font = (lineHeight - 1) + "px Arial" ctx.fillStyle = "black" if (packFiles.length > 0) { - ctx.fillText(packFiles.length + " " + (rpMode ? "Resource" : "Data") + "pack" + (packFiles.length == 1 ? "" : "s") + " found", x, y++ * lineHeight, maxWidth) + ctx.fillText(packFiles.length + " " + (rpMode ? "Resource" : "Data") + " pack" + (packFiles.length == 1 ? "" : "s") + " found", x, y++ * lineHeight, maxWidth) packFiles.forEach(pack => { if (pack.features?.enabled?.length > 0) { ctx.fillText("Selected internal features:", x + 30, y++ * lineHeight, maxWidth) @@ -232,16 +226,16 @@ const share = async type => { body: JSON.stringify({ name, date: Date.now() + 1000 * 60 * 60 * 24 * 30, - url: location.href + "?data=" + encodeURIComponent(content) + url: (location.protocol == "https:" ? location.href : "https://pack-analyzer.pages.dev/") + "?data=" + encodeURIComponent(content) }) }) const json = await res.json() if (res.ok) { - document.getElementById("share-link").href = "https://sh0rt.zip/" + name - document.getElementById("share-link").innerText = "https://sh0rt.zip/" + name + document.getElementById("share-link").href = encode(json.uri) + document.getElementById("share-link").innerText = json.uri document.getElementById("share-img").src = "https://sh0rt.zip/qr/" + name - openDialog(document.getElementById("shareDialog")) + document.getElementById("shareDialog").showModal() } else alert("Couldn't create link: " + json.error) return } @@ -253,144 +247,6 @@ const share = async type => { download.click() } -window.addEventListener("DOMContentLoaded", () => { - if (localStorage.getItem("theme") == "light") document.body.classList.add("light") - else if (window.matchMedia("(prefers-color-scheme: light)").matches) { - document.body.classList.add("light") - localStorage.setItem("theme", "light") - } - - const params = new URLSearchParams(location.search) - if (params.has("data")) { - const parsed = JSON.parse(params.get("data")) - files = parsed.files - done = parsed.done - error = parsed.error - rpMode = parsed.rpMode - document.getElementById("radiorp").checked = rpMode - - filetypes = parsed.filetypes - packFiles = parsed.packFiles - commands = parsed.commands - cmdsBehindExecute = parsed.cmdsBehindExecute - cmdsBehindMacros = parsed.cmdsBehindMacros - cmdsBehindReturn = parsed.cmdsBehindReturn - comments = parsed.comments - empty = parsed.empty - emptyFiles = parsed.emptyFiles - dpExclusive = parsed.dpExclusive - rpExclusive = parsed.rpExclusive - - mainScan(true) - } - - document.getElementById("clear-results").addEventListener("click", () => { - document.getElementById("progress").innerText = "" - document.getElementById("result").innerHTML = "" - document.getElementById("resultButtons").setAttribute("hidden", "") - document.getElementById("shareImage").style.display = "none" - if (interval) clearInterval(interval) - }) - document.getElementById("toggle-theme").addEventListener("click", () => { - localStorage.setItem("theme", document.body.classList.toggle("light") ? "light" : "dark") - }) - document.getElementById("about-button").addEventListener("click", () => openDialog(document.getElementById("aboutDialog"))) - - document.getElementById("select-folder").addEventListener("click", () => { - if (interval) clearInterval(interval) - selected = null - - const input = document.createElement("input") - input.type = "file" - input.webkitdirectory = true - input.onchange = e => { - selected = e.target.files - mainScan() - } - if ("showPicker" in HTMLInputElement.prototype) input.showPicker() - else input.click() - }) - document.getElementById("select-zip").addEventListener("click", () => { - if (interval) clearInterval(interval) - - const input = document.createElement("input") - input.type = "file" - input.accept = ".zip" - input.onchange = e => handleZip(e.target.files[0]) - - if ("showPicker" in HTMLInputElement.prototype) input.showPicker() - else input.click() - }) - - for (const elem of document.getElementsByClassName("share")) elem.addEventListener("click", () => share(elem.dataset.type)) - - if (location.protocol == "https:" && "serviceWorker" in navigator) navigator.serviceWorker.register("/serviceworker.js") -}) - -window.addEventListener("dragover", event => { - event.stopPropagation() - event.preventDefault() - event.dataTransfer.dropEffect = "copy" -}) -window.addEventListener("drop", async event => { - event.stopPropagation() - event.preventDefault() - const fileList = event.dataTransfer.files - if (fileList.length == 0) return - - const dropElement = document.createElement("div") - dropElement.id = "drop" - dropElement.style.left = event.clientX + "px" - dropElement.style.top = event.clientY + "px" - document.body.appendChild(dropElement) - dropElement.addEventListener("animationend", () => dropElement.remove()) - - if (fileList[0].name.endsWith(".zip")) handleZip(fileList[0]) - else { - selected = [] - for await (const file of Object.values(fileList)) { - try { - selected.push({ - name: file.name, - content: await file.text() - }) - } catch (e) { - console.error(e) - alert("Couldn't read file: " + file.name + "\nYour browser may not support reading files/folders by dropping them on a website, try using the buttons above.") - } - } - mainScan() - } -}) -window.addEventListener("paste", async event => { - event.preventDefault() - if (event.clipboardData.files.length == 0) { - if (event.clipboardData.items.length > 0) event.clipboardData.items[0].getAsString(str => { - selected = [{name: "clipboard.mcfunction", content: str}] - mainScan() - }) - return - } - - const fileList = event.clipboardData.files - if (fileList[0].name.endsWith(".zip")) handleZip(fileList[0]) - else { - selected = [] - for await (const file of Object.values(fileList)) { - try { - selected.push({ - name: file.name, - content: await file.text() - }) - } catch (e) { - console.error(e) - alert("Couldn't read file: " + file.name + "\nYour browser may not support reading files/folders from the clipboard, try using the buttons above.") - } - } - mainScan() - } -}) - const processFile = async (filePath = "", name = "", loadContentCallback = () => {}) => { const ext = name.split(".").pop() if ( @@ -407,7 +263,7 @@ const processFile = async (filePath = "", name = "", loadContentCallback = () => if ( ext == "mcfunction" || ext == "mcmeta" || (!rpMode && ext == "json" && (filePath.includes("/advancements/") || filePath.includes("/tags/functions/"))) || - ext == "fsh" || ext == "vsh" || ext == "glsl" || name.endsWith("pack.png") + ext == "fsh" || ext == "vsh" || ext == "glsl" || name.endsWith("/pack.png") ) { files++ @@ -565,7 +421,7 @@ const processFile = async (filePath = "", name = "", loadContentCallback = () => }) } -async function processEntries(entries) { +const processEntries = async entries => { for await (const entry of entries) { const filePath = entry.webkitRelativePath || entry.name if (filePath.includes("/.git/") || filePath.includes("/.svn/")) continue @@ -594,7 +450,7 @@ async function processEntries(entries) { } } -async function mainScan(hasData = false) { +const mainScan = async (hasData = false) => { if (interval) clearInterval(interval) document.getElementById("result").innerHTML = "" @@ -624,8 +480,11 @@ async function mainScan(hasData = false) { datapacks: 0, dimension: 0, dimension_type: 0, + enchantment: 0, + enchantment_provider: 0, item_modifiers: 0, loot_tables: 0, + painting_variant: 0, predicates: 0, recipes: 0, structures: 0, @@ -675,6 +534,7 @@ async function mainScan(hasData = false) { lang: 0, models: 0, particles: 0, + resourcepacks: 0, shaders: 0, sounds: 0, texts: 0, @@ -691,7 +551,7 @@ async function mainScan(hasData = false) { if (files == 0) return document.getElementById("progress").innerText = "No files found!" document.getElementById("resultButtons").removeAttribute("hidden") if (error == 0) document.getElementById("progress").innerText = "" - if (Object.values(filetypes).reduce((a, b) => a + b) == 0) document.getElementById("progress").innerHTML = "No " + (rpMode ? "resource" : "data") + "pack files found!" + if (Object.values(filetypes).reduce((a, b) => a + b) == 0) document.getElementById("progress").innerHTML = "No " + (rpMode ? "resource" : "data") + " pack files found!" const uncalledFunctions = dpExclusive.functions.filter(funcName => !dpExclusive.functionCalls.some(func => func.target == funcName)) const missingFunctions = [...new Set(dpExclusive.functionCalls.filter(func => !dpExclusive.functions.includes(func.target)).map(func => func.target))] @@ -702,7 +562,7 @@ async function mainScan(hasData = false) { const versions = localStorage.getItem("mcVersions") ? JSON.parse(localStorage.getItem("mcVersions")) : [] let html = (packImages.length > 0 ? "
" + packImages.map(img => "") + "
" : "") + - (packFiles.length > 0 ? "" + (rpMode ? "Resource" : "Data") + "pack" + (packFiles.length == 1 ? "" : "s") + " found:
" + + (packFiles.length > 0 ? "" + (rpMode ? "Resource" : "Data") + " pack" + (packFiles.length == 1 ? "" : "s") + " found:
" + packFiles.map(pack => { let oldestFormat = pack.pack.pack_format let newestFormat = pack.pack.pack_format @@ -820,7 +680,7 @@ async function mainScan(hasData = false) { }, 100) } -function handleZip(file) { +const handleZip = file => { selected = [] new JSZip().loadAsync(file).then(async zip => { @@ -833,3 +693,150 @@ function handleZip(file) { mainScan() }) } + +window.addEventListener("DOMContentLoaded", () => { + if (localStorage.getItem("theme") == "light") document.body.classList.add("light") + else if (window.matchMedia("(prefers-color-scheme: light)").matches) { + document.body.classList.add("light") + localStorage.setItem("theme", "light") + } + + const params = new URLSearchParams(location.search) + if (params.has("data")) { + const parsed = JSON.parse(params.get("data")) + files = parsed.files + done = parsed.done + error = parsed.error + rpMode = parsed.rpMode + document.getElementById("radiorp").checked = rpMode + + filetypes = parsed.filetypes + packFiles = parsed.packFiles + commands = parsed.commands + cmdsBehindExecute = parsed.cmdsBehindExecute + cmdsBehindMacros = parsed.cmdsBehindMacros + cmdsBehindReturn = parsed.cmdsBehindReturn + comments = parsed.comments + empty = parsed.empty + emptyFiles = parsed.emptyFiles + dpExclusive = parsed.dpExclusive + rpExclusive = parsed.rpExclusive + + mainScan(true) + } + + document.getElementById("clear-results").addEventListener("click", () => { + document.getElementById("progress").innerText = "" + document.getElementById("result").innerHTML = "" + document.getElementById("resultButtons").setAttribute("hidden", "") + document.getElementById("shareImage").style.display = "none" + if (interval) clearInterval(interval) + }) + document.getElementById("toggle-theme").addEventListener("click", () => { + localStorage.setItem("theme", document.body.classList.toggle("light") ? "light" : "dark") + }) + + document.getElementById("select-folder").addEventListener("click", () => { + if (interval) clearInterval(interval) + selected = null + + const input = document.createElement("input") + input.type = "file" + input.webkitdirectory = true + input.onchange = e => { + selected = e.target.files + mainScan() + } + if ("showPicker" in HTMLInputElement.prototype) input.showPicker() + else input.click() + }) + document.getElementById("select-zip").addEventListener("click", () => { + if (interval) clearInterval(interval) + + const input = document.createElement("input") + input.type = "file" + input.accept = ".zip" + input.onchange = e => handleZip(e.target.files[0]) + + if ("showPicker" in HTMLInputElement.prototype) input.showPicker() + else input.click() + }) + + document.getElementById("about-button").addEventListener("click", () => { + document.getElementById("aboutDialog").showModal() + }) + for (const elem of document.querySelectorAll("dialog .close")) { + elem.addEventListener("click", () => elem.closest("dialog").close()) + elem.addEventListener("keydown", e => { + if (e.key == "Enter") elem.closest("dialog").close() + }) + } + + for (const elem of document.getElementsByClassName("share")) elem.addEventListener("click", () => share(elem.dataset.type)) + + if (location.protocol == "https:" && "serviceWorker" in navigator) navigator.serviceWorker.register("/serviceworker.js") +}) + +window.addEventListener("dragover", event => { + event.stopPropagation() + event.preventDefault() + event.dataTransfer.dropEffect = "copy" +}) +window.addEventListener("drop", async event => { + event.stopPropagation() + event.preventDefault() + const fileList = event.dataTransfer.files + if (fileList.length == 0) return + + const dropElement = document.createElement("div") + dropElement.id = "drop" + dropElement.style.left = event.clientX + "px" + dropElement.style.top = event.clientY + "px" + document.body.appendChild(dropElement) + dropElement.addEventListener("animationend", () => dropElement.remove()) + + if (fileList[0].name.endsWith(".zip")) handleZip(fileList[0]) + else { + selected = [] + for await (const file of Object.values(fileList)) { + try { + selected.push({ + name: file.name, + content: await file.text() + }) + } catch (e) { + console.error(e) + alert("Couldn't read file: " + file.name + "\nYour browser may not support reading files/folders by dropping them on a website, try using the buttons above.") + } + } + mainScan() + } +}) +window.addEventListener("paste", async event => { + event.preventDefault() + if (event.clipboardData.files.length == 0) { + if (event.clipboardData.items.length > 0) event.clipboardData.items[0].getAsString(str => { + selected = [{name: "clipboard.mcfunction", content: str}] + mainScan() + }) + return + } + + const fileList = event.clipboardData.files + if (fileList[0].name.endsWith(".zip")) handleZip(fileList[0]) + else { + selected = [] + for await (const file of Object.values(fileList)) { + try { + selected.push({ + name: file.name, + content: await file.text() + }) + } catch (e) { + console.error(e) + alert("Couldn't read file: " + file.name + "\nYour browser may not support reading files/folders from the clipboard, try using the buttons above.") + } + } + mainScan() + } +}) diff --git a/assets/style.css b/assets/style.css index ea6add5..e5996ca 100644 --- a/assets/style.css +++ b/assets/style.css @@ -121,54 +121,21 @@ summary { cursor: pointer; } -.dialog { - position: fixed; - display: none; - z-index: 1; - left: 0; - top: 0; - padding-top: 100px; - width: 100%; - height: 100%; - overflow: auto; - background-color: var(--dialog-shadow); - transition: .3s; +dialog { + max-width: 90%; } -.dialog-content { - position: relative; - margin: auto; - width: 75%; - padding: 20px; - box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); - animation-name: animateDialog; - animation-duration: 0.4s; - background-color: var(--dialog-bg); - border-radius: 5px; -} - -@keyframes animateDialog { - from { - width: 0; - opacity: 0; - } - to { - width: 75%; - opacity: 1; - } -} - -.close { +dialog .close { color: #AAA; float: right; font-size: 28px; - font-weight: bold; + font-weight: 700; transition: .2s; -} -.close:hover, .close:focus { - color: black; cursor: pointer; } +dialog .close:hover, dialog .close:focus { + color: #000; +} a:link { color: var(--link); diff --git a/index.html b/index.html index 3454e7e..3e155b3 100644 --- a/index.html +++ b/index.html @@ -56,49 +56,45 @@

-
-
- × -

About

+ + × +

About

-

- Made in HTML, plain JavaScript and CSS, this site allows you to get usage stats from your Minecraft data and resource packs. - It also allows analyzing of whole worlds and shaders. -
- Everything is done locally, no data ever gets sent to any server (except for anonymous Cloudflare statistics). -

+

+ Made in HTML, plain JavaScript and CSS, this site allows you to get usage stats from your Minecraft data and resource packs. + It also allows analyzing of whole worlds and shaders. +
+ Everything is done locally, no data ever gets sent to any server (except for anonymous Cloudflare statistics). +

-

- Developed by: TomatoCake -

-

- Inspired by: ErrorCrafts FunctionAnalyser -

-

- Uses misodes mcmeta to get a list of all Minecraft versions with their respective pack formats. -

-

- GitHub: https://github.com/DEVTomatoCake/Pack-Analyzer -

-

- Support/Feedback: - Vanilla Minigames Discord or - GitHub -

-
-
+

+ Developed by: TomatoCake +

+

+ Inspired by: ErrorCrafts FunctionAnalyser +

+

+ Uses misodes mcmeta to get a list of all Minecraft versions with their respective pack formats. +

+

+ GitHub: https://github.com/DEVTomatoCake/Pack-Analyzer +

+

+ Support/Feedback: + Vanilla Minigames Discord or + GitHub +

+ -
-
- × -

Share the results as link

+ + × +

Share the results as link

- -
-
- QR code for sharing -
-
+ +
+
+ QR code for sharing + diff --git a/minify.js b/minify.js index e79c13d..752f7a4 100644 --- a/minify.js +++ b/minify.js @@ -95,7 +95,7 @@ const minifyFile = async (path, options = {}) => { }) } -async function main() { +const main = async () => { await minifyFile("./assets/script.js") await minifyFile("./assets/jszip.js", { mangle: { diff --git a/package-lock.json b/package-lock.json index 8f868df..0255ae1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "eslint-plugin-html": "^8.1.1", "eslint-plugin-sonarjs": "^1.0.3", "eslint-plugin-unicorn": "^53.0.0", - "globals": "^15.2.0" + "globals": "^15.3.0" } }, "node_modules/@babel/code-frame": { @@ -1051,9 +1051,9 @@ } }, "node_modules/globals": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.2.0.tgz", - "integrity": "sha512-FQ5YwCHZM3nCmtb5FzEWwdUc9K5d3V/w9mzcz8iGD1gC/aOTHc6PouYu0kkKipNJqHAT7m51sqzQjEjIP+cK0A==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.3.0.tgz", + "integrity": "sha512-cCdyVjIUVTtX8ZsPkq1oCsOsLmGIswqnjZYMJJTGaNApj1yHtLSymKhwH51ttirREn75z3p4k051clwg7rvNKA==", "dev": true, "engines": { "node": ">=18" diff --git a/package.json b/package.json index 6c4ab12..c84cc9f 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,6 @@ "eslint-plugin-html": "^8.1.1", "eslint-plugin-sonarjs": "^1.0.3", "eslint-plugin-unicorn": "^53.0.0", - "globals": "^15.2.0" + "globals": "^15.3.0" } } diff --git a/vscExtension/icon.png b/vscExtension/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..67599e5b7859093b5b649b91a48643633723e733 GIT binary patch literal 707 zcmV;!0zCbRP)Px#1ZP1_K>z@;j|==^1poj522e~?MF0Q*0001`XSvS+0007XQchF<0OhwZN&o-= z32;bRa{vGi!T=-_u<6Dv=Xg}F#X5s>>0g=xP6{JU4-w2F1NVN2k6@O5>p2&F zhyS6d{-FxzqT?xPfAPZc#pM=!x#-q(+a0spv2)v9i=+p)MbTJ3}%MBd`hav=0.10.0" + "vscode": "^1.89.0" } }, "node_modules/@azure/abort-controller": { @@ -98,15 +89,15 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.15.2.tgz", - "integrity": "sha512-BmWfpjc/QXc2ipHOh6LbUzp3ONCaa6xzIssTU0DwH9bbYNXJlGUL6tujx5TrbVd/QQknmS+vlQJGrCq2oL1gZA==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.16.0.tgz", + "integrity": "sha512-CeuTvsXxCUmEuxH5g/aceuSl6w2EugvNHKAtKKVdiX915EjJJxAwfzNNWZreNnbxHZ2fi0zaM6wwS23x2JVqSQ==", "dev": true, "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.4.0", "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.3.0", + "@azure/core-util": "^1.9.0", "@azure/logger": "^1.0.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", @@ -166,9 +157,9 @@ } }, "node_modules/@azure/identity": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.1.0.tgz", - "integrity": "sha512-BhYkF8Xr2gXjyDxocm0pc9RI5J5a1jw8iW0dw6Bx95OGdYbuMyFZrrwNw4eYSqQ2BB6FZOqpJP3vjsAqRcvDhw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-4.2.0.tgz", + "integrity": "sha512-ve3aYv79qXOJ8wRxQ5jO0eIz2DZ4o0TyME4m4vlGV5YyePddVZ+pFMzusAMODNAflYAAv1cBIhKnd4xytmXyig==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", @@ -203,33 +194,33 @@ } }, "node_modules/@azure/msal-browser": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.13.0.tgz", - "integrity": "sha512-fD906nmJei3yE7la6DZTdUtXKvpwzJURkfsiz9747Icv4pit77cegSm6prJTKLQ1fw4iiZzrrWwxnhMLrTf5gQ==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-3.14.0.tgz", + "integrity": "sha512-Un85LhOoecJ3HDTS3Uv3UWnXC9/43ZSO+Kc+anSqpZvcEt58SiO/3DuVCAe1A3I5UIBYJNMgTmZPGXQ0MVYrwA==", "dev": true, "dependencies": { - "@azure/msal-common": "14.9.0" + "@azure/msal-common": "14.10.0" }, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-common": { - "version": "14.9.0", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.9.0.tgz", - "integrity": "sha512-yzBPRlWPnTBeixxLNI3BBIgF5/bHpbhoRVuuDBnYjCyWRavaPUsKAHUDYLqpGkBLDciA6TCc6GOxN4/S3WiSxg==", + "version": "14.10.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.10.0.tgz", + "integrity": "sha512-Zk6DPDz7e1wPgLoLgAp0349Yay9RvcjPM5We/ehuenDNsz/t9QEFI7tRoHpp/e47I4p20XE3FiDlhKwAo3utDA==", "dev": true, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-node": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.7.0.tgz", - "integrity": "sha512-wXD8LkUvHICeSWZydqg6o8Yvv+grlBEcmLGu+QEI4FcwFendbTEZrlSygnAXXSOCVaGAirWLchca35qrgpO6Jw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.8.1.tgz", + "integrity": "sha512-VcZZM+5VvCWRBTOF7SxMKaxrz+EXjntx2u5AQe7QE06e6FuPJElGBrImgNgCh5QmFaNCfVFO+3qNR7UoFD/Gfw==", "dev": true, "dependencies": { - "@azure/msal-common": "14.9.0", + "@azure/msal-common": "14.10.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, @@ -260,12 +251,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", - "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", + "version": "7.24.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", + "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.5", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -289,6 +280,18 @@ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@eslint-community/regexpp": { "version": "4.10.0", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", @@ -429,18 +432,6 @@ "eslint": ">=8.40.0" } }, - "node_modules/@stylistic/eslint-plugin-js/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/@types/eslint": { "version": "8.56.10", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", @@ -784,9 +775,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001617", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz", - "integrity": "sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA==", + "version": "1.0.30001620", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001620.tgz", + "integrity": "sha512-WJvYsOjd1/BYUY6SNGUosK9DUidBPDTnOARHp3fSmFO1ekdxaY6nKRttEVrfMmYi80ctS0kz1wiWmm14fVc3ew==", "dev": true, "funding": [ { @@ -817,15 +808,6 @@ "node": ">=4" } }, - "node_modules/chalk/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/cheerio": { "version": "1.0.0-rc.12", "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", @@ -898,19 +880,10 @@ "node": ">=4" } }, - "node_modules/clean-regexp/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/cockatiel": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cockatiel/-/cockatiel-3.1.2.tgz", - "integrity": "sha512-5yARKww0dWyWg2/3xZeXgoxjHLwpVqFptj9Zy7qioJ6+/L0ARM184sgMUrQDjxw7ePJWlGhV998mKhzrxT0/Kg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/cockatiel/-/cockatiel-3.1.3.tgz", + "integrity": "sha512-xC759TpZ69d7HhfDp8m2WkRwEUiCkxY8Ee2OQH/3H6zmy2D/5Sm+zSTbPRa+V2QyjDtpMvjOIAOVjA2gp6N1kQ==", "dev": true, "engines": { "node": ">=16" @@ -959,9 +932,9 @@ "dev": true }, "node_modules/core-js-compat": { - "version": "3.37.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.0.tgz", - "integrity": "sha512-vYq4L+T8aS5UuFg4UwDhc7YNRWVeVZwltad9C/jV3R2LgVOpS9BDr7l/WL6BN0dbV3k1XejPTHqqEzJgsa0frA==", + "version": "3.37.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz", + "integrity": "sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==", "dev": true, "dependencies": { "browserslist": "^4.23.0" @@ -1172,9 +1145,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.763", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.763.tgz", - "integrity": "sha512-k4J8NrtJ9QrvHLRo8Q18OncqBCB7tIUyqxRcJnlonQ0ioHKYB988GcDFF3ZePmnb8eHEopDs/wPHR/iGAFgoUQ==", + "version": "1.4.774", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.774.tgz", + "integrity": "sha512-132O1XCd7zcTkzS3FgkAzKmnBuNJjK8WjcTtNuoylj7MYbqw5eXehjQ5OK91g0zm7OTKIPeaAG4CPoRfD9M1Mg==", "dev": true }, "node_modules/end-of-stream": { @@ -1239,15 +1212,12 @@ } }, "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.8.0" } }, "node_modules/eslint": { @@ -1363,12 +1333,12 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1423,16 +1393,16 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { + "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": ">=10" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/has-flag": { @@ -1473,18 +1443,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", - "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", @@ -2442,9 +2400,9 @@ "dev": true }, "node_modules/node-abi": { - "version": "3.57.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.57.0.tgz", - "integrity": "sha512-Dp+A9JWxRaKuHP35H77I4kCKesDy5HUDEmScia2FyncMTOXASMyg251F5PhFoDA5uqBrDDffiLpbqnrZmNXW+g==", + "version": "3.62.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.62.0.tgz", + "integrity": "sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==", "dev": true, "optional": true, "dependencies": { @@ -2542,17 +2500,17 @@ } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -2710,9 +2668,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/pluralize": { @@ -2937,15 +2895,6 @@ "node": ">=8" } }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/read-pkg/node_modules/type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", @@ -3397,6 +3346,15 @@ "node": ">= 0.8.0" } }, + "node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/typed-rest-client": { "version": "1.8.11", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", @@ -3427,9 +3385,9 @@ "dev": true }, "node_modules/update-browserslist-db": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.15.tgz", - "integrity": "sha512-K9HWH62x3/EalU1U6sjSZiylm9C8tgq2mSvshZpqc7QE69RaA2qjhkW2HlNA0tFpEbtyFz7HTqbSdN4MSwUodA==", + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", "dev": true, "funding": [ { @@ -3447,7 +3405,7 @@ ], "dependencies": { "escalade": "^3.1.2", - "picocolors": "^1.0.0" + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -3512,6 +3470,15 @@ "node": ">= 8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/vscExtension/package.json b/vscExtension/package.json index c91a2f0..03259e3 100644 --- a/vscExtension/package.json +++ b/vscExtension/package.json @@ -2,7 +2,7 @@ "name": "pack-analyzer", "displayName": "Minecraft Data and Resource pack Analyzer", "description": "Allows you to analyze and generate stats for [Minecraft](https://minecraft.net) Java Edition data and resource packs.", - "version": "1.1.0", + "version": "1.1.1", "publisher": "tomatocake", "main": "./out/extension", "browser": "./out/extension", @@ -50,7 +50,7 @@ { "id": "packAnalyzer", "title": "Pack Analyzer", - "icon": "temp_icon.png" + "icon": "icon.png" } ] }, diff --git a/vscExtension/src/extension.js b/vscExtension/src/extension.js index 5209229..b96a7b6 100644 --- a/vscExtension/src/extension.js +++ b/vscExtension/src/extension.js @@ -50,8 +50,11 @@ let dpExclusive = { datapacks: 0, dimension: 0, dimension_type: 0, + enchantment: 0, + enchantment_provider: 0, item_modifiers: 0, loot_tables: 0, + painting_variant: 0, predicates: 0, recipes: 0, structures: 0, @@ -101,6 +104,7 @@ let rpExclusive = { lang: 0, models: 0, particles: 0, + resourcepacks: 0, shaders: 0, sounds: 0, texts: 0, @@ -110,7 +114,7 @@ let rpExclusive = { const localize = str => str.toLocaleString() /* processFile */ -async function processEntries(entries) { +const processEntries = async entries => { for await (const filePath of entries) { const name = filePath.split("/").pop() @@ -122,11 +126,25 @@ async function processEntries(entries) { } log("Successfully processed " + done + " files with " + error + " errors") + + /*log(await vscode.commands.executeCommand("editor.actions.findWithArgs", { + searchString: "@a", + matchWholeWord: true, + isCaseSensitive: true + })) + log("Search for @a executed")*/ + + log(await vscode.commands.executeCommand("workbench.action.findInFiles", { + searchString: "@a", + matchWholeWord: true, + isCaseSensitive: true + })) + log("Search 2 for @a executed") } -async function mainScan() { +const mainScan = async () => { let html = - (packFiles.length > 0 ? "" + (rpMode ? "Resource" : "Data") + "pack" + (packFiles.length == 1 ? "" : "s") + " found:
" + + (packFiles.length > 0 ? "" + (rpMode ? "Resource" : "Data") + " pack" + (packFiles.length == 1 ? "" : "s") + " found:
" + packFiles.map(pack => { let oldestFormat = pack.pack.pack_format let newestFormat = pack.pack.pack_format @@ -163,40 +181,20 @@ async function mainScan() { : "") + (packFiles.length == 0 && (filetypes.fsh || filetypes.vsh || filetypes.xcf || filetypes.glsl) ? "Shader found
" : "") + - "Pack file types found:
" + - Object.keys(filetypes).sort((a, b) => filetypes[b] - filetypes[a]).map(type => "." + type + ": " + localize(filetypes[type]) + "
").join("") + (Object.keys(filetypesOther).length > 0 ? "
" + "Non-pack file types found:" + Object.keys(filetypesOther).sort((a, b) => filetypesOther[b] - filetypesOther[a]).map(type => "" + type + ": " + localize(filetypesOther[type]) + "
").join("") + "

" : "") + - (emptyFiles.length > 0 ? - "Empty files:
" + - emptyFiles.map(func => "" + func + "
").join("") + - "
" - : "") + - (dpExclusive.scoreboards > 0 ? "Scoreboards created: " + localize(dpExclusive.scoreboards) + "
" : "") + - (!rpMode && Object.values(dpExclusive.selectors).reduce((a, b) => a + b) != 0 ? "Selectors used:
" : "") + - Object.keys(dpExclusive.selectors).filter(i => dpExclusive.selectors[i] > 0).sort((a, b) => dpExclusive.selectors[b] - dpExclusive.selectors[a]) - .map(type => "@" + type + ": " + localize(dpExclusive.selectors[type]) + "
").join("") + (!rpMode && Object.values(dpExclusive.folders).reduce((a, b) => a + b) != 0 ? "Data pack features used:
" : "") + Object.keys(dpExclusive.folders).filter(i => dpExclusive.folders[i] > 0).sort((a, b) => dpExclusive.folders[b] - dpExclusive.folders[a]) - .map(type => "" + type + ": " + localize(dpExclusive.folders[type]) + "
").join("") + - (!rpMode && Object.values(dpExclusive.tags).reduce((a, b) => a + b) != 0 ? "Tags used:
" : "") + - Object.keys(dpExclusive.tags).filter(i => dpExclusive.tags[i] > 0).sort((a, b) => dpExclusive.tags[b] - dpExclusive.tags[a]) - .map(type => "" + type + ": " + localize(dpExclusive.tags[type]) + "
").join("") + - - (rpMode && Object.values(rpExclusive).reduce((a, b) => a + b) != 0 ? "
Resource pack features used:
" : "") + - Object.keys(rpExclusive).filter(i => rpExclusive[i] > 0).sort((a, b) => rpExclusive[b] - rpExclusive[a]) - .map(type => "" + type + ": " + localize(rpExclusive[type]) + "
").join("") + .map(type => "" + type + ": " + localize(dpExclusive.folders[type]) + "
").join("") commands = Object.fromEntries(Object.entries(commands).sort(([, a], [, b]) => b - a)) Object.keys(commands).forEach(cmd => { html += cmd + ": " + localize(commands[cmd]) + "
" - if (cmdsBehindExecute[cmd]) html += "Behind execute: " + localize(cmdsBehindExecute[cmd]) + - (cmd == "execute" ? "⚠️ (... run execute ... equals ... ...)" : "") + "
" if (cmdsBehindMacros[cmd]) html += "Behind macro: " + localize(cmdsBehindMacros[cmd]) + "
" if (cmdsBehindReturn[cmd]) html += "Behind return: " + localize(cmdsBehindReturn[cmd]) + "
" }) @@ -269,8 +267,11 @@ class PackAnalyzer { datapacks: 0, dimension: 0, dimension_type: 0, + enchantment: 0, + enchantment_provider: 0, item_modifiers: 0, loot_tables: 0, + painting_variant: 0, predicates: 0, recipes: 0, structures: 0, @@ -320,6 +321,7 @@ class PackAnalyzer { lang: 0, models: 0, particles: 0, + resourcepacks: 0, shaders: 0, sounds: 0, texts: 0, @@ -375,6 +377,15 @@ class PackAnalyzer { } else if (element.parent == "selectors") { treeItem.label = "@" + element.item + ": " + localize(dpExclusive.selectors[element.item]) treeItem.iconPath = iconUrl("{DPICON|mcfunction}") + treeItem.command = { + command: "editor.actions.findWithArgs", + title: "Find", + arguments: [{ + searchString: "@" + element.item, + matchWholeWord: true, + isCaseSensitive: true + }] + } } else if (element.item == "rpExclusive") { treeItem.label = "Resource pack" treeItem.iconPath = iconUrl("{DPICON|assets}") diff --git a/vscExtension/temp_icon.png b/vscExtension/temp_icon.png deleted file mode 100644 index d25ec03834cf2e5e8b33c75339648d35f997dbfa..0000000000000000000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