diff --git a/.gitignore b/.gitignore index 20ce337..3535f84 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ # ignore node_modules node_modules -# ignore js build folder +# ignore build folders jsBuild +build # ignore config config.js @@ -17,3 +18,6 @@ old # ignore the gradle build folder gradleBuild + +# ignore the testing folder +testing \ No newline at end of file diff --git a/bot/Bot.ts b/bot/Bot.ts deleted file mode 100644 index 3732c82..0000000 --- a/bot/Bot.ts +++ /dev/null @@ -1,81 +0,0 @@ -import mc from "minecraft-protocol"; -import { EventEmitter } from "events"; -import { Chat } from "./modules/Chat"; -import fs from "fs"; -import path from "path"; -import java from "java"; -java.classpath.push("nbt-3.2.1.jar"); -console.log(java) -/*net.lenni0451.mcstructs -java.classpath.push("commons-lang3-3.19.0.jar"); -itemRegistry.getMeta(123) - .types(ItemType.HELMET) - .tags(ItemTag.DAMAGEABLE, ItemTag.MATERIAL_LEATHER) - .maxCount(1) - .maxDamage(321); -*/ -export class Bot { - public static listener = new EventEmitter(); - - public static chat: any; - - public static bots: Array - - public static options: any; - - public static entityId: any; - - public static config: any; - - private static loadModules () { - new Chat(this) - } - - public static Bot (options: any, config: any) { - const listeners = Bot.listener; - - Bot.options = { - host: options.host ??= "localhost", - port: options.port ??= 25565, - version: options.version ??= "1.21.8", - username: options.username ??= "FNFBoyfriendBot" - }; - - Bot.config = { - prefixes: config.prefixes ??= ["!"], - console: { - prefix: config.console.prefix ??= "c.", - timezone: "America/CHICAGO", - }, - bots: config.bots ??= [] - } - - Bot.options = options; - - Bot.config = config; - - - listeners.on("init_client", (packet: any) => { - client?.on('packet', (data: any, meta: any) => { - listeners.emit("packet", data, meta); - listeners.emit("packet." + meta.name, data) - }); - - client.on('login', (packet: any) => { - Bot.entityId = packet.entityId; - }); - - client?.on("end", (reason: any) => { - listeners.emit("end", reason); - }); - }); - - const client = mc.createClient(options); - - listeners.emit('init_client', client); - Bot.bots = options.bots ?? [listeners]; - - this.loadModules() - return Bot; - } -} diff --git a/bot/index.ts b/bot/index.ts deleted file mode 100644 index 9e6c32a..0000000 --- a/bot/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Bot } from "./Bot"; - -const config = require('../config.js'); - -let bots = []; - -for (const options of config.bots) { - //let bot = new Bot.Bot(options, config)//Bot.Bot().Bot//(options, config); - let bot = Bot.Bot(options, config) - //bot.bots.push(bot); - //console.log(bot) -} \ No newline at end of file diff --git a/bot/modules/Chat.ts b/bot/modules/Chat.ts deleted file mode 100644 index e17be4b..0000000 --- a/bot/modules/Chat.ts +++ /dev/null @@ -1,18 +0,0 @@ -export class Chat { - - public static player (packet = "packet.player_chat") { - - } - - public static system (packet = "packet.system_chat") { - - } - - public static diguised (packet = "packet.profileless_chat") { - - } - - constructor (bot: any) { - - } -} \ No newline at end of file diff --git a/bot/resources/version.json b/bot/resources/version.json deleted file mode 100644 index 153d498..0000000 --- a/bot/resources/version.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "build": "5010", - "codename": { - "translate": "%s-%s-%s", - "color": "dark_aqua", - "with": [ - { "text": "Night", "color": "blue" }, - { "text": "of", "color": "dark_blue" }, - { "text": "Nights", "color": "blue" } - ] - }, - "version": "v9.0.0-alpha" -} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index a1ceb24..3704c93 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,10 +16,9 @@ repositories { dependencies { implementation("io.github.zucchero-sintattico.typescript-gradle-plugin:io.github.zucchero-sintattico.typescript-gradle-plugin.gradle.plugin:4.5.7") - implementation("net.lenni0451.mcstructs:all:3.2.1") } typescript { tsConfig = "tsconfig.json" - outputDir = "./jsBuild" -} \ No newline at end of file + outputDir = "./jsBuild/" +} diff --git a/package-lock.json b/package-lock.json index 7df2b3f..5309487 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,11 +15,13 @@ "prismarine-world": "^3.6.3", "smol-toml": "^1.5.2", "socket.io-client": "^4.8.1", + "ts-mixer": "^6.0.4", "undici": "^7.18.2", "yaml": "^2.8.2" }, "devDependencies": { - "@types/node": "^24.10.9" + "@types/node": "^24.10.9", + "irc-framework": "^4.14.0" } }, "node_modules/@azure/msal-common": { @@ -194,9 +196,9 @@ } }, "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.1.tgz", + "integrity": "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==", "license": "MIT", "dependencies": { "@isaacs/balanced-match": "^4.0.1" @@ -312,9 +314,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.10.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.9.tgz", - "integrity": "sha512-ne4A0IpG3+2ETuREInjPNhUGis1SFjv1d5asp8MzEAGtOZeTeHVDOYqOgqfhvseqg/iXty2hjBf1zAOb7RNiNw==", + "version": "24.10.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.10.tgz", + "integrity": "sha512-+0/4J266CBGPUq/ELg7QUHhN25WYjE0wYTPSQJn1xeu8DOlIOPxXxrNGiLmfAWl7HMMgWFWXpt9IDjMWrF5Iow==", "license": "MIT", "dependencies": { "undici-types": "~7.16.0" @@ -330,9 +332,9 @@ } }, "node_modules/@types/readable-stream": { - "version": "4.0.22", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.22.tgz", - "integrity": "sha512-/FFhJpfCLAPwAcN3mFycNUa77ddnr8jTgF5VmSNetaemWB2cIlfCA9t0YTM3JAT0wOcv8D4tjPo7pkDhK3EJIg==", + "version": "4.0.23", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.23.tgz", + "integrity": "sha512-wwXrtQvbMHxCbBgjHaMGEmImFTQxxpfMOR/ZoQnXxB1woqkUbdLGFDgauo00Py9IudiaqSeiBiulSV9i6XIPig==", "license": "MIT", "dependencies": { "@types/node": "*" @@ -455,6 +457,22 @@ "integrity": "sha512-6i37w/+EhlWlGUJff3T/Q8u1RGmP5wgbiwYnOnbOqvtrPxT63/sYFyP9RcpxtxGymtfA075IvmOnL7ycNOWl3w==", "license": "MIT" }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "0.21.4", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", @@ -630,6 +648,56 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/chownr": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", @@ -663,6 +731,18 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "license": "MIT" }, + "node_modules/core-js": { + "version": "3.48.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.48.0.tgz", + "integrity": "sha512-zpEHTy1fjTMZCKLHUZoVeylt9XrzaIN2rbPXEt0k+q7JE5CkCZdo6bNq55bn24a69CH7ErAVLKijxJja4fw+UQ==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -709,6 +789,24 @@ } } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/discontinuous-range": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz", @@ -716,9 +814,9 @@ "license": "MIT" }, "node_modules/discord-api-types": { - "version": "0.38.37", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.38.37.tgz", - "integrity": "sha512-Cv47jzY1jkGkh5sv0bfHYqGgKOWO1peOrGMkDFM4UmaGMOTgOW8QSexhvixa9sVOiz8MnVOBryWYyw/CEVhj7w==", + "version": "0.38.38", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.38.38.tgz", + "integrity": "sha512-7qcM5IeZrfb+LXW07HvoI5L+j4PQeMZXEkSm1htHAHh4Y9JSMXBWjy/r7zmUCOj4F7zNjMcm7IMWr131MT2h0Q==", "license": "MIT", "workspaces": [ "scripts/actions/documentation" @@ -760,6 +858,21 @@ "node": ">=18.17" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -798,31 +911,35 @@ "license": "MIT" }, "node_modules/engine.io-client": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz", - "integrity": "sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==", + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.4.tgz", + "integrity": "sha512-+kjUJnZGwzewFDw951CDWcwj35vMNf2fcj7xQWOctq1F2i1jkDdVvdFG9kM/BEChymCH36KgjnW0NsL58JYRxw==", "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1", + "debug": "~4.4.1", "engine.io-parser": "~5.2.1", - "ws": "~8.17.1", + "ws": "~8.18.3", "xmlhttprequest-ssl": "~2.1.1" } }, - "node_modules/engine.io-client/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "node_modules/engine.io-client/node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, "engines": { - "node": ">=6.0" + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" }, "peerDependenciesMeta": { - "supports-color": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { "optional": true } } @@ -851,6 +968,39 @@ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", "license": "MIT" }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/event-target-shim": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", @@ -860,6 +1010,13 @@ "node": ">=6" } }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "dev": true, + "license": "MIT" + }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -887,6 +1044,13 @@ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "license": "MIT" }, + "node_modules/fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -934,6 +1098,22 @@ } } }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/foreground-child": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", @@ -962,6 +1142,65 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/glob": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", @@ -985,12 +1224,87 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "license": "ISC" }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/http-cache-semantics": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", @@ -1027,8 +1341,8 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "devOptional": true, "license": "MIT", - "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -1065,6 +1379,13 @@ "node": ">=0.8.19" } }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, "node_modules/ip-address": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", @@ -1074,6 +1395,57 @@ "node": ">= 12" } }, + "node_modules/irc-framework": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/irc-framework/-/irc-framework-4.14.0.tgz", + "integrity": "sha512-lNujDAxy9kcu89WbU5H7IDWly64aD1B9nN9AV5M6btfx88qyQuyH16j1tjS40nmkQH6ld6vvaihKRn9cjk1JrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "core-js": "^3.38.1", + "eventemitter3": "^5.0.1", + "grapheme-splitter": "^1.0.4", + "iconv-lite": "^0.6.3", + "isomorphic-textencoder": "^1.0.1", + "lodash": "^4.17.21", + "middleware-handler": "^0.2.0", + "regenerator-runtime": "^0.14.1", + "socks": "^2.8.3", + "stream-browserify": "^3.0.0", + "util": "^0.12.5" + } + }, + "node_modules/is-arguments": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", + "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -1083,12 +1455,77 @@ "node": ">=8" } }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "license": "ISC" }, + "node_modules/isomorphic-textencoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-textencoder/-/isomorphic-textencoder-1.0.1.tgz", + "integrity": "sha512-676hESgHullDdHDsj469hr+7t3i/neBKU9J7q1T4RHaWwLAsaQnywC0D1dIUId0YZ+JtVrShzuBk1soo0+GVcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-text-encoding": "^1.0.0" + } + }, "node_modules/jackspeak": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz", @@ -1170,9 +1607,9 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", "license": "MIT" }, "node_modules/lodash.includes": { @@ -1242,15 +1679,15 @@ "license": "ISC" }, "node_modules/macaddress": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.3.tgz", - "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==", + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/macaddress/-/macaddress-0.5.4.tgz", + "integrity": "sha512-i8xVWoUjj2woYU8kbpQby86Kq7uF7xl2brtKREXUBWpfgqx1fKXEeYzDiVMVxA/IufC1d3xxwJRHtFCX+9IspA==", "license": "MIT" }, "node_modules/magic-bytes.js": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.12.1.tgz", - "integrity": "sha512-ThQLOhN86ZkJ7qemtVRGYM+gRgR8GEXNli9H/PMvpnZsE44Xfh3wx9kGJaldg314v85m+bFW6WBMaVHJc/c3zA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.13.0.tgz", + "integrity": "sha512-afO2mnxW7GDTXMm5/AoN1WuOcdoKhtgXjIvHmobqTD1grNplhGdv3PFOyjCVmrnOZBIT/gD/koDKpYG+0mvHcg==", "license": "MIT" }, "node_modules/make-fetch-happen": { @@ -1275,10 +1712,26 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/middleware-handler": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/middleware-handler/-/middleware-handler-0.2.0.tgz", + "integrity": "sha512-Qz4B0yWndSokapr3Kl7fpMRysS0DaBlOuATrExFuZbr+oXZ3rsAPufdLe8mUJXiG5A4aJGW6GfKS4PDfQwu7Mg==", + "dev": true + }, "node_modules/minecraft-data": { - "version": "3.101.0", - "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.101.0.tgz", - "integrity": "sha512-9kD2sbI9BvjQtN/ZlMkCdgaLJIHPXDGruMEJ0DOO29RB9sVDmSBLjDkH9PyRmlAye/WZlqk/1/b54vWq6ObzxQ==", + "version": "3.103.0", + "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.103.0.tgz", + "integrity": "sha512-laUAUiQ1OXPQPSzGFrx+v4M3LldcIiGuUjLAXzBmA3jZxjwwUKfgEr/7da8CvOeWlwkl+t/sMf5Fw7u7GNE2yg==", "license": "MIT" }, "node_modules/minecraft-folder-path": { @@ -1288,9 +1741,9 @@ "license": "MIT" }, "node_modules/minecraft-protocol": { - "version": "1.62.0", - "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.62.0.tgz", - "integrity": "sha512-+Rm7DdwgDiiq5ASXLNixs6TA7tsNn8zJAlhmOh0ccfuMYnlr/5+FliKacf87ZO6MPs5p/mJitIAwONbfqiX2+A==", + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/minecraft-protocol/-/minecraft-protocol-1.63.0.tgz", + "integrity": "sha512-7siaKT9Up16p8fSgk4MYgH9EDjSZDZjRj0ZillF5vfVDheY2nyskjQ7NFmqucjTsSWSfKqAoBhNnIHut/aa0Nw==", "license": "BSD-3-Clause", "dependencies": { "@types/node-rsa": "^1.1.4", @@ -1494,9 +1947,9 @@ "license": "MIT" }, "node_modules/nan": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.24.0.tgz", - "integrity": "sha512-Vpf9qnVW1RaDkoNKFUvfxqAbtI8ncb8OJlqZ9wwpXzWPEsvsB1nvdUi6oYrHIkQ1Y/tMDnr1h4nczS0VB9Xykg==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.25.0.tgz", + "integrity": "sha512-0M90Ag7Xn5KMLLZ7zliPWP3rT90P6PN+IzVFS0VqmnPktBk3700xUVv8Ikm9EUaUE5SDWdp/BIxdENzVznpm1g==", "license": "MIT" }, "node_modules/nearley": { @@ -1666,9 +2119,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", - "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", + "version": "11.2.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz", + "integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==", "license": "BlueOak-1.0.0", "engines": { "node": "20 || >=22" @@ -1686,6 +2139,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/prismarine-auth": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.7.0.tgz", @@ -1754,9 +2217,9 @@ } }, "node_modules/prismarine-realms": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.4.0.tgz", - "integrity": "sha512-db3iin0ZOYWC7Ye65VSo5kKz8/hWatdDECWchTZG4yWQDC7wHrUMLvmPSnEEG0rdDwq6pMUUedss9dp8D550pA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/prismarine-realms/-/prismarine-realms-1.4.1.tgz", + "integrity": "sha512-WmElIrwN4H/f0460HPnNYRJkRMVNjAmnZUOkZC+tn2Hg2IOsxRlHH5yJ/E2go1hEeFj+NlcYrGDOOhldSXnxSA==", "license": "MIT", "dependencies": { "debug": "^4.3.3", @@ -1887,6 +2350,13 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" + }, "node_modules/ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -1925,12 +2395,30 @@ ], "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT", - "optional": true + "devOptional": true, + "license": "MIT" }, "node_modules/semver": { "version": "7.7.3", @@ -1944,6 +2432,24 @@ "node": ">=10" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -1988,9 +2494,9 @@ } }, "node_modules/smol-toml": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.5.2.tgz", - "integrity": "sha512-QlaZEqcAH3/RtNyet1IPIYPsEWAaYyXXv1Krsi+1L/QHppjX4Ifm8MQsBISz9vE8cHicIq3clogsheili5vhaQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.0.tgz", + "integrity": "sha512-4zemZi0HvTnYwLfrpk/CF9LOd9Lt87kAt50GnqhMpyF9U3poDAP2+iukq2bZsO/ufegbYehBkqINbsWxj4l4cw==", "license": "BSD-3-Clause", "engines": { "node": ">= 18" @@ -2000,13 +2506,13 @@ } }, "node_modules/socket.io-client": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz", - "integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.3.tgz", + "integrity": "sha512-uP0bpjWrjQmUt5DTHq9RuoCBdFJF10cdX9X+a368j/Ft0wmaVgxlrjvK3kjvgCODOMMOz9lcaRzxmso0bTWZ/g==", "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.2", + "debug": "~4.4.1", "engine.io-client": "~6.6.1", "socket.io-parser": "~4.2.4" }, @@ -2014,53 +2520,19 @@ "node": ">=10.0.0" } }, - "node_modules/socket.io-client/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.5.tgz", + "integrity": "sha512-bPMmpy/5WWKHea5Y/jYAP6k74A+hvmRCQaJuJB6I/ML5JZq/KfNieUVo/3Mh7SAqn7TyFdIo6wqYHInG1MU1bQ==", "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" + "debug": "~4.4.1" }, "engines": { "node": ">=10.0.0" } }, - "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/socks": { "version": "2.8.7", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", @@ -2101,6 +2573,32 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-browserify/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -2207,9 +2705,9 @@ } }, "node_modules/tar": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.6.tgz", - "integrity": "sha512-xqUeu2JAIJpXyvskvU3uvQW8PAmHrtXp2KDuMJwQqW8Sqq0CaZBAQ+dKS3RBXVhU4wC5NjAdKrmh84241gO9cA==", + "version": "7.5.7", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.7.tgz", + "integrity": "sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ==", "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/fs-minipass": "^4.0.0", @@ -2257,9 +2755,9 @@ "license": "0BSD" }, "node_modules/undici": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.18.2.tgz", - "integrity": "sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw==", + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.20.0.tgz", + "integrity": "sha512-MJZrkjyd7DeC+uPZh+5/YaMDxFiiEEaDgbUSVMXayofAkDWF1088CDo+2RPg7B1BuS1qf1vgNE7xqwPxE0DuSQ==", "license": "MIT", "engines": { "node": ">=20.18.1" @@ -2304,6 +2802,27 @@ "punycode": "^2.1.0" } }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -2353,6 +2872,28 @@ "which": "bin/which" } }, + "node_modules/which-typed-array": { + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/winreg": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.5.tgz", @@ -2451,9 +2992,9 @@ } }, "node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", + "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index c101443..676a789 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,12 @@ "prismarine-world": "^3.6.3", "smol-toml": "^1.5.2", "socket.io-client": "^4.8.1", + "ts-mixer": "^6.0.4", "undici": "^7.18.2", "yaml": "^2.8.2" }, "devDependencies": { - "@types/node": "^24.10.9" + "@types/node": "^24.10.9", + "irc-framework": "^4.14.0" } } diff --git a/settings.gradle.kts b/settings.gradle.kts index f4ee75a..6b8861c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1 @@ -rootProject.name = "FNFBoyfriendBot" +rootProject.name = "FNFBoyfriendBot" \ No newline at end of file diff --git a/src/Bot.ts b/src/Bot.ts new file mode 100644 index 0000000..35327ac --- /dev/null +++ b/src/Bot.ts @@ -0,0 +1,118 @@ +import mc from "minecraft-protocol"; +import { EventEmitter } from "events"; +import { Chat } from "./modules/Chat"; +import { Extras } from "./modules/extrasMessaging/Extras"; +import { IRC } from "./modules/IRC"; +import { Position } from "./modules/Position"; +import { CommandCore } from "./modules/CommandCore" +import { Tellraw } from "./modules/Tellraw"; +import { Reconnect } from "./modules/Reconnect"; + +//export const listener = new EventEmitter(); + +//export let reconnect: any; + +//export let chat: any + +export class Bot { + public static readonly listener = new EventEmitter() + + public static reconnectDelay: any; + + public static reconnect: Reconnect + + public static tellraw: any; + + public static core: CommandCore; + + public static ircClient: any; + + public static irc: IRC; + + public static _client: any; + + public static chat: Chat; + + public static extras: Extras; + + public static bots: Array; + + public static options: any; + + public static entityId: any; + + public static config: any; + + public static position: Position; + + private static loadModules () { + this.chat = new Chat(); + this.extras = new Extras(); + this.irc = new IRC(); + this.position = new Position(); + this.core = new CommandCore(); + this.tellraw = new Tellraw().tellraw + this.reconnect = new Reconnect(); + } + + private static clearRegistry () { + + } + + private static loadRegistry () { + + } + + public static Bot (options: any, config: any, ircClient: any) { + const listener = this.listener; + + this.options = { + host: options.host ??= "localhost", + port: options.port ??= 25565, + version: options.version ??= "1.21.8", + username: options.username ??= "FNFBoyfriendBot" + }; + + this.config = { + prefixes: config.prefixes ??= ["!"], + console: { + prefix: config.console.prefix ??= "c.", + timezone: "America/CHICAGO", + }, + bots: config.bots ??= [] + } + + this.options = options; + + this.config = config; + + this.ircClient = ircClient; + + listener.on("init_client", (client: any) => { + client.on('packet', (data: any, meta: any) => { + listener.emit("packet", data, meta); + listener.emit("packet." + meta.name, data) + }); + + client.on('login', (packet: any) => { + this.entityId = packet.entityId; + }); + + client.on('error', (error: any) => {}) + + client.on("end", (reason: any) => { + listener.emit("end", reason); + }); + }); + + const client = mc.createClient(options); + + listener.emit('init_client', client); + this.bots = options.bots ?? [listener]; + this._client = client; + + this.loadModules(); + + return Bot; + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..656a2a6 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,13 @@ +import { Bot } from "./Bot"; +const irc = require('irc-framework'); +const config = require('../config.js'); + +const ircClient = new irc.Client(); + +ircClient.connect(config.irc.client); + +let bots = []; + +for (const options of config.bots) { + let bot = Bot.Bot(options, config, ircClient) +} diff --git a/src/modules/Chat.ts b/src/modules/Chat.ts new file mode 100644 index 0000000..f406fad --- /dev/null +++ b/src/modules/Chat.ts @@ -0,0 +1,130 @@ +import { Bot } from "../Bot"; +import convertNbtComponentToJson from "../util/ConvertNbtComponentToJson"; +let chatTypes = '' + +function parseChatType (chatTypes: any, type: any, sender: any, target: any, message: any) { + const chatType = chatTypes[type] + const parsed = convertNbtComponentToJson(null, chatType.value.value.chat) + const array: any[] = [] + for (const parameter of parsed.parameters) { + + switch (parameter) { + case "sender": array.push(sender) + break; + case "target": array.push(target) + case "content": array.push(message) + break; + } + } + let json = { translate: parsed.translation_key, with: array } + + if (type === 4) json = message + + return json +} + + +export class Chat { + private parseMessage () { + + } + + public static getMessageAsPrismarine () { + + } + + public static chatParsers: any; // stub for now + + public player (packet: any): void { + const bot = Bot + const unsigned = convertNbtComponentToJson(null, packet.unsignedChatContent); + const networkName = convertNbtComponentToJson(null, packet.networkName) + bot.listener.emit('message', { + type: "minecraft:player_chat", + message: unsigned + }) + } + + private system (packet: any): void { + const bot = Bot + const message = convertNbtComponentToJson(null, packet.content); + if ( + message.translate === "advMode.setCommand.success" + || + message.translate === "multiplayer.message_not_delivered" + || + packet.isActionBar + || + message.translate === "advMode.notAllowed" + ) + return; + + bot.listener.emit("message", { + type: "minecraft:system_chat", + message: message + }); + } + + private diguised (data: any): void { + const bot = Bot + const sender = convertNbtComponentToJson(null, data.name); + const message = convertNbtComponentToJson(null, data.message); + const target = convertNbtComponentToJson(null, data.target) + const type = data.type.chatType; + const parsed = parseChatType(chatTypes, type, sender, target, message) + bot.listener.emit('message', { + type: "minecraft:disguised_chat", + message: parsed + }) + } + + public message (message: any) { + const bot = Bot + const acc = 0; + const bitset = Buffer.allocUnsafe(3); + bitset[0] = acc & 0xff; + bitset[1] = (acc >> 8) & 0xff; + bitset[2] = (acc >> 16) & 0xff; + bot._client.write('chat_message', { + message: message?.substring(0, 256)?.replaceAll("§", "&"), + timestamp: BigInt(Date.now()), + salt: BigInt(0), + offset: 0, + acknowledged: bitset, + }) + } + + public command (command: any) { + const bot = Bot; + bot._client.write("chat_command", { + command: command?.substring(0, 256)?.replaceAll("§", "&"), + timestamp: BigInt(Date.now()), + salt: BigInt(0), + argumentSignatures: [], + signedPreview: false, + messageCount: 0, + acknowledged: Buffer.alloc(3), + previousMessages: [], + }); + } + + public static send () { + + } + + constructor () { + const bot = Bot; + const listener = bot.listener; + + listener.on('packet.registry_data', (packet: any) => { + if (packet.id !== 'minecraft:chat_type') return // taken from the 1.21.1 build of my bot that chayapak made + chatTypes = packet.entries + }) + + listener.on("packet.player_chat", this.player); + + listener.on("packet.system_chat", this.system); + + listener.on("packet.profileless_chat", this.diguised); + } +} \ No newline at end of file diff --git a/src/modules/CommandCore.ts b/src/modules/CommandCore.ts new file mode 100644 index 0000000..3a27826 --- /dev/null +++ b/src/modules/CommandCore.ts @@ -0,0 +1,104 @@ +import { Bot } from "../Bot"; +const config = require('../../config') + +// i may or may not have used v4's command core for a base here +export class CommandCore { + public area = { + start: config.core.area.start ?? { x: 0, y: 0, z: 0 }, + end: config.core.area.end ?? { x: 15, y: 0, z: 15 } + }; + + public position: any; + + public itemPosition: any; + + public currentBlockRelative = { x: 0, y: 0, z: 0 }; + + public chatRefill () { + const bot = Bot; + const pos = this.position; + const { start, end } = this.area; + + if (!pos) return; + + bot.chat.command(`minecraft:fill ${pos.x + start.x} ${pos.y + start.y} ${pos.z + start.z} ${pos.x + end.x} ${pos.y + end.y} ${pos.z + end.z} command_block`); + }; + + public itemRefill () { + // will work on this later + }; + + public move (pos = this.position) { + this.position = { + x: Math.floor(pos.x / 16) * 16, + y: 0, + z: Math.floor(pos.z / 16) * 16 + } + + this.itemPosition = { + x: Math.floor(pos.x), + y: Math.floor(pos.y - 1), + z: Math.floor(pos.z), + }; + + this.chatRefill(); + } + + public useCommandBlock (command: any, location: any, mode: any, flags: any) { + const bot = Bot + bot._client.write("update_command_block", { + command: command?.substring(0, 32767), + location: location, + mode: mode, + flags: flags, + }); + }; + + public currentBlock () { + const relativePosition = this.currentBlockRelative + const corePosition = this.position + if (!corePosition) return null + return { x: relativePosition.x + corePosition.x, y: relativePosition.y + corePosition.y, z: relativePosition.z + corePosition.z } + } + + public incrementCurrentBlock () { + const relativePosition = this.currentBlockRelative + const { start, end } = this.area + + relativePosition.x++ + + if (relativePosition.x > end.x) { + relativePosition.x = start.x + relativePosition.z++ + } + + if (relativePosition.z > end.z) { + relativePosition.z = start.z + relativePosition.y++ + } + + if (relativePosition.y > end.y) { + relativePosition.x = start.x + relativePosition.y = start.y + relativePosition.z = start.z + } + } + + public run (command: any) { + const bot = Bot + const location = this.currentBlock() + if (!location) return + + bot._client.write('update_command_block', { command, location, mode: 1, flags: 0b100 }) + + this.incrementCurrentBlock(); + } + + constructor () { + const bot = Bot + bot.listener.on('move', () => { + this.move(bot.position) + this.run('say meow :3') + }); + } +} \ No newline at end of file diff --git a/src/modules/IRC.ts b/src/modules/IRC.ts new file mode 100644 index 0000000..97da0f2 --- /dev/null +++ b/src/modules/IRC.ts @@ -0,0 +1,116 @@ +import { Bot } from '../Bot'; +const ChatMessage = require('prismarine-chat')('1.21.9'); +let queueCount = 0; +import version from '../resources/version.json'; + +export class IRC { + private handleMessages (message: any) { + + } + + private send (message: any) { + const bot = Bot; + queueCount++ + const client = bot.ircClient; + + const string = ChatMessage.fromNotch(message.message)?.toString().substring(0, 512); + + const channel = client.channel(bot.options.ircChannel); + + if (queueCount > 4) return + else channel.say(string) + } + + constructor () { + const bot = Bot; + const client = bot.ircClient; + const options = bot.options; + const botCodename = ChatMessage.fromNotch(version.bot.codename)?.toString(); + const fouCodename = ChatMessage.fromNotch(version.foundation.codename)?.toString(); + + client.on('registered', (data: any) => { + client.join(options.ircChannel); + const channel = client.channel(options.ircChannel); + channel.say(`FNFBoyfriendBot ${version.bot.version}-${botCodename} Build: ${version.bot.build}`); + channel.say(`${fouCodename} Foundation ${version.foundation.version} Build: ${version.foundation.build}`); + }); + + client.on('whois', (data: any) => { + + }) + + client.on('join', (data: any) => { + + }) + + bot.listener.on('message', this.send) + + client.on('message', (data: any) => { + const user = data.nick; + const message = data.message; + + client.who(options.ircChannel) + + client.on('wholist', (dataa: any) => { + const users = dataa.users; + const findUser = users.find((a: any) => a.nick === user); + console.log(findUser); + }); + + let component = []; + + component.push( + { + translate: "[%s] %s \u203a %s", + with: [ + { + translate: "%s%s%s %s", + bold: false, + with: [ + { + text: "FNF", + bold: false, + color: "blue", + }, + { + text: "Boyfriend", + bold: false, + color: "dark_aqua", + }, + { + text: "Bot", + bold: false, + color: "dark_blue", + }, + { + text: "IRC", + bold: false, + color: "blue" + } + ], + }, + { + translate: "<%s>", + color: "blue", + bold: false, + with: [ + { + text: `${user}`, + bold: false, + color: "dark_blue", + } + ] + }, + message + ] + } + ) // component totally wasnt taking from Reignite's discord module :tm: + + bot.tellraw("@a", component); + }); + + setInterval(() => { + queueCount = 0; + }, 3000) + } +} diff --git a/src/modules/Position.ts b/src/modules/Position.ts new file mode 100644 index 0000000..4166bc5 --- /dev/null +++ b/src/modules/Position.ts @@ -0,0 +1,29 @@ +import { Bot } from '../Bot'; +export class Position { + public x: any; + + public y: any; + + public z: any; + + constructor () { + const bot = Bot; + const listener = bot.listener; + + listener.on("packet.position", (packet: any) => { + this.x = packet.x; + this.y = packet.y; + this.z = packet.z; + + bot._client.write("teleport_confirm", { teleportId: packet.teleportId }); + + listener.emit("move"); + }); + + listener.on("end", () => { + this.x = null; + this.y = null; + this.z = null; + }) + } +} \ No newline at end of file diff --git a/src/modules/Reconnect.ts b/src/modules/Reconnect.ts new file mode 100644 index 0000000..eb07909 --- /dev/null +++ b/src/modules/Reconnect.ts @@ -0,0 +1,19 @@ +import mc from "minecraft-protocol"; +import { Bot } from '../Bot'; + +export class Reconnect { + constructor() { + const bot = Bot + let client; + const options = bot.options + bot.reconnectDelay = options.reconnectDelay; + + bot.listener.on("end", () => { + setTimeout(() => { + client = options.client ?? mc.createClient(options) + bot._client = client; + bot.listener.emit("init_client", bot._client); + }, bot.reconnectDelay); + }); + } +} \ No newline at end of file diff --git a/src/modules/SkiBot.ts b/src/modules/SkiBot.ts new file mode 100644 index 0000000..e5ce407 --- /dev/null +++ b/src/modules/SkiBot.ts @@ -0,0 +1,3 @@ +export class SkiBot { + +} \ No newline at end of file diff --git a/src/modules/Tellraw.ts b/src/modules/Tellraw.ts new file mode 100644 index 0000000..2bcdafa --- /dev/null +++ b/src/modules/Tellraw.ts @@ -0,0 +1,7 @@ +import { Bot } from '../Bot'; + +export class Tellraw { + public tellraw (selector: any, ...message: any): void { + Bot.core.run(`minecraft:tellraw ${selector} ` + JSON.stringify(message)); + } +} \ No newline at end of file diff --git a/src/modules/extrasMessaging/Extras.ts b/src/modules/extrasMessaging/Extras.ts new file mode 100644 index 0000000..1a37dc3 --- /dev/null +++ b/src/modules/extrasMessaging/Extras.ts @@ -0,0 +1,41 @@ +const channels = "extras:register\0extras:unregister\0extras:message\0"; +import { Bot } from "../../Bot"; + +export class Extras { + public static channels = []; + + public register (channel: any) { + + } + + public unregister (channel: any) { + + } + + public unregisterAll () { + + } + + public send (channel: any, ...message: any) { + const bot = Bot; + const buffer = Buffer.from(channel, "utf8"); + + buffer[buffer.length - 1]! |= 0x80; + + bot._client.write("custom_payload", { + channel: "extras:message", + data: Buffer.concat([buffer, Buffer.from(`${message}`, "utf8")]) + }) + } + + + constructor () { + const bot = Bot + bot.listener.on('packet.login', () => { + bot._client.write("custom_payload", { + channel: "minecraft:register", + data: Buffer.from(channels, "utf8") + }); + }); + } +} \ No newline at end of file diff --git a/bot/resources/language.json b/src/resources/language.json similarity index 100% rename from bot/resources/language.json rename to src/resources/language.json diff --git a/src/resources/version.json b/src/resources/version.json new file mode 100644 index 0000000..7373f9f --- /dev/null +++ b/src/resources/version.json @@ -0,0 +1,20 @@ +{ + "bot": { + "build": "5010", + "codename": { + "translate": "%s-%s-%s", + "color": "dark_aqua", + "with": [ + { "text": "Night", "color": "blue" }, + { "text": "of", "color": "dark_blue" }, + { "text": "Nights", "color": "blue" } + ] + }, + "version": "v9.0.0-alpha" + }, + "foundation": { + "build": "1200", + "codename": { "text": "Ultimate", "color": "black" }, + "version": "v5.0.0-alpha" + } +} \ No newline at end of file diff --git a/bot/util/ConvertNbtComponentToJson.js b/src/util/ConvertNbtComponentToJson.ts similarity index 92% rename from bot/util/ConvertNbtComponentToJson.js rename to src/util/ConvertNbtComponentToJson.ts index 1ecda8c..124e41e 100644 --- a/bot/util/ConvertNbtComponentToJson.js +++ b/src/util/ConvertNbtComponentToJson.ts @@ -8,11 +8,11 @@ const BOOLEAN_TYPES = [ "strikethrough", "obfuscated", ]; -function convertNbtComponentToJson(key, tag) { +export = function convertNbtComponentToJson(key: any, tag: any): any { if (!tag) { return null; } else if (tag.type === "compound") { - const object = {}; + const object: any = {}; for (const key of Object.keys(tag.value)) { object[key === "" ? "text" : key] = convertNbtComponentToJson( @@ -62,4 +62,3 @@ function convertNbtComponentToJson(key, tag) { return { text: "" }; } } -module.exports = convertNbtComponentToJson; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 5acd3ad..de39ebf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,21 @@ { - "exclude": ["./build", "./config.js", "./convertYaodesHardcode.js", "./old", "./jsBuild"], + "exclude": [ + "./build", + "./config.js", + "./old", + "./jsBuild", + "./SkiBot", + "./extrasRecieving.js", + "./Recieving.ts", + "./testing/*" + ], "compilerOptions": { "useUnknownInCatchVariables": false, - "rootDir": "./bot", + "rootDir": "./src", "outDir": "./jsBuild", "module": "commonjs", "allowJs": true, - "target": "es2022", + "target": "es6", "types": ["node"], "sourceMap": false, "declaration": false,