diff --git a/autobuilder/index.js b/autobuilder/index.js index 8e0412b..8283fbf 100644 --- a/autobuilder/index.js +++ b/autobuilder/index.js @@ -1,9 +1,10 @@ const fs = require("fs"); -const fse = require("fs-extra"); const { unzip } = require("./utils"); const { zip } = require("zip-a-folder"); const axios = require("axios"); const FormData = require("form-data"); +const util = require('util'); +const exec = util.promisify(require('child_process').exec); const assetsPaths = { "1.8.9": "./assets/1.8.9.jar", @@ -119,6 +120,9 @@ async function build() { console.log("Building JAR File"); await zip(tempPaths.jar, buildPath + `/client-${version}.jar`); + // + // console.log("Obfuscation") + // await exec('cd proguard && java -jar proguard.jar @sc') console.log("Uploading build to Silent Client Servers"); try { diff --git a/autobuilder/package-lock.json b/autobuilder/package-lock.json new file mode 100644 index 0000000..c79ae85 --- /dev/null +++ b/autobuilder/package-lock.json @@ -0,0 +1,693 @@ +{ + "name": "autobuilder", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "autobuilder", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "axios": "^1.4.0", + "form-data": "^4.0.0", + "fs-extra": "^11.1.1", + "jszip": "^3.10.1", + "zip-a-folder": "^1.1.5" + } + }, + "node_modules/archiver-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz", + "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", + "dependencies": { + "glob": "^7.1.4", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/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==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "engines": { + "node": "*" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compress-commons": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz", + "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", + "dependencies": { + "buffer-crc32": "^0.2.13", + "crc32-stream": "^4.0.2", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/compress-commons/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==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/crc32-stream": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz", + "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", + "dependencies": { + "crc-32": "^1.2.0", + "readable-stream": "^3.4.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/crc32-stream/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==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "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==" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", + "dependencies": { + "readable-stream": "^2.0.5" + }, + "engines": { + "node": ">= 0.6.3" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==" + }, + "node_modules/lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", + "dependencies": { + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/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==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "engines": { + "node": ">= 10.0.0" + } + }, + "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==" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/zip-a-folder": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/zip-a-folder/-/zip-a-folder-1.1.7.tgz", + "integrity": "sha512-JqRZlUYJVogDvR1hl1j+30MNwrOWc886bpPePnfyXgMFQpOqfDcZAqICNp0Zt+Th7C2KcQYMI4fThrkEXa7DSQ==", + "dependencies": { + "archiver": "^5.3.1" + } + }, + "node_modules/zip-a-folder/node_modules/archiver": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz", + "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", + "dependencies": { + "archiver-utils": "^2.1.0", + "async": "^3.2.4", + "buffer-crc32": "^0.2.1", + "readable-stream": "^3.6.0", + "readdir-glob": "^1.1.2", + "tar-stream": "^2.2.0", + "zip-stream": "^4.1.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-a-folder/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==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/zip-stream": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", + "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", + "dependencies": { + "archiver-utils": "^3.0.4", + "compress-commons": "^4.1.2", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-stream/node_modules/archiver-utils": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz", + "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", + "dependencies": { + "glob": "^7.2.3", + "graceful-fs": "^4.2.0", + "lazystream": "^1.0.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/zip-stream/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==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + } + } +} diff --git a/autobuilder/proguard/proguard-ant.jar b/autobuilder/proguard/proguard-ant.jar new file mode 100644 index 0000000..c06ce0f Binary files /dev/null and b/autobuilder/proguard/proguard-ant.jar differ diff --git a/autobuilder/proguard/proguard.jar b/autobuilder/proguard/proguard.jar new file mode 100644 index 0000000..d91ce53 Binary files /dev/null and b/autobuilder/proguard/proguard.jar differ diff --git a/autobuilder/proguard/proguardgui.jar b/autobuilder/proguard/proguardgui.jar new file mode 100644 index 0000000..1ac5f00 Binary files /dev/null and b/autobuilder/proguard/proguardgui.jar differ diff --git a/autobuilder/proguard/retrace.jar b/autobuilder/proguard/retrace.jar new file mode 100644 index 0000000..cae098a Binary files /dev/null and b/autobuilder/proguard/retrace.jar differ diff --git a/autobuilder/proguard/rt.jar b/autobuilder/proguard/rt.jar new file mode 100644 index 0000000..1ac9c63 Binary files /dev/null and b/autobuilder/proguard/rt.jar differ diff --git a/autobuilder/proguard/sc b/autobuilder/proguard/sc new file mode 100644 index 0000000..211e301 --- /dev/null +++ b/autobuilder/proguard/sc @@ -0,0 +1,320 @@ +-injars '../build/client-1.8.9.jar' +-outjars '../build/client-1.8.9-obf.jar' + +-libraryjars './rt.jar' + +-dontshrink +-dontoptimize +-overloadaggressively +-useuniqueclassmembernames +-repackageclasses net.silentclient +-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod +-keepparameternames +-verbose +-dontnote +-dontwarn + + + +-keep,allowshrinking class net.silentclient.client.mixin.** { + ; + ; +} + +-keep,allowshrinking class net.minecraft.** { + ; + ; +} + +-keep,allowshrinking class net.silentclient.client.utils.cursors.** { + ; + ; +} + +# Keep - Applications. Keep all application classes, along with their 'main' methods. +-keepclasseswithmembers public class * { + public static void main(java.lang.String[]); +} + +# Also keep - Enumerations. Keep the special static methods that are required in +# enumeration classes. +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +# Also keep - Database drivers. Keep all implementations of java.sql.Driver. +-keep class * extends java.sql.Driver + +# Also keep - Swing UI L&F. Keep all extensions of javax.swing.plaf.ComponentUI, +# along with the special 'createUI' method. +-keep class * extends javax.swing.plaf.ComponentUI { + public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent); +} + +# Keep - Native method names. Keep all native class/method names. +-keepclasseswithmembers,includedescriptorclasses,allowshrinking class * { + native ; +} + +# Remove - System method calls. Remove all invocations of System +# methods without side effects whose return values are not used. +-assumenosideeffects public class java.lang.System { + public static long currentTimeMillis(); + static java.lang.Class getCallerClass(); + public static int identityHashCode(java.lang.Object); + public static java.lang.SecurityManager getSecurityManager(); + public static java.util.Properties getProperties(); + public static java.lang.String getProperty(java.lang.String); + public static java.lang.String getenv(java.lang.String); + public static java.lang.String mapLibraryName(java.lang.String); + public static java.lang.String getProperty(java.lang.String,java.lang.String); +} + +# Remove - Math method calls. Remove all invocations of Math +# methods without side effects whose return values are not used. +-assumenosideeffects public class java.lang.Math { + public static double sin(double); + public static double cos(double); + public static double tan(double); + public static double asin(double); + public static double acos(double); + public static double atan(double); + public static double toRadians(double); + public static double toDegrees(double); + public static double exp(double); + public static double log(double); + public static double log10(double); + public static double sqrt(double); + public static double cbrt(double); + public static double IEEEremainder(double,double); + public static double ceil(double); + public static double floor(double); + public static double rint(double); + public static double atan2(double,double); + public static double pow(double,double); + public static int round(float); + public static long round(double); + public static double random(); + public static int abs(int); + public static long abs(long); + public static float abs(float); + public static double abs(double); + public static int max(int,int); + public static long max(long,long); + public static float max(float,float); + public static double max(double,double); + public static int min(int,int); + public static long min(long,long); + public static float min(float,float); + public static double min(double,double); + public static double ulp(double); + public static float ulp(float); + public static double signum(double); + public static float signum(float); + public static double sinh(double); + public static double cosh(double); + public static double tanh(double); + public static double hypot(double,double); + public static double expm1(double); + public static double log1p(double); +} + +# Remove - Number method calls. Remove all invocations of Number +# methods without side effects whose return values are not used. +-assumenosideeffects public class java.lang.* extends java.lang.Number { + public static java.lang.String toString(byte); + public static java.lang.Byte valueOf(byte); + public static byte parseByte(java.lang.String); + public static byte parseByte(java.lang.String,int); + public static java.lang.Byte valueOf(java.lang.String,int); + public static java.lang.Byte valueOf(java.lang.String); + public static java.lang.Byte decode(java.lang.String); + public int compareTo(java.lang.Byte); + public static java.lang.String toString(short); + public static short parseShort(java.lang.String); + public static short parseShort(java.lang.String,int); + public static java.lang.Short valueOf(java.lang.String,int); + public static java.lang.Short valueOf(java.lang.String); + public static java.lang.Short valueOf(short); + public static java.lang.Short decode(java.lang.String); + public static short reverseBytes(short); + public int compareTo(java.lang.Short); + public static java.lang.String toString(int,int); + public static java.lang.String toHexString(int); + public static java.lang.String toOctalString(int); + public static java.lang.String toBinaryString(int); + public static java.lang.String toString(int); + public static int parseInt(java.lang.String,int); + public static int parseInt(java.lang.String); + public static java.lang.Integer valueOf(java.lang.String,int); + public static java.lang.Integer valueOf(java.lang.String); + public static java.lang.Integer valueOf(int); + public static java.lang.Integer getInteger(java.lang.String); + public static java.lang.Integer getInteger(java.lang.String,int); + public static java.lang.Integer getInteger(java.lang.String,java.lang.Integer); + public static java.lang.Integer decode(java.lang.String); + public static int highestOneBit(int); + public static int lowestOneBit(int); + public static int numberOfLeadingZeros(int); + public static int numberOfTrailingZeros(int); + public static int bitCount(int); + public static int rotateLeft(int,int); + public static int rotateRight(int,int); + public static int reverse(int); + public static int signum(int); + public static int reverseBytes(int); + public int compareTo(java.lang.Integer); + public static java.lang.String toString(long,int); + public static java.lang.String toHexString(long); + public static java.lang.String toOctalString(long); + public static java.lang.String toBinaryString(long); + public static java.lang.String toString(long); + public static long parseLong(java.lang.String,int); + public static long parseLong(java.lang.String); + public static java.lang.Long valueOf(java.lang.String,int); + public static java.lang.Long valueOf(java.lang.String); + public static java.lang.Long valueOf(long); + public static java.lang.Long decode(java.lang.String); + public static java.lang.Long getLong(java.lang.String); + public static java.lang.Long getLong(java.lang.String,long); + public static java.lang.Long getLong(java.lang.String,java.lang.Long); + public static long highestOneBit(long); + public static long lowestOneBit(long); + public static int numberOfLeadingZeros(long); + public static int numberOfTrailingZeros(long); + public static int bitCount(long); + public static long rotateLeft(long,int); + public static long rotateRight(long,int); + public static long reverse(long); + public static int signum(long); + public static long reverseBytes(long); + public int compareTo(java.lang.Long); + public static java.lang.String toString(float); + public static java.lang.String toHexString(float); + public static java.lang.Float valueOf(java.lang.String); + public static java.lang.Float valueOf(float); + public static float parseFloat(java.lang.String); + public static boolean isNaN(float); + public static boolean isInfinite(float); + public static int floatToIntBits(float); + public static int floatToRawIntBits(float); + public static float intBitsToFloat(int); + public static int compare(float,float); + public boolean isNaN(); + public boolean isInfinite(); + public int compareTo(java.lang.Float); + public static java.lang.String toString(double); + public static java.lang.String toHexString(double); + public static java.lang.Double valueOf(java.lang.String); + public static java.lang.Double valueOf(double); + public static double parseDouble(java.lang.String); + public static boolean isNaN(double); + public static boolean isInfinite(double); + public static long doubleToLongBits(double); + public static long doubleToRawLongBits(double); + public static double longBitsToDouble(long); + public static int compare(double,double); + public boolean isNaN(); + public boolean isInfinite(); + public int compareTo(java.lang.Double); + public byte byteValue(); + public short shortValue(); + public int intValue(); + public long longValue(); + public float floatValue(); + public double doubleValue(); + public int compareTo(java.lang.Object); + public boolean equals(java.lang.Object); + public int hashCode(); + public java.lang.String toString(); +} + +# Remove - String method calls. Remove all invocations of String +# methods without side effects whose return values are not used. +-assumenosideeffects public class java.lang.String { + public static java.lang.String copyValueOf(char[]); + public static java.lang.String copyValueOf(char[],int,int); + public static java.lang.String valueOf(boolean); + public static java.lang.String valueOf(char); + public static java.lang.String valueOf(char[]); + public static java.lang.String valueOf(char[],int,int); + public static java.lang.String valueOf(double); + public static java.lang.String valueOf(float); + public static java.lang.String valueOf(int); + public static java.lang.String valueOf(java.lang.Object); + public static java.lang.String valueOf(long); + public boolean contentEquals(java.lang.StringBuffer); + public boolean endsWith(java.lang.String); + public boolean equalsIgnoreCase(java.lang.String); + public boolean equals(java.lang.Object); + public boolean matches(java.lang.String); + public boolean regionMatches(boolean,int,java.lang.String,int,int); + public boolean regionMatches(int,java.lang.String,int,int); + public boolean startsWith(java.lang.String); + public boolean startsWith(java.lang.String,int); + public byte[] getBytes(); + public byte[] getBytes(java.lang.String); + public char charAt(int); + public char[] toCharArray(); + public int compareToIgnoreCase(java.lang.String); + public int compareTo(java.lang.Object); + public int compareTo(java.lang.String); + public int hashCode(); + public int indexOf(int); + public int indexOf(int,int); + public int indexOf(java.lang.String); + public int indexOf(java.lang.String,int); + public int lastIndexOf(int); + public int lastIndexOf(int,int); + public int lastIndexOf(java.lang.String); + public int lastIndexOf(java.lang.String,int); + public int length(); + public java.lang.CharSequence subSequence(int,int); + public java.lang.String concat(java.lang.String); + public java.lang.String replaceAll(java.lang.String,java.lang.String); + public java.lang.String replace(char,char); + public java.lang.String replaceFirst(java.lang.String,java.lang.String); + public java.lang.String[] split(java.lang.String); + public java.lang.String[] split(java.lang.String,int); + public java.lang.String substring(int); + public java.lang.String substring(int,int); + public java.lang.String toLowerCase(); + public java.lang.String toLowerCase(java.util.Locale); + public java.lang.String toString(); + public java.lang.String toUpperCase(); + public java.lang.String toUpperCase(java.util.Locale); + public java.lang.String trim(); +} + +# Remove - StringBuffer method calls. Remove all invocations of StringBuffer +# methods without side effects whose return values are not used. +-assumenosideeffects public class java.lang.StringBuffer { + public java.lang.String toString(); + public char charAt(int); + public int capacity(); + public int codePointAt(int); + public int codePointBefore(int); + public int indexOf(java.lang.String,int); + public int lastIndexOf(java.lang.String); + public int lastIndexOf(java.lang.String,int); + public int length(); + public java.lang.String substring(int); + public java.lang.String substring(int,int); +} + +# Remove - StringBuilder method calls. Remove all invocations of StringBuilder +# methods without side effects whose return values are not used. +-assumenosideeffects public class java.lang.StringBuilder { + public java.lang.String toString(); + public char charAt(int); + public int capacity(); + public int codePointAt(int); + public int codePointBefore(int); + public int indexOf(java.lang.String,int); + public int lastIndexOf(java.lang.String); + public int lastIndexOf(java.lang.String,int); + public int length(); + public java.lang.String substring(int); + public java.lang.String substring(int,int); +} diff --git a/autobuilder/yarn.lock b/autobuilder/yarn.lock index 15e1d21..cd35063 100644 --- a/autobuilder/yarn.lock +++ b/autobuilder/yarn.lock @@ -4,7 +4,7 @@ archiver-utils@^2.1.0: version "2.1.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" + resolved "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.1.0.tgz" integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== dependencies: glob "^7.1.4" @@ -18,51 +18,67 @@ archiver-utils@^2.1.0: normalize-path "^3.0.0" readable-stream "^2.0.0" +archiver-utils@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/archiver-utils/-/archiver-utils-3.0.4.tgz" + integrity sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw== + dependencies: + glob "^7.2.3" + graceful-fs "^4.2.0" + lazystream "^1.0.0" + lodash.defaults "^4.2.0" + lodash.difference "^4.5.0" + lodash.flatten "^4.4.0" + lodash.isplainobject "^4.0.6" + lodash.union "^4.6.0" + normalize-path "^3.0.0" + readable-stream "^3.6.0" + archiver@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-5.3.1.tgz#21e92811d6f09ecfce649fbefefe8c79e57cbbb6" - integrity sha512-8KyabkmbYrH+9ibcTScQ1xCJC/CGcugdVIwB+53f5sZziXgwUh3iXlAlANMxcZyDEfTHMe6+Z5FofV8nopXP7w== + version "5.3.2" + resolved "https://registry.npmjs.org/archiver/-/archiver-5.3.2.tgz" + integrity sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw== dependencies: archiver-utils "^2.1.0" - async "^3.2.3" + async "^3.2.4" buffer-crc32 "^0.2.1" readable-stream "^3.6.0" - readdir-glob "^1.0.0" + readdir-glob "^1.1.2" tar-stream "^2.2.0" zip-stream "^4.1.0" -async@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== +async@^3.2.4: + version "3.2.5" + resolved "https://registry.npmjs.org/async/-/async-3.2.5.tgz" + integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== asynckit@^0.4.0: version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== axios@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" - integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA== + version "1.6.8" + resolved "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz" + integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== dependencies: - follow-redirects "^1.15.0" + follow-redirects "^1.15.6" form-data "^4.0.0" proxy-from-env "^1.1.0" balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64-js@^1.3.1: version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== bl@^4.0.3: version "4.1.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== dependencies: buffer "^5.5.0" @@ -71,7 +87,7 @@ bl@^4.0.3: brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -79,19 +95,19 @@ brace-expansion@^1.1.7: brace-expansion@^2.0.1: version "2.0.1" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: balanced-match "^1.0.0" buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + resolved "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz" integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== buffer@^5.5.0: version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== dependencies: base64-js "^1.3.1" @@ -99,15 +115,15 @@ buffer@^5.5.0: combined-stream@^1.0.8: version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" -compress-commons@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-4.1.1.tgz#df2a09a7ed17447642bad10a85cc9a19e5c42a7d" - integrity sha512-QLdDLCKNV2dtoTorqgxngQCMA+gWXkM/Nwu7FpeBhk/RdkzimqC3jueb/FDmaZeXh+uby1jkBqE3xArsLBE5wQ== +compress-commons@^4.1.2: + version "4.1.2" + resolved "https://registry.npmjs.org/compress-commons/-/compress-commons-4.1.2.tgz" + integrity sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg== dependencies: buffer-crc32 "^0.2.13" crc32-stream "^4.0.2" @@ -116,47 +132,47 @@ compress-commons@^4.1.0: concat-map@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== core-util-is@~1.0.0: version "1.0.3" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== crc-32@^1.2.0: version "1.2.2" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + resolved "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz" integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== crc32-stream@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-4.0.2.tgz#c922ad22b38395abe9d3870f02fa8134ed709007" - integrity sha512-DxFZ/Hk473b/muq1VJ///PMNLj0ZMnzye9thBpmjpJKCc5eMgB95aK8zCGrGfQ90cWo561Te6HK9D+j4KPdM6w== + version "4.0.3" + resolved "https://registry.npmjs.org/crc32-stream/-/crc32-stream-4.0.3.tgz" + integrity sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw== dependencies: crc-32 "^1.2.0" readable-stream "^3.4.0" delayed-stream@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== end-of-stream@^1.4.1: version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" -follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== form-data@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== dependencies: asynckit "^0.4.0" @@ -165,13 +181,13 @@ form-data@^4.0.0: fs-constants@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== fs-extra@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" - integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== + version "11.2.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" @@ -179,12 +195,12 @@ fs-extra@^11.1.1: fs.realpath@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -glob@^7.1.4: +glob@^7.1.4, glob@^7.2.3: version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -196,40 +212,40 @@ glob@^7.1.4: graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== ieee754@^1.1.13: version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== immediate@~3.0.5: version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz" integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== inflight@^1.0.4: version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@2: version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== isarray@~1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== jsonfile@^6.0.1: version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: universalify "^2.0.0" @@ -238,7 +254,7 @@ jsonfile@^6.0.1: jszip@^3.10.1: version "3.10.1" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2" + resolved "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz" integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g== dependencies: lie "~3.3.0" @@ -248,104 +264,104 @@ jszip@^3.10.1: lazystream@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" + resolved "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz" integrity sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw== dependencies: readable-stream "^2.0.5" lie@~3.3.0: version "3.3.0" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + resolved "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz" integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== dependencies: immediate "~3.0.5" lodash.defaults@^4.2.0: version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + resolved "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz" integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== lodash.difference@^4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" + resolved "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz" integrity sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA== lodash.flatten@^4.4.0: version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + resolved "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz" integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== lodash.isplainobject@^4.0.6: version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz" integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== lodash.union@^4.6.0: version "4.6.0" - resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" + resolved "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz" integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== mime-db@1.52.0: version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12: version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" minimatch@^3.1.1: version "3.1.2" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimatch@^5.1.0: version "5.1.6" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" normalize-path@^3.0.0: version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== once@^1.3.0, once@^1.4.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" pako@~1.0.2: version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + resolved "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== process-nextick-args@~2.0.0: version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== proxy-from-env@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@~2.3.6: version "2.3.8" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== dependencies: core-util-is "~1.0.0" @@ -356,54 +372,60 @@ readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@^3.1.1: version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdir-glob@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/readdir-glob/-/readdir-glob-1.1.2.tgz#b185789b8e6a43491635b6953295c5c5e3fd224c" - integrity sha512-6RLVvwJtVwEDfPdn6X6Ille4/lxGl0ATOY4FN/B9nxQcgOazvvI0nodiD19ScKq0PvA/29VpaOQML36o5IzZWA== +readable-stream@^3.4.0: + version "3.6.2" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdir-glob@^1.1.2: + version "1.1.3" + resolved "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz" + integrity sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA== dependencies: minimatch "^5.1.0" safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - setimmediate@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: +string_decoder@^1.1.1, string_decoder@~1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" tar-stream@^2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz" integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== dependencies: bl "^4.0.3" @@ -413,32 +435,32 @@ tar-stream@^2.2.0: readable-stream "^3.1.1" universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + version "2.0.1" + resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== wrappy@1: version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== zip-a-folder@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/zip-a-folder/-/zip-a-folder-1.1.5.tgz#9c3176e844bc1305338717fab765edac4839b778" - integrity sha512-w6I4mvWc6D0Q4pdzCSFbQih/ezYBdjwGZVbWRRFMOYcOdtE9TONZ7YtXCPnHj4XJQmXQxTOWcRGnPYxRn+d0mw== + version "1.1.7" + resolved "https://registry.npmjs.org/zip-a-folder/-/zip-a-folder-1.1.7.tgz" + integrity sha512-JqRZlUYJVogDvR1hl1j+30MNwrOWc886bpPePnfyXgMFQpOqfDcZAqICNp0Zt+Th7C2KcQYMI4fThrkEXa7DSQ== dependencies: archiver "^5.3.1" zip-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-4.1.0.tgz#51dd326571544e36aa3f756430b313576dc8fc79" - integrity sha512-zshzwQW7gG7hjpBlgeQP9RuyPGNxvJdzR8SUM3QhxCnLjWN2E7j3dOvpeDcQoETfHx0urRS7EtmVToql7YpU4A== + version "4.1.1" + resolved "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz" + integrity sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ== dependencies: - archiver-utils "^2.1.0" - compress-commons "^4.1.0" + archiver-utils "^3.0.4" + compress-commons "^4.1.2" readable-stream "^3.6.0" diff --git a/src/main/java/net/silentclient/client/Client.java b/src/main/java/net/silentclient/client/Client.java index 1b39d41..4d64db0 100644 --- a/src/main/java/net/silentclient/client/Client.java +++ b/src/main/java/net/silentclient/client/Client.java @@ -8,10 +8,12 @@ import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.multiplayer.ServerData; import net.minecraft.client.multiplayer.ServerList; import net.minecraft.client.resources.data.IMetadataSerializer; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; import net.minecraft.util.Session; import net.silentclient.client.config.ConfigManager; import net.silentclient.client.cosmetics.Cosmetics; +import net.silentclient.client.emotes.EmotesMod; import net.silentclient.client.event.EventManager; import net.silentclient.client.event.EventTarget; import net.silentclient.client.event.impl.*; @@ -63,7 +65,7 @@ import java.util.List; public class Client { public static final Logger logger = LogManager.getLogger("SC"); - private final String version = "2.1.0"; + private final String version = "2.2.0"; private static final Client INSTANCE = new Client(); public static final Client getInstance() { @@ -589,6 +591,18 @@ public class Client { Server.setRuHypixel(Server.checkIsRuHypixel()); } + @EventTarget + public void onClick(KeyEvent event) { + EmotesMod.onClick(event); + } + + @EventTarget + public void onJoinToWorld(EntityJoinLevelEvent event) { + if(event.getEntity() instanceof EntityPlayer) { + WorldListener.onPlayerJoin((EntityPlayer) event.getEntity()); + } + } + // Instances public String getApiUrl() { return "http://localhost:" + getUserData().server_port; diff --git a/src/main/java/net/silentclient/client/emotes/EmoteManager.java b/src/main/java/net/silentclient/client/emotes/EmoteManager.java index 50234ad..40879af 100644 --- a/src/main/java/net/silentclient/client/emotes/EmoteManager.java +++ b/src/main/java/net/silentclient/client/emotes/EmoteManager.java @@ -2,9 +2,8 @@ package net.silentclient.client.emotes; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; -import net.silentclient.client.Client; import net.silentclient.client.emotes.emoticons.Emote; +import net.silentclient.client.utils.WorldListener; public class EmoteManager { public static void sendEmote(String name, int i) { @@ -14,23 +13,19 @@ public class EmoteManager { public static void play(String name, int i) { if (Minecraft.getMinecraft().theWorld != null) { String s = PlayerModelManager.get().map.get(i); - EntityPlayer entityPlayer = EmoteManager.getPlayerEntityByName(Minecraft.getMinecraft().theWorld, name); + EntityPlayer entityPlayer = EmoteManager.getPlayerEntityByName(name); if (entityPlayer != null && s != null) { Emote emote = PlayerModelManager.get().registry.get(s); if (EmoteControllerManager.controllers.get(entityPlayer.getName()) != null) { EmoteControllerManager.controllers.get(entityPlayer.getName()).setEmote(entityPlayer, emote); - } else { - Client.logger.info("emote player controller is null"); } - } else { - Client.logger.info("entity player or emote is null"); } } } public static void stop(String name) { if (Minecraft.getMinecraft().theWorld != null) { - EntityPlayer entityPlayer = EmoteManager.getPlayerEntityByName(Minecraft.getMinecraft().theWorld, name); + EntityPlayer entityPlayer = EmoteManager.getPlayerEntityByName(name); if (entityPlayer != null) { if (EmoteControllerManager.controllers.get(entityPlayer.getName()) != null) { EmoteControllerManager.controllers.get(entityPlayer.getName()).resetEmote(); @@ -39,20 +34,8 @@ public class EmoteManager { } } - public static EntityPlayer getPlayerEntityByName(World world, String name) + public static EntityPlayer getPlayerEntityByName(String name) { - for (int i = 0; i < world.playerEntities.size(); ++i) - { - EntityPlayer entityplayer = (EntityPlayer)world.playerEntities.get(i); - - Client.logger.info(entityplayer.getName()); - - if (name.equalsIgnoreCase(entityplayer.getName())) - { - return entityplayer; - } - } - - return null; + return WorldListener.players.get(name.toLowerCase()); } } diff --git a/src/main/java/net/silentclient/client/emotes/EmotesMod.java b/src/main/java/net/silentclient/client/emotes/EmotesMod.java index 1fec7d6..788ab58 100644 --- a/src/main/java/net/silentclient/client/emotes/EmotesMod.java +++ b/src/main/java/net/silentclient/client/emotes/EmotesMod.java @@ -1,7 +1,12 @@ package net.silentclient.client.emotes; +import net.minecraft.client.Minecraft; import net.silentclient.client.Client; +import net.silentclient.client.emotes.config.EmotesConfig; +import net.silentclient.client.emotes.config.EmotesConfigType; import net.silentclient.client.emotes.socket.EmoteSocket; +import net.silentclient.client.event.EventManager; +import net.silentclient.client.event.impl.KeyEvent; import net.silentclient.client.mods.Mod; import net.silentclient.client.mods.ModCategory; import net.silentclient.client.mods.Setting; @@ -10,6 +15,8 @@ import org.lwjgl.input.Keyboard; import java.util.ArrayList; public class EmotesMod extends Mod { + public static boolean sending = false; + public EmotesMod() { super("Emotes", ModCategory.SETTINGS, "silentclient/emotes/icons/default.png"); } @@ -26,6 +33,12 @@ public class EmotesMod extends Mod { perspectives.add("Third Person"); this.addModeSetting("Default Emote Perspective", this, "Second Person", perspectives); + + try { + EmotesConfig.init(); + } catch (Exception err) { + Client.logger.catching(err); + } } @Override @@ -38,14 +51,39 @@ public class EmotesMod extends Mod { } } + public static void onClick(KeyEvent event) { + if(!Client.getInstance().getSettingsManager().getSettingByClass(EmotesMod.class, "Emotes").getValBoolean()) { + return; + } + if(Minecraft.getMinecraft().thePlayer != null && Minecraft.getMinecraft().theWorld != null && Minecraft.getMinecraft().currentScreen == null && !sending) { + EmotesConfigType.Bind bind = EmotesConfig.getBinds().get(event.getKey()); + if(bind != null) { + EmotesMod.sending = true; + (new Thread("EMOTES BIND:" + bind.emoteId) { + public void run() { + EmoteSocket.get().startEmote(bind.emoteId); + try { + Thread.sleep(2000L); + } catch (InterruptedException e) { + Client.logger.catching(e); + } + EmotesMod.sending = false; + } + }).start(); + } + } + } + @Override public void onChangeSettingValue(Setting setting) { super.onChangeSettingValue(setting); if(setting.getName().equals("Emotes")) { if(setting.getValBoolean()) { EmoteSocket.get().connect(); + EventManager.register(this); } else { EmoteSocket.get().disconnect(); + EventManager.unregister(this); } } } diff --git a/src/main/java/net/silentclient/client/emotes/config/EmotesConfig.java b/src/main/java/net/silentclient/client/emotes/config/EmotesConfig.java new file mode 100644 index 0000000..9662468 --- /dev/null +++ b/src/main/java/net/silentclient/client/emotes/config/EmotesConfig.java @@ -0,0 +1,68 @@ +package net.silentclient.client.emotes.config; + +import net.minecraft.client.Minecraft; +import net.silentclient.client.Client; + +import java.io.*; +import java.nio.file.Files; +import java.util.HashMap; + +public class EmotesConfig { + public static File configFile; + public static EmotesConfigType config; + public static HashMap binds; + + public static void init() throws IOException { + configFile = new File(Minecraft.getMinecraft().mcDataDir, "slc-emotes.json"); + if(!configFile.exists()) { + configFile.createNewFile(); + config = EmotesConfigType.getDefault(); + save(); + } else { + try { + InputStream in = Files.newInputStream(configFile.toPath()); + BufferedReader reader = new BufferedReader(new InputStreamReader(in)); + StringBuilder content = new StringBuilder(); + String inputLine; + while ((inputLine = reader.readLine()) != null) { + content.append(inputLine); + } + config = Client.getInstance().getGson().fromJson(content.toString(), EmotesConfigType.class); + in.close(); + } catch (Exception err) { + Client.logger.catching(err); + config = EmotesConfigType.getDefault(); + save(); + } + } + updateHashMap(); + } + + public static void save() { + try { + FileOutputStream outputStream = new FileOutputStream(configFile); + byte[] strToBytes = Client.getInstance().getGson().toJson(config).toString().getBytes(); + outputStream.write(strToBytes); + + outputStream.close(); + } catch (Exception err) { + Client.logger.catching(err); + } + } + + public static void updateHashMap() { + HashMap map = new HashMap<>(); + for (EmotesConfigType.Bind bind : config.getBinds()) { + map.put(bind.keyId, bind); + } + binds = map; + } + + public static HashMap getBinds() { + return binds; + } + + public static EmotesConfigType getConfig() { + return config; + } +} diff --git a/src/main/java/net/silentclient/client/emotes/config/EmotesConfigType.java b/src/main/java/net/silentclient/client/emotes/config/EmotesConfigType.java new file mode 100644 index 0000000..461a469 --- /dev/null +++ b/src/main/java/net/silentclient/client/emotes/config/EmotesConfigType.java @@ -0,0 +1,59 @@ +package net.silentclient.client.emotes.config; + +import java.util.ArrayList; + +public class EmotesConfigType { + public ArrayList binds; + + public ArrayList getBinds() { + return binds; + } + + public void addBind(int emoteId, int keyId) { + int removeIndex = findBindByEmoteId(emoteId); + if(removeIndex >= 0) { + binds.remove(removeIndex); + } + if(keyId == -1) { + removeBind(emoteId); + return; + } + EmotesConfigType.Bind bind = new Bind(); + bind.emoteId = emoteId; + bind.keyId = keyId; + + binds.add(bind); + EmotesConfig.updateHashMap(); + } + + public void removeBind(int emoteId) { + int removeIndex = findBindByEmoteId(emoteId); + if(removeIndex >= 0) { + binds.remove(removeIndex); + } + EmotesConfig.updateHashMap(); + } + + public int findBindByEmoteId(int emoteId) { + int index = -1; + for (Bind bind : binds) { + index++; + if (bind.emoteId == emoteId) { + return index; + } + } + return -1; // Если элемент не найден + } + + public class Bind { + public int emoteId; + public int keyId; + } + + public static EmotesConfigType getDefault() { + EmotesConfigType config = new EmotesConfigType(); + config.binds = new ArrayList<>(); + + return config; + } +} diff --git a/src/main/java/net/silentclient/client/emotes/ui/EmoteMenuGui.java b/src/main/java/net/silentclient/client/emotes/ui/EmoteMenuGui.java index 8b0be34..c3d7f3c 100644 --- a/src/main/java/net/silentclient/client/emotes/ui/EmoteMenuGui.java +++ b/src/main/java/net/silentclient/client/emotes/ui/EmoteMenuGui.java @@ -6,13 +6,17 @@ import net.minecraft.client.gui.ScaledResolution; import net.minecraft.util.ResourceLocation; import net.silentclient.client.Client; import net.silentclient.client.emotes.PlayerModelManager; +import net.silentclient.client.emotes.config.EmotesConfig; +import net.silentclient.client.emotes.config.EmotesConfigType; import net.silentclient.client.emotes.emoticons.Emote; import net.silentclient.client.emotes.socket.EmoteSocket; import net.silentclient.client.gui.SilentScreen; import net.silentclient.client.gui.elements.IconButton; +import net.silentclient.client.gui.elements.Input; import net.silentclient.client.gui.font.SilentFontRenderer; import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils; import net.silentclient.client.gui.theme.Theme; +import net.silentclient.client.gui.theme.input.DefaultInputTheme; import net.silentclient.client.gui.util.RenderUtil; import net.silentclient.client.utils.MenuBlurUtils; import net.silentclient.client.utils.MouseCursorHandler; @@ -24,6 +28,7 @@ import org.lwjgl.opengl.GL11; import java.awt.*; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; public class EmoteMenuGui extends SilentScreen { private ScrollHelper scrollHelper = new ScrollHelper(); @@ -31,6 +36,8 @@ public class EmoteMenuGui extends SilentScreen { @Override public void initGui() { super.initGui(); + this.buttonList.clear(); + this.silentInputs.clear(); defaultCursor = false; MenuBlurUtils.loadBlur(); int width = 255; @@ -38,6 +45,25 @@ public class EmoteMenuGui extends SilentScreen { int x = this.width / 2 - (width / 2); int y = this.height / 2 - (height / 2); this.buttonList.add(new IconButton(0, x + width - 14 - 3, y + 3, 14, 14, 8, 8, new ResourceLocation("silentclient/icons/exit.png"))); + + HashMap emoteBinds = new HashMap<>(); + + for(EmotesConfigType.Bind bind : EmotesConfig.getConfig().getBinds()) { + emoteBinds.put(bind.emoteId, bind); + } + + for(PlayerResponse.Account.Cosmetics.CosmeticItem emote : Client.getInstance().getCosmetics().getMyEmotes()) { + String emoteName = PlayerModelManager.get().map.get(emote.id); + if(emoteName == null) { + continue; + } + Emote emoteInstance = PlayerModelManager.get().getEmote(emoteName); + if(emoteInstance == null) { + continue; + } + EmotesConfigType.Bind bind = emoteBinds.get(emote.id); + this.silentInputs.add(new Input(emote.name, bind != null ? bind.keyId : -1)); + } } @Override @@ -67,6 +93,7 @@ public class EmoteMenuGui extends SilentScreen { int emoteX = x + 3; float emoteY = y + 20 + scrollY; int emoteIndex = 0; + int realEmoteIndex = 0; for(PlayerResponse.Account.Cosmetics.CosmeticItem emote : Client.getInstance().getCosmetics().getMyEmotes()) { String emoteName = PlayerModelManager.get().map.get(emote.id); if(emoteName == null) { @@ -77,7 +104,11 @@ public class EmoteMenuGui extends SilentScreen { continue; } - boolean isHovered = MouseUtils.isInside(mouseX, mouseY, emoteX, emoteY, 80, 80) && !MouseUtils.isInside(mouseX, mouseY, emoteX + 80 - 3 - 10, emoteY + 3, 10, 10); + Input input = this.silentInputs.get(realEmoteIndex); + + input.render(mouseX, mouseY, emoteX + 3, emoteY + 80 - 3 - 15, 74, true, new DefaultInputTheme(), true); + + boolean isHovered = MouseUtils.isInside(mouseX, mouseY, emoteX, emoteY, 80, 80) && !MouseUtils.isInside(mouseX, mouseY, emoteX + 80 - 3 - 10, emoteY + 3, 10, 10) && !input.isHovered(); if(isHovered) { cursorType = MouseCursorHandler.CursorType.POINTER; RenderUtil.drawRoundedRect(emoteX, emoteY, 80, 80, 3, new Color(255, 255, 255, 30).getRGB()); @@ -97,9 +128,10 @@ public class EmoteMenuGui extends SilentScreen { RenderUtil.drawImage(new ResourceLocation(favorite ? "silentclient/icons/star.png" : "silentclient/icons/star_outline.png"), emoteX + 80 - 3 - 10, emoteY + 3, 10, 10); - RenderUtil.drawImage(emoteInstance.icon.icon, emoteX + 3 + 37 - 28 , emoteY + 16, 56, 56); + RenderUtil.drawImage(emoteInstance.icon.icon, emoteX + 3 + 37 - 19, emoteY + 16, 39, 39); emoteIndex += 1; + realEmoteIndex++; if(emoteIndex == 3) { emoteIndex = 0; emoteX = x + 3; @@ -132,6 +164,7 @@ public class EmoteMenuGui extends SilentScreen { int emoteX = x + 3; float emoteY = (int) (y + 20 + scrollHelper.getScroll()); int emoteIndex = 0; + int realEmoteIndex = 0; for(PlayerResponse.Account.Cosmetics.CosmeticItem emote : Client.getInstance().getCosmetics().getMyEmotes()) { String emoteName = PlayerModelManager.get().map.get(emote.id); if(emoteName == null) { @@ -141,8 +174,9 @@ public class EmoteMenuGui extends SilentScreen { if(emoteInstance == null) { continue; } - boolean isHovered = MouseUtils.isInside(mouseX, mouseY, emoteX, emoteY, 80, 80) && !MouseUtils.isInside(mouseX, mouseY, emoteX + 80 - 3 - 10, emoteY + 3, 10, 10); - + Input input = this.silentInputs.get(realEmoteIndex); + input.onClick(mouseX, mouseY, emoteX + 3, (int) (emoteY + 80 - 3 - 15), 74, true); + boolean isHovered = MouseUtils.isInside(mouseX, mouseY, emoteX, emoteY, 80, 80) && !MouseUtils.isInside(mouseX, mouseY, emoteX + 80 - 3 - 10, emoteY + 3, 10, 10) && !input.isHovered(); if(isHovered) { EmoteSocket.get().startEmote(emote.getId()); mc.displayGuiScreen(null); @@ -155,6 +189,7 @@ public class EmoteMenuGui extends SilentScreen { } emoteIndex += 1; + realEmoteIndex++; if(emoteIndex == 3) { emoteIndex = 0; emoteX = x + 3; @@ -175,9 +210,33 @@ public class EmoteMenuGui extends SilentScreen { @Override protected void keyTyped(char typedChar, int keyCode) throws IOException { - if (keyCode == Keyboard.KEY_ESCAPE) { - mc.displayGuiScreen(null); + int inputIndex = 0; + boolean neededKeyCheck = true; + + for(PlayerResponse.Account.Cosmetics.CosmeticItem emote : Client.getInstance().getCosmetics().getMyEmotes()) { + String emoteName = PlayerModelManager.get().map.get(emote.id); + if(emoteName == null) { + continue; + } + Emote emoteInstance = PlayerModelManager.get().getEmote(emoteName); + if(emoteInstance == null) { + continue; + } + if(silentInputs.get(inputIndex).isFocused()) { + this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode); + EmotesConfig.getConfig().addBind(emote.id, this.silentInputs.get(inputIndex).getKey()); + EmotesConfig.save(); + if(keyCode == Keyboard.KEY_ESCAPE) { + neededKeyCheck = false; + break; + } + } + inputIndex++; } + + if (neededKeyCheck && keyCode == Keyboard.KEY_ESCAPE) { + mc.displayGuiScreen(null); + }; } @Override diff --git a/src/main/java/net/silentclient/client/gui/elements/HSBPicker.java b/src/main/java/net/silentclient/client/gui/elements/HSBPicker.java index 1f97690..f8eb721 100644 --- a/src/main/java/net/silentclient/client/gui/elements/HSBPicker.java +++ b/src/main/java/net/silentclient/client/gui/elements/HSBPicker.java @@ -51,6 +51,16 @@ public class HSBPicker extends Gui { this.alphaSliderHeight = pickerHeight; } + public void setPickerX(int pickerX) { + this.pickerX = pickerX; + this.hueSliderX = pickerX; + } + + public void setPickerY(int pickerY) { + this.pickerY = pickerY; + this.hueSliderY = pickerY + pickerHeight + 6; + } + public void render(int mouseX, int mouseY) { if (this.rainbowState) { double rainbowState = Math.ceil((System.currentTimeMillis() + 200) / 20.0); diff --git a/src/main/java/net/silentclient/client/gui/elements/Input.java b/src/main/java/net/silentclient/client/gui/elements/Input.java index 71fc4b2..e7b49b9 100644 --- a/src/main/java/net/silentclient/client/gui/elements/Input.java +++ b/src/main/java/net/silentclient/client/gui/elements/Input.java @@ -71,7 +71,7 @@ public class Input { public void render(int mouseX, int mouseY, float x, float y, int width, boolean small, IInputTheme theme, boolean center) { int borderColor = theme.getBorderColor().getRGB(); - if(MouseUtils.isInside(mouseX, mouseY, x, y, width, 20)) { + if(MouseUtils.isInside(mouseX, mouseY, x, y, width, small ? 15 : 20)) { borderColor = theme.getHoveredBorderColor().getRGB(); this.hovered = true; } else { diff --git a/src/main/java/net/silentclient/client/gui/lite/clickgui/GuiColorPicker.java b/src/main/java/net/silentclient/client/gui/lite/clickgui/GuiColorPicker.java index df021be..cf5a087 100644 --- a/src/main/java/net/silentclient/client/gui/lite/clickgui/GuiColorPicker.java +++ b/src/main/java/net/silentclient/client/gui/lite/clickgui/GuiColorPicker.java @@ -15,17 +15,21 @@ import net.silentclient.client.gui.elements.Slider; import net.silentclient.client.gui.font.SilentFontRenderer; import net.silentclient.client.gui.hud.HUDConfigScreen; import net.silentclient.client.gui.lite.clickgui.utils.GlUtils; +import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils; import net.silentclient.client.gui.theme.Theme; import net.silentclient.client.gui.util.ColorPickerAction; import net.silentclient.client.gui.util.RenderUtil; +import net.silentclient.client.utils.ColorUtils; import net.silentclient.client.utils.MenuBlurUtils; import net.silentclient.client.utils.MouseCursorHandler; import net.silentclient.client.utils.Sounds; +import net.silentclient.client.utils.types.GlobalSettings; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.GL11; import java.awt.*; import java.io.IOException; +import java.util.ArrayList; public class GuiColorPicker extends SilentScreen { private final GuiScreen parentScreen; @@ -36,6 +40,8 @@ public class GuiColorPicker extends SilentScreen { private final boolean allowChangeOpacity; private int opacity; private ColorPickerAction action; + private ArrayList colors; + private boolean customClose = false; public GuiColorPicker(Color defaultColor, boolean chroma, boolean allowChangeOpacity, int opacity, ColorPickerAction action, GuiScreen parentScreen) { this.parentScreen = parentScreen; @@ -62,11 +68,18 @@ public class GuiColorPicker extends SilentScreen { float[] vals = Color.RGBtoHSB(defaultColor.getRed(), defaultColor.getGreen(), defaultColor.getBlue(), null); hsb.color = new float[] {vals[0],vals[1],vals[2], defaultColor.getAlpha() / 255.0f}; hsb.init(); + colors = Client.getInstance().getGlobalSettings().getLatestColors(); } @Override public void onGuiClosed() { - action.onClose(hsb.getSelectedColorFinal(), chroma, opacity); + if(!customClose) { + action.onClose(hsb.getSelectedColorFinal(), chroma, opacity); + if(!chroma) { + Client.getInstance().getGlobalSettings().addToLatestColors(new Color(hsb.getSelectedColorFinal().getRed(), hsb.getSelectedColorFinal().getGreen(), hsb.getSelectedColorFinal().getBlue(), opacity)); + Client.getInstance().getGlobalSettings().save(); + } + } MenuBlurUtils.unloadBlur(); super.onGuiClosed(); } @@ -87,7 +100,7 @@ public class GuiColorPicker extends SilentScreen { GlStateManager.pushMatrix(); GlUtils.startScale((float) ((x) + (x) + width) / 2, (float) ((y) + (y + height)) / 2, (float) ClickGUI.introAnimation.getValue()); RenderUtil.drawRoundedRect(x, y, width, height, 10, Theme.backgroundColor().getRGB()); - + GL11.glPushMatrix(); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); @@ -114,6 +127,25 @@ public class GuiColorPicker extends SilentScreen { double newVal = 0 + mouse * diff; opacity = (int) newVal; } + settingY += 15; + } + int colorX = x + 100; + int colorIndex = 0; + + for(GlobalSettings.CustomColor color : colors) { + ColorUtils.resetColor(); + RenderUtil.drawRoundedRect(colorX, settingY, 20, 20, 3, color.getRGB(!allowChangeOpacity)); + RenderUtil.drawRoundedOutline(colorX, settingY, 20, 20, 3, 2, new Color(0, 0, 0).getRGB()); + if(MouseUtils.isInside(mouseX, mouseY, colorX, settingY, 20, 20)) { + cursorType = MouseCursorHandler.CursorType.POINTER; + } + colorX += 25; + colorIndex += 1; + if(colorIndex == 7) { + colorIndex = 0; + colorX = x + 100; + settingY += 25; + } } GL11.glPopMatrix(); @@ -167,6 +199,31 @@ public class GuiColorPicker extends SilentScreen { Sounds.playButtonSound(); chroma = !chroma; } + + settingY += 15 + 90; + if(allowChangeOpacity) { + settingY += 15; + } + int colorX = x + 100; + int colorIndex = 0; + + for(GlobalSettings.CustomColor customColor : colors) { + if(MouseUtils.isInside(mouseX, mouseY, colorX, settingY, 20, 20)) { + Color color = customColor.getColor(!allowChangeOpacity); + action.onChange(color, false, color.getAlpha()); + customClose = true; + action.onClose(color, false, color.getAlpha()); + mc.displayGuiScreen(parentScreen); + break; + } + colorX += 25; + colorIndex += 1; + if(colorIndex == 7) { + colorIndex = 0; + colorX = x + 100; + settingY += 25; + } + } } @Override diff --git a/src/main/java/net/silentclient/client/gui/lite/clickgui/ModSettings.java b/src/main/java/net/silentclient/client/gui/lite/clickgui/ModSettings.java index 7916c9d..3533066 100644 --- a/src/main/java/net/silentclient/client/gui/lite/clickgui/ModSettings.java +++ b/src/main/java/net/silentclient/client/gui/lite/clickgui/ModSettings.java @@ -452,11 +452,13 @@ public class ModSettings extends SilentScreen { } this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode); setting.setValString(this.silentInputs.get(inputIndex).getValue()); + mod.onChangeSettingValue(setting); inputIndex++; } if (setting.isKeybind() && !setting.getName().startsWith("Quickplay Mode")) { this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode); setting.setKeybind(this.silentInputs.get(inputIndex).getKey()); + mod.onChangeSettingValue(setting); inputIndex++; } } diff --git a/src/main/java/net/silentclient/client/gui/modmenu/ColorPicker.java b/src/main/java/net/silentclient/client/gui/modmenu/ColorPicker.java index 648f6a3..5d9a130 100644 --- a/src/main/java/net/silentclient/client/gui/modmenu/ColorPicker.java +++ b/src/main/java/net/silentclient/client/gui/modmenu/ColorPicker.java @@ -9,12 +9,18 @@ import net.silentclient.client.gui.SilentScreen; import net.silentclient.client.gui.elements.Button; import net.silentclient.client.gui.elements.Checkbox; import net.silentclient.client.gui.elements.HSBPicker; +import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils; import net.silentclient.client.gui.util.ColorPickerAction; +import net.silentclient.client.gui.util.RenderUtil; +import net.silentclient.client.utils.ColorUtils; import net.silentclient.client.utils.MenuBlurUtils; import net.silentclient.client.utils.MouseCursorHandler; +import net.silentclient.client.utils.ScrollHelper; +import net.silentclient.client.utils.types.GlobalSettings; import java.awt.*; import java.io.IOException; +import java.util.ArrayList; public class ColorPicker extends SilentScreen { private final GuiScreen parentScreen; @@ -25,6 +31,9 @@ public class ColorPicker extends SilentScreen { private final boolean allowChangeOpacity; private int opacity; private ColorPickerAction action; + private ArrayList colors; + private ScrollHelper scrollHelper = new ScrollHelper(); + private boolean customClose = false; public ColorPicker(Color defaultColor, boolean chroma, boolean allowChangeOpacity, int opacity, ColorPickerAction action, GuiScreen parentScreen) { this.parentScreen = parentScreen; @@ -51,6 +60,7 @@ public class ColorPicker extends SilentScreen { ModMenu.initBaseButtons(this.buttonList); this.buttonList.add(new Button(1, 3, 26, 144, 15, "Back")); + colors = Client.getInstance().getGlobalSettings().getLatestColors(); } @Override @@ -62,9 +72,15 @@ public class ColorPicker extends SilentScreen { super.drawScreen(mouseX, mouseY, partialTicks); - ModMenu.trimContentStart(width, height); + ModMenu.trimContentStart(width, height, true); + scrollHelper.setStep(5); + scrollHelper.setElementsHeight(100 + (allowChangeOpacity ? 30 : 0) + (float) Math.ceil((colors.size() + 5) / 5) * 30); + scrollHelper.setMaxScroll(height - 20); + scrollHelper.setSpeed(200); + scrollHelper.setFlag(true); + float scrollY = scrollHelper.getScroll(); - float colorY = 66; + float colorY = 66 + scrollY; Checkbox.render(mouseX, mouseY, 3, colorY, "Chroma", chroma); if(Checkbox.isHovered(mouseX, mouseY, 3, colorY)) { cursorType = MouseCursorHandler.CursorType.POINTER; @@ -76,6 +92,8 @@ public class ColorPicker extends SilentScreen { colorY += 100; + hsb.setPickerY((int) (80 + scrollY)); + if(allowChangeOpacity) { GlStateManager.color(1, 1, 1, 1); RegularSlider.render(3, colorY, 144, "Opacity", 255, opacity); @@ -85,6 +103,25 @@ public class ColorPicker extends SilentScreen { double newVal = 0 + mouse * diff; opacity = (int) newVal; } + colorY += 30; + } + int colorX = 3; + int colorIndex = 0; + + for(GlobalSettings.CustomColor color : colors) { + ColorUtils.resetColor(); + RenderUtil.drawRoundedRect(colorX, colorY, 20, 20, 3, color.getRGB(!allowChangeOpacity)); + RenderUtil.drawRoundedOutline(colorX, colorY, 20, 20, 3, 2, new Color(0, 0, 0).getRGB()); + if(MouseUtils.isInside(mouseX, mouseY, colorX, colorY, 20, 20)) { + cursorType = MouseCursorHandler.CursorType.POINTER; + } + colorX += 25; + colorIndex += 1; + if(colorIndex == 5) { + colorIndex = 0; + colorX = 3; + colorY += 25; + } } Client.getInstance().getMouseCursorHandler().enableCursor(cursorType); @@ -110,6 +147,30 @@ public class ColorPicker extends SilentScreen { chroma = !chroma; } + colorY += 100; + if(allowChangeOpacity) { + colorY += 30; + } + int colorX = 3; + int colorIndex = 0; + for(GlobalSettings.CustomColor customColor : colors) { + if(MouseUtils.isInside(mouseX, mouseY, colorX, colorY, 20, 20)) { + Color color = customColor.getColor(!allowChangeOpacity); + action.onChange(color, false, color.getAlpha()); + customClose = true; + action.onClose(color, false, color.getAlpha()); + mc.displayGuiScreen(parentScreen); + break; + } + colorX += 25; + colorIndex += 1; + if(colorIndex == 5) { + colorIndex = 0; + colorX = 3; + colorY += 25; + } + } + hsb.mouseClicked(mouseX, mouseY, mouseButton); } @@ -122,7 +183,13 @@ public class ColorPicker extends SilentScreen { @Override public void onGuiClosed() { super.onGuiClosed(); - action.onClose(hsb.getSelectedColorFinal(), chroma, opacity); + if(!customClose) { + action.onClose(hsb.getSelectedColorFinal(), chroma, opacity); + if(!chroma) { + Client.getInstance().getGlobalSettings().addToLatestColors(new Color(hsb.getSelectedColorFinal().getRed(), hsb.getSelectedColorFinal().getGreen(), hsb.getSelectedColorFinal().getBlue(), opacity)); + Client.getInstance().getGlobalSettings().save(); + } + } MenuBlurUtils.unloadBlur(); Client.getInstance().configManager.save(); } diff --git a/src/main/java/net/silentclient/client/gui/modmenu/ModMenu.java b/src/main/java/net/silentclient/client/gui/modmenu/ModMenu.java index 4323a06..f694951 100644 --- a/src/main/java/net/silentclient/client/gui/modmenu/ModMenu.java +++ b/src/main/java/net/silentclient/client/gui/modmenu/ModMenu.java @@ -263,11 +263,15 @@ public class ModMenu extends SilentScreen { } public static void trimContentStart(int width, int height) { + trimContentStart(width, height, false); + } + + public static void trimContentStart(int width, int height, boolean withoutFooter) { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_SCISSOR_TEST); ScaledResolution r = new ScaledResolution(Minecraft.getMinecraft()); int s = r.getScaleFactor(); - int listHeight = height - 66 - 21; + int listHeight = height - 66 - (withoutFooter ? 0 : 21); int translatedY = r.getScaledHeight() - 66 - listHeight; GL11.glScissor(0 * s, translatedY * s, width * s, listHeight * s); } diff --git a/src/main/java/net/silentclient/client/gui/modmenu/ModSettings.java b/src/main/java/net/silentclient/client/gui/modmenu/ModSettings.java index 990506f..27a1845 100644 --- a/src/main/java/net/silentclient/client/gui/modmenu/ModSettings.java +++ b/src/main/java/net/silentclient/client/gui/modmenu/ModSettings.java @@ -370,12 +370,14 @@ public class ModSettings extends SilentScreen { } this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode); setting.setValString(this.silentInputs.get(inputIndex).getValue()); + mod.onChangeSettingValue(setting); inputIndex++; } if (setting.isKeybind() && !setting.getName().startsWith("Quickplay Mode")) { this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode); setting.setKeybind(this.silentInputs.get(inputIndex).getKey()); + mod.onChangeSettingValue(setting); inputIndex++; } } diff --git a/src/main/java/net/silentclient/client/gui/quickplay/QuickplayModeGui.java b/src/main/java/net/silentclient/client/gui/quickplay/QuickplayModeGui.java index 938fd12..e403f85 100644 --- a/src/main/java/net/silentclient/client/gui/quickplay/QuickplayModeGui.java +++ b/src/main/java/net/silentclient/client/gui/quickplay/QuickplayModeGui.java @@ -14,6 +14,7 @@ import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils; import net.silentclient.client.gui.theme.Theme; import net.silentclient.client.gui.theme.input.DefaultInputTheme; import net.silentclient.client.gui.util.RenderUtil; +import net.silentclient.client.mods.Setting; import net.silentclient.client.mods.hypixel.QuickPlayMod; import net.silentclient.client.mods.util.Server; import net.silentclient.client.utils.MenuBlurUtils; @@ -180,7 +181,9 @@ public class QuickplayModeGui extends SilentScreen { for(QuickPlayMod.QuickplayCommandType quickplayMode : quickplayMode.modes) { if(silentInputs.get(inputIndex).isFocused()) { this.silentInputs.get(inputIndex).onKeyTyped(typedChar, keyCode); - Client.getInstance().getSettingsManager().getSettingByClass(QuickPlayMod.class, String.format("Quickplay Mode&%s&%s", Server.isRuHypixel() ? "RuHypixel" : "Hypixel", quickplayMode.command)).setKeybind(this.silentInputs.get(inputIndex).getKey()); + Setting setting = Client.getInstance().getSettingsManager().getSettingByClass(QuickPlayMod.class, String.format("Quickplay Mode&%s&%s", Server.isRuHypixel() ? "RuHypixel" : "Hypixel", quickplayMode.command)); + setting.setKeybind(this.silentInputs.get(inputIndex).getKey()); + Client.getInstance().getModInstances().getModByClass(QuickPlayMod.class).onChangeSettingValue(setting); if(keyCode == Keyboard.KEY_ESCAPE) { neededKeyCheck = false; break; diff --git a/src/main/java/net/silentclient/client/mixin/mixins/NetHandlerPlayClientMixin.java b/src/main/java/net/silentclient/client/mixin/mixins/NetHandlerPlayClientMixin.java index 34a4e49..3bee7e3 100644 --- a/src/main/java/net/silentclient/client/mixin/mixins/NetHandlerPlayClientMixin.java +++ b/src/main/java/net/silentclient/client/mixin/mixins/NetHandlerPlayClientMixin.java @@ -13,6 +13,7 @@ import net.minecraft.util.IChatComponent; import net.silentclient.client.event.impl.EntityDamageEvent; import net.silentclient.client.hooks.NetHandlerPlayClientHook; import net.silentclient.client.utils.Players; +import net.silentclient.client.utils.WorldListener; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.*; @@ -60,6 +61,7 @@ public abstract class NetHandlerPlayClientMixin { @Inject(method = "handleJoinGame", at = @At(value = "RETURN")) public void resetPlayers(S01PacketJoinGame packetIn, CallbackInfo ci) { Players.reload(); + WorldListener.onWorldSwitch(); } //#if MC==10809 diff --git a/src/main/java/net/silentclient/client/mixin/mixins/WorldMixin.java b/src/main/java/net/silentclient/client/mixin/mixins/WorldMixin.java index 5136b12..bfd1dca 100644 --- a/src/main/java/net/silentclient/client/mixin/mixins/WorldMixin.java +++ b/src/main/java/net/silentclient/client/mixin/mixins/WorldMixin.java @@ -6,19 +6,18 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityTNTPrimed; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; -import net.minecraft.world.WorldProvider; import net.silentclient.client.Client; import net.silentclient.client.event.impl.EntityJoinLevelEvent; +import net.silentclient.client.utils.WorldListener; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyVariable; -import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; @@ -58,6 +57,13 @@ public class WorldMixin { } } + @Inject(method = {"removeEntity", "removePlayerEntityDangerously"}, at = @At("HEAD"), cancellable = true) + public void removeEntityFromWorldListener(Entity entityIn, CallbackInfo ci) { + if(entityIn instanceof EntityPlayer) { + WorldListener.onPlayerLeave((EntityPlayer) entityIn); + } + } + @Inject(method = "joinEntityInSurroundings", at = @At("HEAD"), cancellable = true) public void callEntityJoinLevelEvent2(Entity entityIn, CallbackInfo ci) { EntityJoinLevelEvent event = new EntityJoinLevelEvent(entityIn); diff --git a/src/main/java/net/silentclient/client/mods/hypixel/QuickPlayMod.java b/src/main/java/net/silentclient/client/mods/hypixel/QuickPlayMod.java index 60515bd..fe62f56 100644 --- a/src/main/java/net/silentclient/client/mods/hypixel/QuickPlayMod.java +++ b/src/main/java/net/silentclient/client/mods/hypixel/QuickPlayMod.java @@ -17,11 +17,13 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.lang.reflect.Type; import java.util.ArrayList; +import java.util.HashMap; public class QuickPlayMod extends Mod { public static ArrayList hypixelQuickplayModes; public static ArrayList ruhypixelQuickplayModes; public static boolean sending = false; + public static HashMap hashMap; public QuickPlayMod() { super("Quickplay", ModCategory.MODS, "silentclient/icons/mods/quickplay.png"); @@ -33,6 +35,7 @@ public class QuickPlayMod extends Mod { this.addKeybindSetting("Open Menu", this, Keyboard.KEY_MINUS); initHypixelModes(); initRuHypixelModes(); + updateHashMap(); } private void initHypixelModes() { @@ -46,14 +49,15 @@ public class QuickPlayMod extends Mod { content.append(inputLine); } - Type listType = new TypeToken>(){}.getType(); + Type listType = new TypeToken>() { + }.getType(); hypixelQuickplayModes = Client.getInstance().getGson().fromJson(content.toString(), listType); - for(QuickplayModeType mode : hypixelQuickplayModes) { + for (QuickplayModeType mode : hypixelQuickplayModes) { Client.logger.info(String.format("Initialising Hypixel Quickplay Mode (%s)", mode.name)); mode.modes.forEach((command) -> { Client.logger.info(String.format("Initialising Hypixel Quickplay Mode (%s) Command (%s)", mode.name, command.name)); - this.addKeybindSetting("Quickplay Mode&Hypixel&"+command.command, this, -1); + this.addKeybindSetting("Quickplay Mode&Hypixel&" + command.command, this, -1); }); } } catch (Exception err) { @@ -61,6 +65,23 @@ public class QuickPlayMod extends Mod { } } + public void updateHashMap() { + HashMap map = new HashMap<>(); + for(Setting setting : Client.getInstance().getSettingsManager().getSettingByMod(this)) { + if (setting.isKeybind()) { + map.put(setting.getKeybind(), setting); + } + } + + hashMap = map; + } + + @Override + public void onChangeSettingValue(Setting setting) { + super.onChangeSettingValue(setting); + updateHashMap(); + } + private void initRuHypixelModes() { try { Client.logger.info("Initialising RuHypixel Quickplay Modes"); @@ -108,27 +129,40 @@ public class QuickPlayMod extends Mod { @EventTarget public void onClick(KeyEvent event) { if(mc.thePlayer != null && mc.theWorld != null && mc.currentScreen == null) { - for(Setting setting : Client.getInstance().getSettingsManager().getSettingByMod(this)) { - if(setting.isKeybind()) { - if(setting.getName().equals("Open Menu")) { - // Open Menu - if(setting.isKeyDown() && (Server.isHypixel() || Server.isRuHypixel())) { - mc.displayGuiScreen(new QuickplayGui()); - } - } else { - if(sending) { - return; - } - String[] args = setting.getName().split("&"); - if(((args[1].equals("Hypixel") && Server.isHypixel()) || (args[1].equals("RuHypixel") && Server.isRuHypixel())) && setting.isKeyDown()) { - runCommand(args[2]); - } + Setting setting = hashMap.get(event.getKey()); + if(setting != null) { + if(setting.getName().equals("Open Menu")) { + // Open Menu + if(setting.isKeyDown() && (Server.isHypixel() || Server.isRuHypixel())) { + mc.displayGuiScreen(new QuickplayGui()); + } + } else { + if(sending) { + return; + } + String[] args = setting.getName().split("&"); + if(((args[1].equals("Hypixel") && Server.isHypixel()) || (args[1].equals("RuHypixel") && Server.isRuHypixel())) && setting.isKeyDown()) { + runCommand(args[2]); } } } } } + @Override + public void onEnable() { + super.onEnable(); + updateHashMap(); + } + + @Override + public void onDisable() { + super.onDisable(); + updateHashMap(); + } + + + public class QuickplayModeType { public String name; public String icon; diff --git a/src/main/java/net/silentclient/client/mods/player/AutoTextMod.java b/src/main/java/net/silentclient/client/mods/player/AutoTextMod.java index 98641ed..d567d6d 100644 --- a/src/main/java/net/silentclient/client/mods/player/AutoTextMod.java +++ b/src/main/java/net/silentclient/client/mods/player/AutoTextMod.java @@ -27,11 +27,13 @@ import org.lwjgl.input.Keyboard; import java.awt.*; import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.regex.Pattern; public class AutoTextMod extends Mod { public ArrayList commands = new ArrayList(); + public HashMap commandsMap = new HashMap<>(); public boolean sending = false; private int componentHeight = 0; @@ -182,33 +184,33 @@ public class AutoTextMod extends Mod { } this.commands = newCommands; + updateHashMap(); } @EventTarget public void onClick(KeyEvent event) { if(mc.thePlayer != null && mc.theWorld != null && mc.currentScreen == null && !sending && !isForceDisabled()) { - for(AutoTextCommand command : commands) { - if(command.getKey() == event.getKey()) { - Client.getInstance().getModInstances().getAutoText().sending = true; - (new Thread("ATC: " + command.getCommand()) { - public void run() { - mc.thePlayer.sendChatMessage(command.getCommand()); - try { - Thread.sleep(2000L); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - Client.getInstance().getModInstances().getAutoText().sending = false; - } - }).start(); - } + AutoTextCommand command = commandsMap.get(event.getKey()); + if(command != null) { + Client.getInstance().getModInstances().getAutoText().sending = true; + (new Thread("ATC: " + command.getCommand()) { + public void run() { + mc.thePlayer.sendChatMessage(command.getCommand()); + try { + Thread.sleep(2000L); + } catch (InterruptedException e) { + Client.logger.catching(e); + } + Client.getInstance().getModInstances().getAutoText().sending = false; + } + }).start(); } } } public void addCommand(String command, int key) { this.commands.add(new AutoTextCommand(command, key)); + updateHashMap(); } public ArrayList getCommands() { @@ -234,6 +236,14 @@ public class AutoTextMod extends Mod { } } + + public void updateHashMap() { + HashMap map = new HashMap<>(); + for (AutoTextCommand bind : commands) { + map.put(bind.key, bind); + } + commandsMap = map; + } public class AutoTextAddCommandGui extends SilentScreen { private final GuiScreen parentScreen; @@ -311,6 +321,7 @@ public class AutoTextMod extends Mod { this.silentInputs.get(1).onClick(mouseX, mouseY, x + 3, y + 46, this.modalWidth - 6); } + @Override public void onGuiClosed() { MenuBlurUtils.unloadBlur(); diff --git a/src/main/java/net/silentclient/client/skillissue/SkillIssue.java b/src/main/java/net/silentclient/client/skillissue/SkillIssue.java index d67a688..fc1d27a 100644 --- a/src/main/java/net/silentclient/client/skillissue/SkillIssue.java +++ b/src/main/java/net/silentclient/client/skillissue/SkillIssue.java @@ -6,7 +6,6 @@ import net.silentclient.client.event.EventManager; import net.silentclient.client.event.EventTarget; import net.silentclient.client.event.impl.ClientTickEvent; import net.silentclient.client.skillissue.detections.Detection; -import net.silentclient.client.skillissue.detections.Reach; import net.silentclient.client.utils.Requests; import net.silentclient.client.utils.TimerUtils; import org.json.JSONArray; @@ -22,7 +21,7 @@ public class SkillIssue { public SkillIssue() { EventManager.register(this); Client.logger.info(String.format("[SkillIssue]: Initialising (v%s)", VERSION)); - detections.add(new Reach(this)); +// detections.add(new Reach(this)); // detections.add(new AutoClicker(this)); timer = new TimerUtils(); } diff --git a/src/main/java/net/silentclient/client/utils/ColorUtils.java b/src/main/java/net/silentclient/client/utils/ColorUtils.java index ce8f39a..6fb99ac 100644 --- a/src/main/java/net/silentclient/client/utils/ColorUtils.java +++ b/src/main/java/net/silentclient/client/utils/ColorUtils.java @@ -1,9 +1,13 @@ package net.silentclient.client.utils; -import java.awt.Color; - import net.minecraft.client.renderer.GlStateManager; +import net.silentclient.client.Client; import net.silentclient.client.gui.animation.SimpleAnimation; +import net.silentclient.client.mods.Mod; +import net.silentclient.client.mods.Setting; + +import java.awt.*; +import java.util.ArrayList; public class ColorUtils { @@ -36,4 +40,23 @@ public class ColorUtils { public static void resetColor() { setColor(-1); } + + public static ArrayList getLatestColors(boolean ignoreOpacity) { + ArrayList colors = new ArrayList<>(); + + for(Mod mod : Client.getInstance().getModInstances().getMods()) { + for(Setting setting : Client.getInstance().getSettingsManager().getSettingByMod(mod)) { + if(setting.isColor() && !setting.isChroma()) { + Color color = !ignoreOpacity ? setting.getValColor() : new Color(setting.getValColor().getRed(), setting.getValColor().getBlue(), setting.getValColor().getGreen()); + if(!colors.contains(color)) { + colors.add(color); + } + } + } + } + + return colors; + } + + } diff --git a/src/main/java/net/silentclient/client/utils/WorldListener.java b/src/main/java/net/silentclient/client/utils/WorldListener.java new file mode 100644 index 0000000..a48a7b9 --- /dev/null +++ b/src/main/java/net/silentclient/client/utils/WorldListener.java @@ -0,0 +1,22 @@ +package net.silentclient.client.utils; + +import net.minecraft.entity.player.EntityPlayer; + +import java.util.HashMap; + +public class WorldListener { + public static HashMap players = new HashMap<>(); + + public static void onPlayerJoin(EntityPlayer entityPlayer) { + onPlayerLeave(entityPlayer); + players.put(entityPlayer.getName().toLowerCase(), entityPlayer); + } + + public static void onPlayerLeave(EntityPlayer entityPlayer) { + players.remove(entityPlayer.getName().toLowerCase()); + } + + public static void onWorldSwitch() { + players.clear(); + } +} diff --git a/src/main/java/net/silentclient/client/utils/types/GlobalSettings.java b/src/main/java/net/silentclient/client/utils/types/GlobalSettings.java index 85a2ffa..a6f2e06 100644 --- a/src/main/java/net/silentclient/client/utils/types/GlobalSettings.java +++ b/src/main/java/net/silentclient/client/utils/types/GlobalSettings.java @@ -3,6 +3,7 @@ package net.silentclient.client.utils.types; import net.silentclient.client.Client; import net.silentclient.client.utils.FeaturedServers; +import java.awt.*; import java.io.FileOutputStream; import java.util.ArrayList; @@ -13,6 +14,8 @@ public class GlobalSettings { public boolean configsMigrated; public boolean packsPanoramaEnabled; public ArrayList savedFeaturedServers; + public ArrayList latestColors; + public GlobalSettings() { this.config = "Default.txt"; @@ -20,6 +23,7 @@ public class GlobalSettings { this.displayedTutorial = false; this.packsPanoramaEnabled = true; this.savedFeaturedServers = new ArrayList<>(); + this.latestColors = new ArrayList<>(); } public String getConfig() { @@ -73,6 +77,36 @@ public class GlobalSettings { this.savedFeaturedServers = savedFeaturedServers; } + public ArrayList getLatestColors() { + if(latestColors == null) { + this.latestColors = new ArrayList<>(); + latestColors.add(new CustomColor(new Color(255, 255, 255))); + latestColors.add(new CustomColor(new Color(156, 157, 151))); + latestColors.add(new CustomColor(new Color(71,79,82))); + latestColors.add(new CustomColor(new Color(0, 0, 0))); + latestColors.add(new CustomColor(new Color(255,216,61))); + latestColors.add(new CustomColor(new Color(249,128,29))); + latestColors.add(new CustomColor(new Color(176,46,38))); + latestColors.add(new CustomColor(new Color(130,84,50))); + latestColors.add(new CustomColor(new Color(128,199,31))); + latestColors.add(new CustomColor(new Color(58,179,218))); + latestColors.add(new CustomColor(new Color(22,156,157))); + latestColors.add(new CustomColor(new Color(60,68,169))); + latestColors.add(new CustomColor(new Color(243,140,170))); + latestColors.add(new CustomColor(new Color(198,79,189))); + latestColors.add(new CustomColor(new Color(137,50,183))); + } + return latestColors; + } + + public void addToLatestColors(Color color) { + latestColors.removeIf(customColor -> customColor.color == new Color(color.getRed(), color.getGreen(), color.getBlue()).getRGB() && customColor.opacity == color.getAlpha()); + if(latestColors.size() == 21) { + latestColors.remove(20); + } + latestColors.add(0, new CustomColor(color)); + } + public void save() { try { FileOutputStream outputStream = new FileOutputStream(Client.getInstance().getGlobalSettingsFile()); @@ -84,4 +118,42 @@ public class GlobalSettings { Client.logger.catching(err); } } + + public class CustomColor { + public int color; + public int opacity; + + public CustomColor(Color color) { + this(new Color(color.getRed(), color.getGreen(), color.getBlue()), color.getAlpha()); + } + + public CustomColor(Color color, int opacity) { + this.color = new Color(color.getRed(), color.getGreen(), color.getBlue()).getRGB(); + this.opacity = opacity; + } + + public Color getColor() { + return getColor(false); + } + + public Color getColor(boolean ignoreOpacity) { + if(!ignoreOpacity) { + Color color = new Color(this.color); + return new Color(color.getRed(), color.getGreen(), color.getBlue(), opacity); + } + return new Color(this.color); + } + + public int getRGB() { + return getRGB(false); + } + + public int getRGB(boolean ignoreOpacity) { + if(!ignoreOpacity) { + Color color = new Color(this.color); + return new Color(color.getRed(), color.getGreen(), color.getBlue(), opacity).getRGB(); + } + return this.color; + } + } }