From bd78298c03f4a5dfee893b672db6010c0cb69763 Mon Sep 17 00:00:00 2001 From: Gareth Williams Date: Thu, 21 May 2026 09:26:20 +0100 Subject: [PATCH] Remove un-used script --- scripts/image-optimiser/package.json | 4 +- scripts/mesh-weights-gen/.gitignore | 34 ------------ scripts/mesh-weights-gen/README.md | 15 ------ scripts/mesh-weights-gen/bun.lock | 29 ---------- scripts/mesh-weights-gen/index.ts | 74 -------------------------- scripts/mesh-weights-gen/package.json | 11 ---- scripts/mesh-weights-gen/tsconfig.json | 29 ---------- scripts/webp-optimiser/package.json | 4 +- 8 files changed, 4 insertions(+), 196 deletions(-) delete mode 100644 scripts/mesh-weights-gen/.gitignore delete mode 100644 scripts/mesh-weights-gen/README.md delete mode 100644 scripts/mesh-weights-gen/bun.lock delete mode 100644 scripts/mesh-weights-gen/index.ts delete mode 100644 scripts/mesh-weights-gen/package.json delete mode 100644 scripts/mesh-weights-gen/tsconfig.json diff --git a/scripts/image-optimiser/package.json b/scripts/image-optimiser/package.json index 779f6f6..0df9570 100644 --- a/scripts/image-optimiser/package.json +++ b/scripts/image-optimiser/package.json @@ -11,7 +11,7 @@ "license": "ISC", "type": "module", "dependencies": { - "glob": "^13.0.6", - "sharp": "^0.34.5" + "glob": "13.0.6", + "sharp": "0.34.5" } } diff --git a/scripts/mesh-weights-gen/.gitignore b/scripts/mesh-weights-gen/.gitignore deleted file mode 100644 index a14702c..0000000 --- a/scripts/mesh-weights-gen/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -# dependencies (bun install) -node_modules - -# output -out -dist -*.tgz - -# code coverage -coverage -*.lcov - -# logs -logs -_.log -report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# caches -.eslintcache -.cache -*.tsbuildinfo - -# IntelliJ based IDEs -.idea - -# Finder (MacOS) folder config -.DS_Store diff --git a/scripts/mesh-weights-gen/README.md b/scripts/mesh-weights-gen/README.md deleted file mode 100644 index 33384ee..0000000 --- a/scripts/mesh-weights-gen/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# tmp-json-weights - -To install dependencies: - -```bash -bun install -``` - -To run: - -```bash -bun run index.ts -``` - -This project was created using `bun init` in bun v1.2.15. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. diff --git a/scripts/mesh-weights-gen/bun.lock b/scripts/mesh-weights-gen/bun.lock deleted file mode 100644 index c3f9ee3..0000000 --- a/scripts/mesh-weights-gen/bun.lock +++ /dev/null @@ -1,29 +0,0 @@ -{ - "lockfileVersion": 1, - "workspaces": { - "": { - "name": "tmp-json-weights", - "devDependencies": { - "@types/bun": "latest", - }, - "peerDependencies": { - "typescript": "^5", - }, - }, - }, - "packages": { - "@types/bun": ["@types/bun@1.2.22", "", { "dependencies": { "bun-types": "1.2.22" } }, "sha512-5A/KrKos2ZcN0c6ljRSOa1fYIyCKhZfIVYeuyb4snnvomnpFqC0tTsEkdqNxbAgExV384OETQ//WAjl3XbYqQA=="], - - "@types/node": ["@types/node@24.5.1", "", { "dependencies": { "undici-types": "~7.12.0" } }, "sha512-/SQdmUP2xa+1rdx7VwB9yPq8PaKej8TD5cQ+XfKDPWWC+VDJU4rvVVagXqKUzhKjtFoNA8rXDJAkCxQPAe00+Q=="], - - "@types/react": ["@types/react@19.1.13", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-hHkbU/eoO3EG5/MZkuFSKmYqPbSVk5byPFa3e7y/8TybHiLMACgI8seVYlicwk7H5K/rI2px9xrQp/C+AUDTiQ=="], - - "bun-types": ["bun-types@1.2.22", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-hwaAu8tct/Zn6Zft4U9BsZcXkYomzpHJX28ofvx7k0Zz2HNz54n1n+tDgxoWFGB4PcFvJXJQloPhaV2eP3Q6EA=="], - - "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], - - "typescript": ["typescript@5.9.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="], - - "undici-types": ["undici-types@7.12.0", "", {}, "sha512-goOacqME2GYyOZZfb5Lgtu+1IDmAlAEu5xnD3+xTzS10hT0vzpf0SPjkXwAw9Jm+4n/mQGDP3LO8CPbYROeBfQ=="], - } -} diff --git a/scripts/mesh-weights-gen/index.ts b/scripts/mesh-weights-gen/index.ts deleted file mode 100644 index 0b73b7e..0000000 --- a/scripts/mesh-weights-gen/index.ts +++ /dev/null @@ -1,74 +0,0 @@ -export type Weights = { - blocks: Array<{ - name: string - meshes: Array<{ - name: string - totalWeight: number - drops: Array<{ - item: string - weight: number - percent: number - }> - }> - }> -} - - -const response = await fetch('https://pste.me/v1/paste/hVLdbeCcPoc/raw'); -const data = await response.json() as Weights; - -// Get all meshes and store them in a record grouped by mesh and block -const meshes: Record> = {}; -for (const block of data.blocks) { - for (const mesh of block.meshes) { - if (!meshes[mesh.name]) { - meshes[mesh.name] = {}; - } - meshes[mesh.name][block.name] = mesh; - } -} - -const blockOrder = [ - 'dirt', - 'dust', - 'gravel', - 'sand', - 'red_sand', - 'soul_sand', - 'crushed_netherrack', - 'crushed_endstone', - 'crushed_basalt' -]; - -for (const meshName in meshes) { - console.log(`## ${formatItemName(meshName)}`); - for (const blockName of blockOrder) { - const mesh = meshes[meshName][blockName]; - console.log(`### ${formatItemName(blockName)}\n`); - console.log(`| **_Item_** | **_Drop Chance_** |`); - console.log(`|--------------------|-------------------|`); - for (const drop of mesh.drops) { - console.log(`| **${formatItemName(drop.item)}** | ${drop.percent.toFixed(2)}% |`); - } - console.log('\n---\n'); - } -} - -function formatItemName(name: string): string { - return name.replace(/(minecraft|ftb_sieves|ftb_ma):/g, '').replace(/_/g, ' ').replace(/\b\w/g, c => c.toUpperCase()); -} - - -// for (const block of data.blocks){ -// for (const mesh of block.meshes){ -// console.log(`## ${mesh.name}`) -// console.log(`### ${block.name}`); -// console.log(`| **_Item_** | **_Drop Chance_** |`) -// console.log(`|--------------------|-------------------|`) -// for (const drop of mesh.drops){ -// console.log(`| ${formatItemName(drop.item)} | ${drop.percent}% |`) -// } -// console.log('\n\n'); -// } -// } -// diff --git a/scripts/mesh-weights-gen/package.json b/scripts/mesh-weights-gen/package.json deleted file mode 100644 index 466d7d0..0000000 --- a/scripts/mesh-weights-gen/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "tmp-json-weights", - "module": "index.ts", - "type": "module", - "devDependencies": { - "@types/bun": "latest" - }, - "peerDependencies": { - "typescript": "^5" - } -} diff --git a/scripts/mesh-weights-gen/tsconfig.json b/scripts/mesh-weights-gen/tsconfig.json deleted file mode 100644 index bfa0fea..0000000 --- a/scripts/mesh-weights-gen/tsconfig.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "compilerOptions": { - // Environment setup & latest features - "lib": ["ESNext"], - "target": "ESNext", - "module": "Preserve", - "moduleDetection": "force", - "jsx": "react-jsx", - "allowJs": true, - - // Bundler mode - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "verbatimModuleSyntax": true, - "noEmit": true, - - // Best practices - "strict": true, - "skipLibCheck": true, - "noFallthroughCasesInSwitch": true, - "noUncheckedIndexedAccess": true, - "noImplicitOverride": true, - - // Some stricter flags (disabled by default) - "noUnusedLocals": false, - "noUnusedParameters": false, - "noPropertyAccessFromIndexSignature": false - } -} diff --git a/scripts/webp-optimiser/package.json b/scripts/webp-optimiser/package.json index 779f6f6..0df9570 100644 --- a/scripts/webp-optimiser/package.json +++ b/scripts/webp-optimiser/package.json @@ -11,7 +11,7 @@ "license": "ISC", "type": "module", "dependencies": { - "glob": "^13.0.6", - "sharp": "^0.34.5" + "glob": "13.0.6", + "sharp": "0.34.5" } }