Merge pull request #113 from Silent-Client/TEST2

2.2
This commit is contained in:
kirillsaint 2024-05-10 12:25:56 +06:00 committed by GitHub
commit 45e15f8f6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
67 changed files with 3557 additions and 271 deletions

View File

@ -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 {

693
autobuilder/package-lock.json generated Normal file
View File

@ -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"
}
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
autobuilder/proguard/rt.jar Normal file

Binary file not shown.

320
autobuilder/proguard/sc Normal file
View File

@ -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.** {
<fields>;
<methods>;
}
-keep,allowshrinking class net.minecraft.** {
<fields>;
<methods>;
}
-keep,allowshrinking class net.silentclient.client.utils.cursors.** {
<fields>;
<methods>;
}
# 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 <methods>;
}
# 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);
}

View File

@ -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"

View File

@ -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() {
@ -372,6 +374,17 @@ public class Client {
Client.logger.info("STARTING > config-manager-post-init");
configManager.postInit();
if(!globalSettings.isResourcePacksFetched()) {
Client.logger.info("STARTING > resource-packs-fetching");
if(Minecraft.getMinecraft().getResourcePackRepository().getDirResourcepacks() != null && Minecraft.getMinecraft().getResourcePackRepository().getDirResourcepacks().listFiles() != null) {
for (File file : Minecraft.getMinecraft().getResourcePackRepository().getDirResourcepacks().listFiles()) {
globalSettings.addToUsedResourcePacks(file.getName());
}
globalSettings.setResourcePacksFetched(true);
globalSettings.save();
}
}
if(!globalSettings.isDisplayedTutorial()) {
Minecraft.getMinecraft().displayGuiScreen(new UserTutorial());
}
@ -589,6 +602,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;

View File

@ -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());
}
}

View File

@ -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);
}
}
}

View File

@ -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<Integer, EmotesConfigType.Bind> 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<Integer, EmotesConfigType.Bind> map = new HashMap<>();
for (EmotesConfigType.Bind bind : config.getBinds()) {
map.put(bind.keyId, bind);
}
binds = map;
}
public static HashMap<Integer, EmotesConfigType.Bind> getBinds() {
return binds;
}
public static EmotesConfigType getConfig() {
return config;
}
}

View File

@ -0,0 +1,59 @@
package net.silentclient.client.emotes.config;
import java.util.ArrayList;
public class EmotesConfigType {
public ArrayList<EmotesConfigType.Bind> binds;
public ArrayList<Bind> 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;
}
}

View File

@ -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<Integer, EmotesConfigType.Bind> 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

View File

@ -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);

View File

@ -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 {

View File

@ -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<GlobalSettings.CustomColor> 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

View File

@ -11,12 +11,11 @@ import net.silentclient.client.gui.SilentScreen;
import net.silentclient.client.gui.animation.SimpleAnimation;
import net.silentclient.client.gui.animation.normal.Direction;
import net.silentclient.client.gui.elements.Button;
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils.Scroll;
import net.silentclient.client.gui.elements.*;
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.modmenu.CellGrid;
import net.silentclient.client.gui.theme.Theme;
import net.silentclient.client.gui.theme.input.DefaultInputTheme;
@ -27,10 +26,7 @@ import net.silentclient.client.mods.ModCategory;
import net.silentclient.client.mods.Setting;
import net.silentclient.client.mods.render.crosshair.CrosshairMod;
import net.silentclient.client.mods.world.TimeChangerMod;
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.*;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;
@ -45,6 +41,7 @@ public class ModSettings extends SilentScreen {
public double scrollY;
public static SimpleAnimation scrollAnimation = new SimpleAnimation(0.0F);
private ScrollHelper scrollHelper = new ScrollHelper();
public ModSettings(Mod mod, GuiScreen parent) {
if (mod == null) throw new IllegalArgumentException("Mod is null");
@ -130,8 +127,13 @@ public class ModSettings extends SilentScreen {
GL11.glPushMatrix();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
int settingY = (int) (y + 25 + scrollAnimation.getValue() + mod.customComponentLiteHeight());
scrollHelper.setStep(5);
scrollHelper.setElementsHeight(25 + mod.customComponentHeight() + (Client.getInstance().getSettingsManager().getSettingByMod(mod).size() * 25));
scrollHelper.setMaxScroll(height);
scrollHelper.setSpeed(200);
scrollHelper.setFlag(true);
float scrollY = scrollHelper.getScroll();
int settingY = (int) (y + 25 + scrollY + mod.customComponentLiteHeight());
GL11.glPopMatrix();
@ -145,8 +147,8 @@ public class ModSettings extends SilentScreen {
int translatedY = r.getScaledHeight() - y - height;
GL11.glScissor(x * s, translatedY * s, this.width * s, height * s);
Client.getInstance().getSilentFontRenderer().drawString(mod.getName(), x + 100, (int) (y + 5) + scrollAnimation.getValue(), 14, SilentFontRenderer.FontType.TITLE);
MouseCursorHandler.CursorType cursorTypeCustom = mod.renderCustomLiteComponent(x + 100, (int) (y + 25 + scrollAnimation.getValue()), width, height, mouseX, mouseY);
Client.getInstance().getSilentFontRenderer().drawString(mod.getName(), x + 100, (y + 5) + scrollY, 14, SilentFontRenderer.FontType.TITLE);
MouseCursorHandler.CursorType cursorTypeCustom = mod.renderCustomLiteComponent(x + 100, (int) (y + 25 + scrollY), width, height, mouseX, mouseY);
if(cursorTypeCustom != null) {
cursorType = cursorTypeCustom;
}
@ -230,13 +232,13 @@ public class ModSettings extends SilentScreen {
settingY += settingHeight;
}
if(mod.getCategory() == ModCategory.MODS) {
RenderUtil.drawImage(new ResourceLocation("silentclient/icons/reset_settings.png"), x + width - (10 + 8) - 15, y + 5 + scrollAnimation.getValue(), 10, 10);
Tooltip.render(mouseX, mouseY, x + width - (10 + 8) - 15, y + 5 + scrollAnimation.getValue(), 10, 10, "Reset");
if(MouseUtils.isInside(mouseX, mouseY, x + width - (10 + 8) - 15, y + 5 + scrollAnimation.getValue(), 10, 10)) {
RenderUtil.drawImage(new ResourceLocation("silentclient/icons/reset_settings.png"), x + width - (10 + 8) - 15, y + 5 + scrollY, 10, 10);
Tooltip.render(mouseX, mouseY, x + width - (10 + 8) - 15, y + 5 + scrollY, 10, 10, "Reset");
if(MouseUtils.isInside(mouseX, mouseY, x + width - (10 + 8) - 15, y + 5 + scrollY, 10, 10)) {
cursorType = MouseCursorHandler.CursorType.POINTER;
}
Switch.render(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollAnimation.getValue(), mod.simpleAnimation, mod.isEnabled(), mod.isForceDisabled(), mod.isForceDisabled() ? "Force disabled" : null);
if(Switch.isHovered(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollAnimation.getValue())) {
Switch.render(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollY, mod.simpleAnimation, mod.isEnabled(), mod.isForceDisabled(), mod.isForceDisabled() ? "Force disabled" : null);
if(Switch.isHovered(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollY)) {
cursorType = MouseCursorHandler.CursorType.POINTER;
}
}
@ -245,45 +247,45 @@ public class ModSettings extends SilentScreen {
super.drawScreen(mouseX, mouseY, partialTicks);
final Scroll scroll = MouseUtils.scroll();
if(scroll != null) {
switch (scroll) {
case DOWN:
if(scrollY > -((settingIndex - 13.5) * 38)) {
scrollY -=12;
}
if(settingIndex > 13) {
if(scrollY < -((settingIndex - 15) * 38)) {
scrollY = -((settingIndex - 14.1) * 38);
}
}
if(mod.customComponentLiteHeight() > height - 30) {
if(scrollY > -((mod.customComponentLiteHeight() - 13.5) * 38)) {
scrollY -=12;
}
if(scrollY < -((mod.customComponentLiteHeight() - 15) * 38)) {
scrollY = -((mod.customComponentLiteHeight() - 14.1) * 38);
}
}
break;
case UP:
if(scrollY < -10) {
scrollY +=12;
}else {
if(settingIndex > 13) {
scrollY = 0;
}
if(mod.customComponentLiteHeight() > height - 30) {
scrollY = 0;
}
}
break;
}
}
scrollAnimation.setAnimation((float) scrollY, 16);
// final Scroll scroll = MouseUtils.scroll();
//
// if(scroll != null) {
// switch (scroll) {
// case DOWN:
// if(scrollY > -((settingIndex - 13.5) * 38)) {
// scrollY -=12;
// }
//
// if(settingIndex > 13) {
// if(scrollY < -((settingIndex - 15) * 38)) {
// scrollY = -((settingIndex - 14.1) * 38);
// }
// }
// if(mod.customComponentLiteHeight() > height - 30) {
// if(scrollY > -((mod.customComponentLiteHeight() - 13.5) * 38)) {
// scrollY -=12;
// }
// if(scrollY < -((mod.customComponentLiteHeight() - 15) * 38)) {
// scrollY = -((mod.customComponentLiteHeight() - 14.1) * 38);
// }
// }
// break;
// case UP:
// if(scrollY < -10) {
// scrollY +=12;
// }else {
// if(settingIndex > 13) {
// scrollY = 0;
// }
// if(mod.customComponentLiteHeight() > height - 30) {
// scrollY = 0;
// }
// }
// break;
// }
// }
//
// scrollAnimation.setAnimation((float) scrollY, 16);
if(ClickGUI.close) {
ClickGUI.introAnimation.setDirection(Direction.BACKWARDS);
@ -302,22 +304,22 @@ public class ModSettings extends SilentScreen {
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
super.mouseClicked(mouseX, mouseY, mouseButton);
float scrollY = scrollHelper.getScroll();
int addX = 190;
int addY = 110;
int x = (width / 2) - addX;
int y = (height / 2) - addY;
int width = addX * 2;
int settingY = (int) (y + 25 + scrollAnimation.getValue() + mod.customComponentLiteHeight());
int settingY = (int) (y + 25 + scrollY + mod.customComponentLiteHeight());
String category = "";
if(mod.getCategory() == ModCategory.MODS && MouseUtils.isInside(mouseX, mouseY, x + width - (10 + 8) - 15, y + 5 + scrollAnimation.getValue(), 10, 10)) {
if(mod.getCategory() == ModCategory.MODS && MouseUtils.isInside(mouseX, mouseY, x + width - (10 + 8) - 15, y + 5 + scrollY, 10, 10)) {
Sounds.playButtonSound();
mod.reset(false);
}
if(mod.getCategory() == ModCategory.MODS && Switch.isHovered(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollAnimation.getValue())) {
if(mod.getCategory() == ModCategory.MODS && Switch.isHovered(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollY)) {
Sounds.playButtonSound();
mod.toggle();
}
@ -452,11 +454,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++;
}
}

View File

@ -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<GlobalSettings.CustomColor> 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();
}

View File

@ -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);
}

View File

@ -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++;
}
}

View File

@ -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;

View File

@ -26,6 +26,7 @@ import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
@ -170,6 +171,12 @@ public class SilentResourcePacksGui extends SilentScreen {
{
this.mc.fontRendererObj.drawStringWithShadow(list.get(l), x + 5 + 31 + 3, itemY + 3 + 12 + 10 * l, 8421504);
}
if(!Client.getInstance().getGlobalSettings().getUsedResourcePacks().contains(entry.getResourcePackName())) {
RenderUtil.drawRoundedRect(x + 187 - 23, itemY + 35 - 12, 23, 10, 8, new Color(255, 255, 255).getRGB());
ColorUtils.setColor(new Color(0, 0, 0).getRGB());
Client.getInstance().getSilentFontRenderer().drawCenteredString("NEW", (int) x + 187 - 23 + (23 / 2), (int) (itemY + 35 - 12 + 10 - 9), 8, SilentFontRenderer.FontType.HEADER);
ColorUtils.resetColor();
}
}
itemY += 37;
}
@ -256,6 +263,12 @@ public class SilentResourcePacksGui extends SilentScreen {
{
this.mc.fontRendererObj.drawStringWithShadow(list.get(l), x + 5 + 31 + 3, itemY + 3 + 12 + 10 * l, 8421504);
}
if(!Client.getInstance().getGlobalSettings().getUsedResourcePacks().contains(entry.getResourcePackName())) {
RenderUtil.drawRoundedRect(x + 187 - 23, itemY + 35 - 12, 23, 10, 8, new Color(255, 255, 255).getRGB());
ColorUtils.setColor(new Color(0, 0, 0).getRGB());
Client.getInstance().getSilentFontRenderer().drawCenteredString("NEW", (int) x + 187 - 23 + (23 / 2), (int) (itemY + 35 - 12 + 10 - 9), 8, SilentFontRenderer.FontType.HEADER);
ColorUtils.resetColor();
}
}
itemY += 37;
packIndex++;
@ -329,7 +342,7 @@ public class SilentResourcePacksGui extends SilentScreen {
for (ResourcePackRepository.Entry resourcepackrepository$entry : list)
{
this.mc.gameSettings.resourcePacks.add(resourcepackrepository$entry.getResourcePackName());
Client.getInstance().getGlobalSettings().addToUsedResourcePacks(resourcepackrepository$entry.getResourcePackName());
if (resourcepackrepository$entry.func_183027_f() != 1)
{
this.mc.gameSettings.incompatibleResourcePacks.add(resourcepackrepository$entry.getResourcePackName());
@ -341,6 +354,7 @@ public class SilentResourcePacksGui extends SilentScreen {
this.initGui();
this.scrollHelper2.resetScroll();
this.scrollHelper.resetScroll();
Client.getInstance().getGlobalSettings().save();
}
}
@ -428,7 +442,19 @@ public class SilentResourcePacksGui extends SilentScreen {
this.selectedResourcePacks.clear();
}
ResourcePackRepository.Entry randomPack = this.availableResourcePacks.get(random.nextInt(this.availableResourcePacks.size()));
ArrayList<ResourcePackRepository.Entry> newPacks = new ArrayList<>();
for(ResourcePackRepository.Entry entry : this.availableResourcePacks) {
if(!Client.getInstance().getGlobalSettings().getUsedResourcePacks().contains(entry.getResourcePackName())) {
newPacks.add(entry);
}
}
ResourcePackRepository.Entry randomPack;
if(!newPacks.isEmpty()) {
randomPack = newPacks.get(random.nextInt(newPacks.size()));
} else {
randomPack = this.availableResourcePacks.get(random.nextInt(this.availableResourcePacks.size()));
}
if(randomPack != null) {
this.selectedResourcePacks.add(0, randomPack);

View File

@ -2,10 +2,7 @@ package net.silentclient.client.mixin;
import net.minecraft.launchwrapper.IClassTransformer;
import net.silentclient.client.Client;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.*;
import java.lang.reflect.Modifier;
@ -18,11 +15,11 @@ public class SilentClientTransformer implements IClassTransformer {
return null;
}
if(transformedName.equals("bfl$e") || transformedName.equals("bfl$r") || transformedName.equals("bnm$a") || transformedName.equals("ajd$a") || transformedName.equals("bha$a")) {
if(transformedName.equals("bfl$e") || transformedName.equals("bfl$r") || transformedName.equals("bnm$a") || transformedName.equals("ajd$a") || transformedName.equals("bha$a") || transformedName.equals("re$a")) {
Client.logger.info("Transforming class: " + transformedName);
ClassReader classreader = new ClassReader(bytes);
ClassWriter classwriter = new ClassWriter(1);
SilentClientTransformer.AccessTransformerVisitor visitor = new SilentClientTransformer.AccessTransformerVisitor(262144, classwriter);
SilentClientTransformer.AccessTransformerVisitor visitor = new AccessTransformerVisitor(262144, classwriter);
classreader.accept(visitor, 0);
return classwriter.toByteArray();
}
@ -34,7 +31,7 @@ public class SilentClientTransformer implements IClassTransformer {
return clazz.getName().replace(".", "/");
}
public class AccessTransformerVisitor extends ClassVisitor {
public static class AccessTransformerVisitor extends ClassVisitor {
public AccessTransformerVisitor(int api, ClassVisitor cv) {
super(api, cv);

View File

@ -0,0 +1,9 @@
package net.silentclient.client.mixin.accessors;
import net.minecraft.entity.EntityLiving;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(value={EntityLiving.class})
public interface EntityLivingAccessor {
}

View File

@ -0,0 +1,44 @@
package net.silentclient.client.mixin.accessors;
import net.minecraft.entity.ai.EntityLookHelper;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(value={EntityLookHelper.class})
public interface EntityLookHelperAccessor {
@Accessor(value="deltaLookYaw")
public float getDeltaLookYaw();
@Accessor(value="deltaLookYaw")
public void setDeltaLookYaw(float var1);
@Accessor(value="deltaLookPitch")
public float getDeltaLookPitch();
@Accessor(value="deltaLookPitch")
public void setDeltaLookPitch(float var1);
@Accessor(value="isLooking")
public boolean isLooking();
@Accessor(value="isLooking")
public void setLooking(boolean var1);
@Accessor(value="posX")
public double getPosX();
@Accessor(value="posX")
public void setPosX(double var1);
@Accessor(value="posY")
public double getPosY();
@Accessor(value="posY")
public void setPosY(double var1);
@Accessor(value="posZ")
public double getPosZ();
@Accessor(value="posZ")
public void setPosZ(double var1);
}

View File

@ -0,0 +1,14 @@
package net.silentclient.client.mixin.accessors.skins;
import net.silentclient.client.mods.render.skins.renderlayers.BodyLayerFeatureRenderer;
import net.silentclient.client.mods.render.skins.renderlayers.HeadLayerFeatureRenderer;
/**
* Used to expose the thinArms setting of the player model
*
*/
public interface PlayerEntityModelAccessor {
public boolean client$hasThinArms();
public HeadLayerFeatureRenderer client$getHeadLayer();
public BodyLayerFeatureRenderer client$getBodyLayer();
}

View File

@ -0,0 +1,15 @@
package net.silentclient.client.mixin.accessors.skins;
import net.silentclient.client.mods.render.skins.render.CustomizableModelPart;
public interface PlayerSettings {
public CustomizableModelPart client$getHeadLayers();
public void client$setupHeadLayers(CustomizableModelPart box);
public CustomizableModelPart[] client$getSkinLayers();
public void client$setupSkinLayers(CustomizableModelPart[] box);
}

View File

@ -0,0 +1,7 @@
package net.silentclient.client.mixin.accessors.skins;
public interface SkullModelAccessor {
public void showHat(boolean val);
}

View File

@ -0,0 +1,11 @@
package net.silentclient.client.mixin.accessors.skins;
import net.silentclient.client.mods.render.skins.render.CustomizableModelPart;
public interface SkullSettings {
public CustomizableModelPart getHeadLayers();
public void setupHeadLayers(CustomizableModelPart box);
}

View File

@ -0,0 +1,5 @@
package net.silentclient.client.mixin.ducks;
public interface EntityAITasksExt {
Object client$getTaskEntries();
}

View File

@ -0,0 +1,7 @@
package net.silentclient.client.mixin.ducks;
public interface EntityLivingExt {
void client$setLookHelper(Object var1);
Object client$getTasks();
}

View File

@ -0,0 +1,5 @@
package net.silentclient.client.mixin.ducks;
public interface EntityLookHelperExt {
Object client$getEntity();
}

View File

@ -0,0 +1,19 @@
package net.silentclient.client.mixin.mixins;
import net.minecraft.entity.ai.EntityAITasks;
import net.silentclient.client.mixin.ducks.EntityAITasksExt;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import java.util.List;
@Mixin(EntityAITasks.class)
public class EntityAITasksMixin implements EntityAITasksExt {
@Shadow private List<EntityAITasks.EntityAITaskEntry> taskEntries;
@Override
public Object client$getTaskEntries() {
return this.taskEntries;
}
}

View File

@ -0,0 +1,26 @@
package net.silentclient.client.mixin.mixins;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.ai.EntityAITasks;
import net.minecraft.entity.ai.EntityLookHelper;
import net.silentclient.client.mixin.ducks.EntityLivingExt;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@Mixin(EntityLiving.class)
public class EntityLivingMixin implements EntityLivingExt {
@Shadow private EntityLookHelper lookHelper;
@Shadow @Final protected EntityAITasks tasks;
@Override
public void client$setLookHelper(Object var1) {
this.lookHelper = (EntityLookHelper) var1;
}
@Override
public Object client$getTasks() {
return this.tasks;
}
}

View File

@ -0,0 +1,17 @@
package net.silentclient.client.mixin.mixins;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.ai.EntityLookHelper;
import net.silentclient.client.mixin.ducks.EntityLookHelperExt;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@Mixin(EntityLookHelper.class)
public class EntityLookHelperMixin implements EntityLookHelperExt {
@Shadow private EntityLiving entity;
@Override
public Object client$getEntity() {
return this.entity;
}
}

View File

@ -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

View File

@ -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);

View File

@ -0,0 +1,47 @@
package net.silentclient.client.mixin.mixins.skins;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.silentclient.client.mixin.accessors.skins.PlayerSettings;
import net.silentclient.client.mods.render.skins.render.CustomizableModelPart;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
/**
* Keep player specific settings, data and modifies the eye location when enabled
*
*/
@Mixin(EntityPlayer.class)
public abstract class PlayerMixin extends EntityLivingBase implements PlayerSettings {
public PlayerMixin(World p_i1594_1_) {
super(p_i1594_1_);
}
@Unique
private CustomizableModelPart headLayer;
@Unique
private CustomizableModelPart[] skinLayer;
@Override
public CustomizableModelPart[] client$getSkinLayers() {
return skinLayer;
}
@Override
public void client$setupSkinLayers(CustomizableModelPart[] box) {
this.skinLayer = box;
}
@Override
public CustomizableModelPart client$getHeadLayers() {
return headLayer;
}
@Override
public void client$setupHeadLayers(CustomizableModelPart box) {
this.headLayer = box;
}
}

View File

@ -0,0 +1,177 @@
package net.silentclient.client.mixin.mixins.skins;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelPlayer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.silentclient.client.Client;
import net.silentclient.client.mixin.accessors.skins.PlayerEntityModelAccessor;
import net.silentclient.client.mixin.accessors.skins.PlayerSettings;
import net.silentclient.client.mods.render.skins.SkinUtil;
import net.silentclient.client.mods.render.skins.SkinsMod;
import net.silentclient.client.mods.render.skins.renderlayers.BodyLayerFeatureRenderer;
import net.silentclient.client.mods.render.skins.renderlayers.HeadLayerFeatureRenderer;
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.callback.CallbackInfo;
@Mixin(RenderPlayer.class)
public abstract class PlayerRendererMixin extends RendererLivingEntity<AbstractClientPlayer> implements PlayerEntityModelAccessor {
@Shadow
private boolean smallArms;
@Unique
private HeadLayerFeatureRenderer client$headLayer;
@Unique
private BodyLayerFeatureRenderer client$bodyLayer;
public PlayerRendererMixin(RenderManager p_i46156_1_, ModelBase p_i46156_2_, float p_i46156_3_) {
super(p_i46156_1_, p_i46156_2_, p_i46156_3_);
}
@Inject(method = "<init>*", at = @At("RETURN"))
public void onCreate(CallbackInfo info) {
client$headLayer = new HeadLayerFeatureRenderer((RenderPlayer)(Object)this);
client$bodyLayer = new BodyLayerFeatureRenderer((RenderPlayer)(Object)this);
}
@Inject(method = "setModelVisibilities", at = @At("HEAD"))
private void setModelProperties(AbstractClientPlayer abstractClientPlayer, CallbackInfo info) {
ModelPlayer playerModel = getMainModel();
if(!Client.getInstance().getModInstances().getModByClass(SkinsMod.class).isEnabled()) {
playerModel.bipedHeadwear.isHidden = false;
playerModel.bipedBodyWear.isHidden = false;
playerModel.bipedLeftArmwear.isHidden = false;
playerModel.bipedRightArmwear.isHidden = false;
playerModel.bipedLeftLegwear.isHidden = false;
playerModel.bipedRightLegwear.isHidden = false;
return;
}
if(Minecraft.getMinecraft().thePlayer.getPositionVector().squareDistanceTo(abstractClientPlayer.getPositionVector()) < Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Level Of Detail Distance").getValInt()*Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Level Of Detail Distance").getValInt()) {
playerModel.bipedHeadwear.isHidden = playerModel.bipedHeadwear.isHidden || Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Head").getValBoolean();
playerModel.bipedBodyWear.isHidden = playerModel.bipedBodyWear.isHidden || Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Body").getValBoolean();
playerModel.bipedLeftArmwear.isHidden = playerModel.bipedLeftArmwear.isHidden || Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Left Arm").getValBoolean();
playerModel.bipedRightArmwear.isHidden = playerModel.bipedRightArmwear.isHidden || Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Right Arm").getValBoolean();
playerModel.bipedLeftLegwear.isHidden = playerModel.bipedLeftLegwear.isHidden || Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Left Leg").getValBoolean();
playerModel.bipedRightLegwear.isHidden = playerModel.bipedRightLegwear.isHidden || Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Right Leg").getValBoolean();
} else {
// not correct, but the correct way doesn't work cause 1.8 or whatever
if(!abstractClientPlayer.isSpectator()) {
playerModel.bipedHeadwear.isHidden = false;
playerModel.bipedBodyWear.isHidden = false;
playerModel.bipedLeftArmwear.isHidden = false;
playerModel.bipedRightArmwear.isHidden = false;
playerModel.bipedLeftLegwear.isHidden = false;
playerModel.bipedRightLegwear.isHidden = false;
}
}
}
@Override
public HeadLayerFeatureRenderer client$getHeadLayer() {
return client$headLayer;
}
@Override
public BodyLayerFeatureRenderer client$getBodyLayer() {
return client$bodyLayer;
}
@Override
public boolean client$hasThinArms() {
return smallArms;
}
@Shadow
public abstract ModelPlayer getMainModel();
@Inject(method = "renderRightArm", at = @At("RETURN"))
public void renderRightArm(AbstractClientPlayer player, CallbackInfo info) {
if(!Client.getInstance().getModInstances().getModByClass(SkinsMod.class).isEnabled()) {
return;
}
client$renderFirstPersonArm(player, 3);
}
@Inject(method = "renderLeftArm", at = @At("RETURN"))
public void renderLeftArm(AbstractClientPlayer player, CallbackInfo info) {
if(!Client.getInstance().getModInstances().getModByClass(SkinsMod.class).isEnabled()) {
return;
}
client$renderFirstPersonArm(player, 2);
}
@Unique
private void client$renderFirstPersonArm(AbstractClientPlayer player, int layerId) {
ModelPlayer modelplayer = getMainModel();
float pixelScaling = Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Voxel Size").getValFloat();
PlayerSettings settings = (PlayerSettings) player;
if(settings.client$getSkinLayers() == null && !client$setupModel(player, settings)) {
return;
}
GlStateManager.pushMatrix();
modelplayer.bipedRightArm.postRender(0.0625F);
GlStateManager.scale(0.0625, 0.0625, 0.0625);
GlStateManager.scale(pixelScaling, pixelScaling, pixelScaling);
if(!smallArms) {
settings.client$getSkinLayers()[layerId].x = -0.998f*16f;
} else {
settings.client$getSkinLayers()[layerId].x = -0.499f*16;
}
settings.client$getSkinLayers()[layerId].render(false);
GlStateManager.popMatrix();
}
@Unique
private boolean client$setupModel(AbstractClientPlayer abstractClientPlayerEntity, PlayerSettings settings) {
if(!SkinUtil.hasCustomSkin(abstractClientPlayerEntity)) {
return false; // default skin
}
SkinUtil.setup3dLayers(abstractClientPlayerEntity, settings, smallArms, null);
return true;
}
// @Inject(method = "renderHand", at = @At("RETURN"))
// private void renderHand(PoseStack poseStack, MultiBufferSource multiBufferSource, int i,
// AbstractClientPlayer abstractClientPlayer, ModelPart arm, ModelPart sleeve, CallbackInfo info) {
// if(sleeve.visible)return; // Vanilla one is active
// PlayerSettings settings = (PlayerSettings) abstractClientPlayer;
// float pixelScaling = 1.1f;
// float armHeightScaling = 1.1f;
// boolean thinArms = ((PlayerEntityModelAccessor)getModel()).hasThinArms();
// if(settings.getSkinLayers() == null && !SkinUtil.setup3dLayers(abstractClientPlayer, settings, thinArms, getModel())) {
// return;
// }
// CustomizableModelPart part = null;
// if(sleeve == this.model.leftSleeve) {
// part = settings.getSkinLayers()[2];
// }else {
// part = settings.getSkinLayers()[3];
// }
// part.copyFrom(arm);
// poseStack.pushPose();
// poseStack.scale(pixelScaling, armHeightScaling, pixelScaling);
// part.y -= 0.6;
// if(!thinArms) {
// part.x -= 0.4;
// }
// part.render(poseStack,
// multiBufferSource
// .getBuffer(RenderType.entityTranslucent(abstractClientPlayer.getSkinTextureLocation())),
// i, OverlayTexture.NO_OVERLAY);
// part.setPos(0, 0, 0);
// part.setRotation(0, 0, 0);
// poseStack.popPose();
//
// }
}

View File

@ -0,0 +1,52 @@
package net.silentclient.client.mixin.mixins.skins;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.minecraft.entity.EntityLivingBase;
import net.silentclient.client.Client;
import net.silentclient.client.mixin.accessors.skins.PlayerEntityModelAccessor;
import net.silentclient.client.mods.render.skins.SkinsMod;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(RendererLivingEntity.class)
public class RendererLivingEntityMixin<T extends EntityLivingBase> {
@Inject(method = "renderModel", at = @At("TAIL"))
protected void renderModelLayers(T p_renderModel_1_, float p_renderModel_2_, float p_renderModel_3_,
float p_renderModel_4_, float p_renderModel_5_, float p_renderModel_6_, float p_renderModel_7_, CallbackInfo info) {
if(!Client.getInstance().getModInstances().getModByClass(SkinsMod.class).isEnabled()) {
return;
}
if(!(this instanceof PlayerEntityModelAccessor)) {
return;
}
boolean flag = !p_renderModel_1_.isInvisible();
boolean flag1 = (!flag && !p_renderModel_1_.isInvisibleToPlayer((Minecraft.getMinecraft()).thePlayer));
if (flag || flag1) {
PlayerEntityModelAccessor playerRenderer = (PlayerEntityModelAccessor) this;
if (flag1) {
GlStateManager.pushMatrix();
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.15F);
GlStateManager.depthMask(false);
GlStateManager.enableBlend();
GlStateManager.blendFunc(770, 771);
GlStateManager.alphaFunc(516, 0.003921569F);
}
playerRenderer.client$getHeadLayer().doRenderLayer((AbstractClientPlayer) p_renderModel_1_, p_renderModel_2_, 0f, p_renderModel_3_, p_renderModel_4_, p_renderModel_5_, p_renderModel_6_, p_renderModel_7_);
playerRenderer.client$getBodyLayer().doRenderLayer((AbstractClientPlayer) p_renderModel_1_, p_renderModel_2_, 0f, p_renderModel_3_, p_renderModel_4_, p_renderModel_5_, p_renderModel_6_, p_renderModel_7_);
if (flag1) {
GlStateManager.disableBlend();
GlStateManager.alphaFunc(516, 0.1F);
GlStateManager.popMatrix();
GlStateManager.depthMask(true);
}
}
}
}

View File

@ -11,6 +11,7 @@ import net.silentclient.client.mods.hypixel.togglechat.ToggleChatMod;
import net.silentclient.client.mods.player.*;
import net.silentclient.client.mods.render.*;
import net.silentclient.client.mods.render.crosshair.CrosshairMod;
import net.silentclient.client.mods.render.skins.SkinsMod;
import net.silentclient.client.mods.settings.CosmeticsMod;
import net.silentclient.client.mods.settings.FPSBoostMod;
import net.silentclient.client.mods.settings.GeneralMod;
@ -189,6 +190,7 @@ public class ModInstances {
}
mods.add(new QuickPlayMod());
mods.add(new SoundsMod());
mods.add(new SkinsMod());
}
public void postInit() {

View File

@ -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<QuickplayModeType> hypixelQuickplayModes;
public static ArrayList<QuickplayModeType> ruhypixelQuickplayModes;
public static boolean sending = false;
public static HashMap<Integer, Setting> 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<ArrayList<QuickplayModeType>>(){}.getType();
Type listType = new TypeToken<ArrayList<QuickplayModeType>>() {
}.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<Integer, Setting> 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;

View File

@ -0,0 +1,62 @@
package net.silentclient.client.mods.other.ai;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.ai.EntityLookHelper;
import net.minecraft.util.MathHelper;
import net.silentclient.client.mixin.accessors.EntityLookHelperAccessor;
import net.silentclient.client.mixin.ducks.EntityLookHelperExt;
/**
* Created by Dark on 7/20/2015.
*/
public class FixedEntityLookHelper extends EntityLookHelper
{
public FixedEntityLookHelper(EntityLiving entity)
{
super(entity);
}
@Override
public void onUpdateLook() {
((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationPitch = 0.0f;
if (((EntityLookHelperAccessor)((Object)this)).isLooking()) {
((EntityLookHelperAccessor)((Object)this)).setLooking(false);
double d0 = ((EntityLookHelperAccessor)((Object)this)).getPosX() - ((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).posX;
double d1 = ((EntityLookHelperAccessor)((Object)this)).getPosY() - (((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).posY + (double)((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).getEyeHeight());
double d2 = ((EntityLookHelperAccessor)((Object)this)).getPosZ() - ((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).posZ;
double d3 = MathHelper.sqrt_double(d0 * d0 + d2 * d2);
float f = (float)((double)FixedEntityLookHelper.tan(d2, d0) * 180.0 / Math.PI) - 90.0f;
float f1 = (float)(-((double)FixedEntityLookHelper.tan(d1, d3) * 180.0 / Math.PI));
((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationPitch = this.updateRotation(((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationPitch, f1, ((EntityLookHelperAccessor)((Object)this)).getDeltaLookPitch());
((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationYawHead = this.updateRotation(((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationYawHead, f, ((EntityLookHelperAccessor)((Object)this)).getDeltaLookYaw());
} else {
((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationYawHead = this.updateRotation(((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationYawHead, ((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).renderYawOffset, 10.0f);
}
float f2 = MathHelper.wrapAngleTo180_float(((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationYawHead - ((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).renderYawOffset);
if (!((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).getNavigator().noPath()) {
if (f2 < -75.0f) {
((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationYawHead = ((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).renderYawOffset - 75.0f;
}
if (f2 > 75.0f) {
((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).rotationYawHead = ((EntityLiving) ((EntityLookHelperExt) this).client$getEntity()).renderYawOffset + 75.0f;
}
}
}
private float updateRotation(float a, float b, float c) {
float f = MathHelper.wrapAngleTo180_float(b - a);
if (f > c) {
f = c;
}
if (f < -c) {
f = -c;
}
return a + f;
}
public static float tan(double a, double b)
{
return FastTrig.atan2(a, b);
}
}

View File

@ -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<AutoTextCommand> commands = new ArrayList<AutoTextCommand>();
public HashMap<Integer, AutoTextCommand> 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<AutoTextCommand> getCommands() {
@ -234,6 +236,14 @@ public class AutoTextMod extends Mod {
}
}
public void updateHashMap() {
HashMap<Integer, AutoTextCommand> 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();

View File

@ -1,10 +0,0 @@
package net.silentclient.client.mods.render;
import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory;
public class SkinsMod extends Mod {
public SkinsMod() {
super("3D Skins", ModCategory.MODS, "silentclient/icons/mods/3dskins.png");
}
}

View File

@ -0,0 +1,33 @@
package net.silentclient.client.mods.render.skins;
import org.lwjgl.util.vector.Vector3f;
import net.minecraft.util.Vec3i;
public enum Direction {
DOWN(new Vec3i(0, -1, 0)), UP(new Vec3i(0, 1, 0)), NORTH(new Vec3i(0, 0, -1)), SOUTH(new Vec3i(0, 0, 1)),
WEST(new Vec3i(-1, 0, 0)), EAST(new Vec3i(1, 0, 0));
private Direction(Vec3i normal) {
this.normal = normal;
}
private final Vec3i normal;
public int getStepX() {
return this.normal.getX();
}
public int getStepY() {
return this.normal.getY();
}
public int getStepZ() {
return this.normal.getZ();
}
public Vector3f step() {
return new Vector3f(getStepX(), getStepY(), getStepZ());
}
}

View File

@ -0,0 +1,79 @@
package net.silentclient.client.mods.render.skins;
import com.mojang.authlib.GameProfile;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelPlayer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.texture.ITextureObject;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.DefaultPlayerSkin;
import net.minecraft.util.ResourceLocation;
import net.silentclient.client.mixin.accessors.skins.PlayerSettings;
import net.silentclient.client.mixin.accessors.skins.SkullSettings;
import net.silentclient.client.mods.render.skins.opengl.NativeImage;
import net.silentclient.client.mods.render.skins.render.CustomizableModelPart;
import net.silentclient.client.mods.render.skins.render.SolidPixelWrapper;
public class SkinUtil {
public static boolean hasCustomSkin(AbstractClientPlayer player) {
return !DefaultPlayerSkin.getDefaultSkin((player).getUniqueID()).equals((player).getLocationSkin());
}
private static NativeImage getSkinTexture(AbstractClientPlayer player) {
return getTexture(player.getLocationSkin());
}
private static NativeImage getTexture(ResourceLocation resource) {
NativeImage skin = new NativeImage(64, 64, false);
TextureManager textureManager = Minecraft.getMinecraft().getTextureManager();
ITextureObject abstractTexture = textureManager.getTexture(resource);
if(abstractTexture == null)return null; // fail save
GlStateManager.bindTexture(abstractTexture.getGlTextureId());
skin.downloadTexture(0, false);
return skin;
}
public static boolean setup3dLayers(AbstractClientPlayer abstractClientPlayerEntity, PlayerSettings settings, boolean thinArms, ModelPlayer model) {
if(!SkinUtil.hasCustomSkin(abstractClientPlayerEntity)) {
return false; // default skin
}
NativeImage skin = SkinUtil.getSkinTexture(abstractClientPlayerEntity);
if(skin == null)return false; // fail save
CustomizableModelPart[] layers = new CustomizableModelPart[5];
layers[0] = SolidPixelWrapper.wrapBox(skin, 4, 12, 4, 0, 48, true, 0f);
layers[1] = SolidPixelWrapper.wrapBox(skin, 4, 12, 4, 0, 32, true, 0f);
if(thinArms) {
layers[2] = SolidPixelWrapper.wrapBox(skin, 3, 12, 4, 48, 48, true, -2.5f);
layers[3] = SolidPixelWrapper.wrapBox(skin, 3, 12, 4, 40, 32, true, -2.5f);
} else {
layers[2] = SolidPixelWrapper.wrapBox(skin, 4, 12, 4, 48, 48, true, -2.5f);
layers[3] = SolidPixelWrapper.wrapBox(skin, 4, 12, 4, 40, 32, true, -2.5f);
}
layers[4] = SolidPixelWrapper.wrapBox(skin, 8, 12, 4, 16, 32, true, -0.8f);
settings.client$setupSkinLayers(layers);
settings.client$setupHeadLayers(SolidPixelWrapper.wrapBox(skin, 8, 8, 8, 32, 0, false, 0.6f));
skin.close();
return true;
}
public static boolean setup3dLayers(GameProfile gameprofile, SkullSettings settings) {
if(gameprofile == null) {
return false; // no gameprofile
}
/*Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> map = Minecraft.getMinecraft().getSkinManager()
.loadProfileTextures(gameprofile);
MinecraftProfileTexture texture = map.get(MinecraftProfileTexture.Type.SKIN);
if(texture == null) {
return false; // it's a gameprofile, but no skin.
}
NativeImage skin = SkinUtil.getTexture(Minecraft.getMinecraft().getSkinManager()
.registerTexture(texture, MinecraftProfileTexture.Type.SKIN));
settings.setupHeadLayers(SolidPixelWrapper.wrapBox(skin, 8, 8, 8, 32, 0, false, 0.6f));
skin.close();
return true;*/
return false;
}
}

View File

@ -0,0 +1,29 @@
package net.silentclient.client.mods.render.skins;
import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory;
public class SkinsMod extends Mod {
public SkinsMod() {
super("3D Skins", ModCategory.MODS, "silentclient/icons/mods/skinsmod.png");
}
@Override
public void setup() {
super.setup();
this.addBooleanSetting("Fast Render", this, true);
this.addSliderSetting("Level Of Detail Distance", this, 14, 5, 40, true);
this.addBooleanSetting("Head", this, true);
this.addBooleanSetting("Body", this, true);
this.addBooleanSetting("Left Arm", this, true);
this.addBooleanSetting("Right Arm", this, true);
this.addBooleanSetting("Left Leg", this, true);
this.addBooleanSetting("Right Leg", this, true);
this.addSliderSetting("Voxel Size", this, 1.15F, 1F, 1.4F, false);
this.addSliderSetting("Head Voxel Size", this, 1.18F, 1F, 1.25F, false);
this.addSliderSetting("Body Voxel Width Size", this, 1.05F, 1F, 1.4F, false);
}
}

View File

@ -0,0 +1,31 @@
package net.silentclient.client.mods.render.skins;
import net.minecraft.item.ItemStack;
import net.silentclient.client.mixin.accessors.skins.SkullSettings;
import net.silentclient.client.mods.render.skins.render.CustomizableModelPart;
import java.util.WeakHashMap;
public class SkullRendererCache {
public static boolean renderNext = false;
public static SkullSettings lastSkull = null;
public static WeakHashMap<ItemStack, SkullSettings> itemCache = new WeakHashMap<>();
public static class ItemSettings implements SkullSettings {
private CustomizableModelPart hatModel = null;
@Override
public CustomizableModelPart getHeadLayers() {
return hatModel;
}
@Override
public void setupHeadLayers(CustomizableModelPart box) {
this.hatModel = box;
}
}
}

View File

@ -0,0 +1,15 @@
package net.silentclient.client.mods.render.skins.opengl;
import org.lwjgl.opengl.GL11;
import java.nio.ByteBuffer;
public class GlStateManager {
public static void _getTexImage(int i, int j, int k, int l, ByteBuffer m) {
GL11.glGetTexImage(i, j, k, l, m);
}
public static void _pixelStore(int i, int j) {
GL11.glPixelStorei(i, j);
}
}

View File

@ -0,0 +1,294 @@
package net.silentclient.client.mods.render.skins.opengl;
import java.nio.ByteBuffer;
public final class NativeImage implements AutoCloseable {
private final Format format;
private final int width;
private final int height;
private ByteBuffer buffer;
private final int size;
public NativeImage(int i, int j, boolean bl) {
this(Format.RGBA, i, j, bl);
}
public NativeImage(Format format, int i, int j, boolean bl) {
if (i <= 0 || j <= 0)
throw new IllegalArgumentException("Invalid texture size: " + i + "x" + j);
this.format = format;
this.width = i;
this.height = j;
this.size = i * j * format.components();
buffer = ByteBuffer.allocateDirect(this.size);
}
private boolean isOutsideBounds(int i, int j) {
return (i < 0 || i >= this.width || j < 0 || j >= this.height);
}
public void close() {
// nothing to do?
}
public int getWidth() {
return this.width;
}
public int getHeight() {
return this.height;
}
public Format format() {
return this.format;
}
public int getPixelRGBA(int i, int j) {
if (this.format != Format.RGBA)
throw new IllegalArgumentException(
String.format("getPixelRGBA only works on RGBA images; have %s", new Object[]{this.format}));
if (isOutsideBounds(i, j))
throw new IllegalArgumentException(
String.format("(%s, %s) outside of image bounds (%s, %s)", new Object[]{Integer.valueOf(i),
Integer.valueOf(j), Integer.valueOf(this.width), Integer.valueOf(this.height)}));
int l = (i + j * this.width) * 4;
return buffer.getInt(l);
}
public void setPixelRGBA(int i, int j, int k) {
if (this.format != Format.RGBA)
throw new IllegalArgumentException(
String.format("getPixelRGBA only works on RGBA images; have %s", new Object[]{this.format}));
if (isOutsideBounds(i, j))
throw new IllegalArgumentException(
String.format("(%s, %s) outside of image bounds (%s, %s)", new Object[]{Integer.valueOf(i),
Integer.valueOf(j), Integer.valueOf(this.width), Integer.valueOf(this.height)}));
int l = (i + j * this.width) * 4;
buffer.putInt(l, k);
}
public byte getLuminanceOrAlpha(int i, int j) {
if (!this.format.hasLuminanceOrAlpha())
throw new IllegalArgumentException(String.format("no luminance or alpha in %s", new Object[]{this.format}));
if (isOutsideBounds(i, j))
throw new IllegalArgumentException(
String.format("(%s, %s) outside of image bounds (%s, %s)", new Object[]{Integer.valueOf(i),
Integer.valueOf(j), Integer.valueOf(this.width), Integer.valueOf(this.height)}));
int k = (i + j * this.width) * this.format.components() + this.format.luminanceOrAlphaOffset() / 8;
return buffer.get(k);
}
public void downloadTexture(int i, boolean bl) {
//RenderSystem.assertOnRenderThread();
this.format.setPackPixelStoreState();
GlStateManager._getTexImage(3553, i, this.format.glFormat(), 5121, this.buffer);
if (bl && this.format.hasAlpha())
for (int j = 0; j < getHeight(); j++) {
for (int k = 0; k < getWidth(); k++)
setPixelRGBA(k, j, getPixelRGBA(k, j) | 255 << this.format.alphaOffset());
}
}
// public void downloadDepthBuffer(float f) {
// //RenderSystem.assertOnRenderThread();
// if (this.format.components() != 1)
// throw new IllegalStateException("Depth buffer must be stored in NativeImage with 1 component.");
// checkAllocated();
// this.format.setPackPixelStoreState();
// GlStateManager._readPixels(0, 0, this.width, this.height, 6402, 5121, this.pixels);
// }
public static int getA(int i) {
return i >> 24 & 0xFF;
}
public static int getR(int i) {
return i >> 0 & 0xFF;
}
public static int getG(int i) {
return i >> 8 & 0xFF;
}
public static int getB(int i) {
return i >> 16 & 0xFF;
}
public static int combine(int i, int j, int k, int l) {
return (i & 0xFF) << 24 | (j & 0xFF) << 16 | (k & 0xFF) << 8 | (l & 0xFF) << 0;
}
public enum InternalGlFormat {
RGBA(6408), RGB(6407), RG(33319), RED(6403);
private final int glFormat;
InternalGlFormat(int j) {
this.glFormat = j;
}
public int glFormat() {
return this.glFormat;
}
}
public enum Format {
RGBA(4, 6408, true, true, true, false, true, 0, 8, 16, 255, 24, true), RGB(3, 6407, true, true, true, false,
false, 0, 8, 16, 255, 255, true), LUMINANCE_ALPHA(2, 33319, false, false, false, true, true, 255, 255,
255, 0, 8, true), LUMINANCE(1, 6403, false, false, false, true, false, 0, 0, 0, 0, 255, true);
final int components;
private final int glFormat;
private final boolean hasRed;
private final boolean hasGreen;
private final boolean hasBlue;
private final boolean hasLuminance;
private final boolean hasAlpha;
private final int redOffset;
private final int greenOffset;
private final int blueOffset;
private final int luminanceOffset;
private final int alphaOffset;
private final boolean supportedByStb;
Format(int j, int k, boolean bl, boolean bl2, boolean bl3, boolean bl4, boolean bl5, int l, int m, int n, int o,
int p, boolean bl6) {
this.components = j;
this.glFormat = k;
this.hasRed = bl;
this.hasGreen = bl2;
this.hasBlue = bl3;
this.hasLuminance = bl4;
this.hasAlpha = bl5;
this.redOffset = l;
this.greenOffset = m;
this.blueOffset = n;
this.luminanceOffset = o;
this.alphaOffset = p;
this.supportedByStb = bl6;
}
public int components() {
return this.components;
}
public void setPackPixelStoreState() {
//RenderSystem.assertOnRenderThread();
GlStateManager._pixelStore(3333, components());
}
public void setUnpackPixelStoreState() {
GlStateManager._pixelStore(3317, components());
}
public int glFormat() {
return this.glFormat;
}
public boolean hasRed() {
return this.hasRed;
}
public boolean hasGreen() {
return this.hasGreen;
}
public boolean hasBlue() {
return this.hasBlue;
}
public boolean hasLuminance() {
return this.hasLuminance;
}
public boolean hasAlpha() {
return this.hasAlpha;
}
public int redOffset() {
return this.redOffset;
}
public int greenOffset() {
return this.greenOffset;
}
public int blueOffset() {
return this.blueOffset;
}
public int luminanceOffset() {
return this.luminanceOffset;
}
public int alphaOffset() {
return this.alphaOffset;
}
public boolean hasLuminanceOrRed() {
return (this.hasLuminance || this.hasRed);
}
public boolean hasLuminanceOrGreen() {
return (this.hasLuminance || this.hasGreen);
}
public boolean hasLuminanceOrBlue() {
return (this.hasLuminance || this.hasBlue);
}
public boolean hasLuminanceOrAlpha() {
return (this.hasLuminance || this.hasAlpha);
}
public int luminanceOrRedOffset() {
return this.hasLuminance ? this.luminanceOffset : this.redOffset;
}
public int luminanceOrGreenOffset() {
return this.hasLuminance ? this.luminanceOffset : this.greenOffset;
}
public int luminanceOrBlueOffset() {
return this.hasLuminance ? this.luminanceOffset : this.blueOffset;
}
public int luminanceOrAlphaOffset() {
return this.hasLuminance ? this.luminanceOffset : this.alphaOffset;
}
public boolean supportedByStb() {
return this.supportedByStb;
}
static Format getStbFormat(int i) {
switch (i) {
case 1 :
return LUMINANCE;
case 2 :
return LUMINANCE_ALPHA;
case 3 :
return RGB;
}
return RGBA;
}
}
}

View File

@ -0,0 +1,152 @@
package net.silentclient.client.mods.render.skins.render;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.silentclient.client.mods.render.skins.Direction;
import org.lwjgl.util.vector.Vector3f;
public class CustomizableCube {
private final Direction[] hidden;
private final Polygon[] polygons;
private int polygonCount = 0;
public final float minX;
public final float minY;
public final float minZ;
public final float maxX;
public final float maxY;
public final float maxZ;
public CustomizableCube(int u, int v, float x, float y, float z, float sizeX, float sizeY, float sizeZ, float extraX, float extraY,
float extraZ, boolean mirror, float textureWidth, float textureHeight, Direction[] hide) {
this.hidden = hide;
this.minX = x;
this.minY = y;
this.minZ = z;
this.maxX = x + sizeX;
this.maxY = y + sizeY;
this.maxZ = z + sizeZ;
this.polygons = new Polygon[6];
float pX = x + sizeX;
float pY = y + sizeY;
float pZ = z + sizeZ;
x -= extraX;
y -= extraY;
z -= extraZ;
pX += extraX;
pY += extraY;
pZ += extraZ;
if (mirror) {
float i = pX;
pX = x;
x = i;
}
Vertex vertex = new Vertex(x, y, z, 0.0F, 0.0F);
Vertex vertex2 = new Vertex(pX, y, z, 0.0F, 8.0F);
Vertex vertex3 = new Vertex(pX, pY, z, 8.0F, 8.0F);
Vertex vertex4 = new Vertex(x, pY, z, 8.0F, 0.0F);
Vertex vertex5 = new Vertex(x, y, pZ, 0.0F, 0.0F);
Vertex vertex6 = new Vertex(pX, y, pZ, 0.0F, 8.0F);
Vertex vertex7 = new Vertex(pX, pY, pZ, 8.0F, 8.0F);
Vertex vertex8 = new Vertex(x, pY, pZ, 8.0F, 0.0F);
float l = u + sizeZ + sizeX;
float n = u + sizeZ + sizeX + sizeZ;
float q = v + sizeZ;
float r = v + sizeZ + sizeY;
if(visibleFace(Direction.DOWN))
this.polygons[polygonCount++] = new Polygon(new Vertex[]{vertex6, vertex5, vertex, vertex2}, l, q, n, r, textureWidth, textureHeight, mirror, Direction.DOWN);
if(visibleFace(Direction.UP))
this.polygons[polygonCount++] = new Polygon(new Vertex[]{vertex3, vertex4, vertex8, vertex7}, l, q, n, r, textureWidth, textureHeight, mirror, Direction.UP);
if(visibleFace(Direction.WEST))
this.polygons[polygonCount++] = new Polygon(new Vertex[]{vertex, vertex5, vertex8, vertex4}, l, q, n, r, textureWidth, textureHeight, mirror, Direction.WEST);
if(visibleFace(Direction.NORTH))
this.polygons[polygonCount++] = new Polygon(new Vertex[]{vertex2, vertex, vertex4, vertex3}, l, q, n, r, textureWidth, textureHeight, mirror, Direction.NORTH);
if(visibleFace(Direction.EAST))
this.polygons[polygonCount++] = new Polygon(new Vertex[]{vertex6, vertex2, vertex3, vertex7}, l, q, n, r, textureWidth, textureHeight, mirror, Direction.EAST);
if(visibleFace(Direction.SOUTH))
this.polygons[polygonCount++] = new Polygon(new Vertex[]{vertex5, vertex6, vertex7, vertex8}, l, q, n, r, textureWidth, textureHeight, mirror, Direction.SOUTH);
}
private boolean visibleFace(Direction face) {
for(Direction dir : hidden) {
if(dir == face)return false;
}
return true;
}
public void render(WorldRenderer worldRenderer, boolean redTint) {
redTint = false;
worldRenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
Polygon polygon;
for (int id = 0; id < polygonCount; id++) {
polygon = polygons[id];
for (int i = 0; i < 4; i++) {
Vertex vertex = polygon.vertices[i];
worldRenderer
.pos(vertex.pos.x, vertex.pos.y,
vertex.pos.z)
.tex(vertex.u, vertex.v).color(255, redTint ? 127 : 255, redTint ? 127 : 255, 255).normal(polygon.normal.x, polygon.normal.y, polygon.normal.z)
.endVertex();
}
}
Tessellator.getInstance().draw();
}
private static class Polygon {
public final Vertex[] vertices;
public final Vector3f normal;
public Polygon(Vertex[] vertexs, float f, float g, float h, float i, float j, float k, boolean bl,
Direction dir) {
this.vertices = vertexs;
float l = 0.0F / j;
float m = 0.0F / k;
vertexs[0] = vertexs[0].remap(h / j - l, g / k + m);
vertexs[1] = vertexs[1].remap(f / j + l, g / k + m);
vertexs[2] = vertexs[2].remap(f / j + l, i / k - m);
vertexs[3] = vertexs[3].remap(h / j - l, i / k - m);
if (bl) {
int n = vertexs.length;
for (int o = 0; o < n / 2; o++) {
Vertex vertex = vertexs[o];
vertexs[o] = vertexs[n - 1 - o];
vertexs[n - 1 - o] = vertex;
}
}
this.normal = dir.step();
if (bl)
this.normal.setX(this.normal.getX()*-1);
}
}
private static class Vertex {
public final Vector3f pos;
public final float u;
public final float v;
public final float o,p,q;
public Vertex(float f, float g, float h, float i, float j) {
this(new Vector3f(f, g, h), i, j);
}
public Vertex remap(float f, float g) {
return new Vertex(this.pos, f, g);
}
public Vertex(Vector3f vector3f, float f, float g) {
this.pos = vector3f;
this.u = f;
this.v = g;
o = pos.x / 16.0F;
p = pos.y / 16.0F;
q = pos.z / 16.0F;
}
}
}

View File

@ -0,0 +1,41 @@
package net.silentclient.client.mods.render.skins.render;
import com.google.common.collect.Lists;
import net.silentclient.client.mods.render.skins.Direction;
import java.util.List;
public class CustomizableCubeListBuilder {
private final List<CustomizableCube> cubes = Lists.newArrayList();
private int xTexOffs;
private int yTexOffs;
private boolean mirror;
public static CustomizableCubeListBuilder create() {
return new CustomizableCubeListBuilder();
}
public CustomizableCubeListBuilder texOffs(int i, int j) {
this.xTexOffs = i;
this.yTexOffs = j;
return this;
}
public CustomizableCubeListBuilder mirror(boolean bl) {
this.mirror = bl;
return this;
}
public List<CustomizableCube> getCubes() {
return cubes;
}
public CustomizableCubeListBuilder addBox(float x, float y, float z, float pixelSize, Direction[] hide) {
int textureSize = 64;
this.cubes.add(new CustomizableCube(xTexOffs, yTexOffs, x, y, z, pixelSize, pixelSize, pixelSize, 0, 0, 0,
this.mirror, textureSize, textureSize, hide));
return this;
}
}

View File

@ -0,0 +1,57 @@
package net.silentclient.client.mods.render.skins.render;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
import java.util.List;
/**
* Cut down copy of the Vanilla ModelPart to bypass Optifine/Sodium screwing
* with the CustomizableCube class
*
*/
public class CustomizableModelPart {
public float x;
public float y;
public float z;
public boolean visible = true;
private final List<CustomizableCube> cubes;
public CustomizableModelPart(List<CustomizableCube> list) {
this.cubes = list;
}
public void copyFrom(ModelBox modelPart) {
this.x = modelPart.posX1;
this.y = modelPart.posY1;
this.z = modelPart.posZ1;
}
public void setPos(float f, float g, float h) {
this.x = f;
this.y = g;
this.z = h;
}
public void render(boolean redTint) {
if (!this.visible)
return;
GlStateManager.pushMatrix();
translateAndRotate();
compile(redTint);
GlStateManager.popMatrix();
}
public void translateAndRotate() {
GlStateManager.translate((this.x / 16.0F), (this.y / 16.0F), (this.z / 16.0F));
}
private void compile(boolean redTint) {
for (CustomizableCube cube : this.cubes)
cube.render(Tessellator.getInstance().getWorldRenderer(), redTint);
}
}

View File

@ -0,0 +1,108 @@
package net.silentclient.client.mods.render.skins.render;
import net.silentclient.client.mods.render.skins.Direction;
import net.silentclient.client.mods.render.skins.opengl.NativeImage;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class SolidPixelWrapper {
public static CustomizableModelPart wrapBox(NativeImage natImage, int width,
int height, int depth, int textureU, int textureV, boolean topPivot, float rotationOffset) {
List<CustomizableCube> cubes = new ArrayList<>();
float pixelSize = 1f;
float staticXOffset = -width / 2f;
float staticYOffset = topPivot ? +rotationOffset : -height + rotationOffset;
float staticZOffset = -depth / 2f;
// Front/back
for (int u = 0; u < width; u++) {
for (int v = 0; v < height; v++) {
// front
addPixel(natImage, cubes, pixelSize, u == 0 || v == 0 || u == width - 1 || v == height - 1,
textureU + depth + u, textureV + depth + v, staticXOffset + u, staticYOffset + v, staticZOffset,
Direction.SOUTH);
// back
addPixel(natImage, cubes, pixelSize, u == 0 || v == 0 || u == width - 1 || v == height - 1,
textureU + 2 * depth + width + u, textureV + depth + v, staticXOffset + width - 1 - u,
staticYOffset + v, staticZOffset + depth - 1, Direction.NORTH);
}
}
// sides
for (int u = 0; u < depth; u++) {
for (int v = 0; v < height; v++) {
// left
addPixel(natImage, cubes, pixelSize, u == 0 || v == 0 || u == depth - 1 || v == height - 1,
textureU - 1 + depth - u, textureV + depth + v, staticXOffset, staticYOffset + v,
staticZOffset + u, Direction.EAST);
// right
addPixel(natImage, cubes, pixelSize, u == 0 || v == 0 || u == depth - 1 || v == height - 1,
textureU + depth + width + u, textureV + depth + v, staticXOffset + width - 1f,
staticYOffset + v, staticZOffset + u, Direction.WEST);
}
}
// top/bottom
for (int u = 0; u < width; u++) {
for (int v = 0; v < depth; v++) {
// top
addPixel(natImage, cubes, pixelSize, u == 0 || v == 0 || u == width - 1 || v == depth - 1,
textureU + depth + u, textureV + depth - 1 - v, staticXOffset + u, staticYOffset,
staticZOffset + v, Direction.UP); // Sides are flipped cause ?!?
// bottom
addPixel(natImage, cubes, pixelSize, u == 0 || v == 0 || u == width - 1 || v == depth - 1,
textureU + depth + width + u, textureV + depth - 1 - v, staticXOffset + u,
staticYOffset + height - 1f, staticZOffset + v, Direction.DOWN); // Sides are flipped cause ?!?
}
}
return new CustomizableModelPart(cubes);
}
private static int[][] offsets = new int[][] { { 0, 1 }, { 0, -1 }, { 1, 0 }, { -1, 0 } };
private static Direction[] hiddenDirN = new Direction[] { Direction.WEST, Direction.EAST, Direction.UP,
Direction.DOWN };
private static Direction[] hiddenDirS = new Direction[] { Direction.EAST, Direction.WEST, Direction.UP,
Direction.DOWN };
private static Direction[] hiddenDirW = new Direction[] { Direction.SOUTH, Direction.NORTH, Direction.UP,
Direction.DOWN };
private static Direction[] hiddenDirE = new Direction[] { Direction.NORTH, Direction.SOUTH, Direction.UP,
Direction.DOWN };
private static Direction[] hiddenDirUD = new Direction[] { Direction.EAST, Direction.WEST, Direction.NORTH,
Direction.SOUTH };
private static void addPixel(NativeImage natImage, List<CustomizableCube> cubes, float pixelSize, boolean onBorder, int u,
int v, float x, float y, float z, Direction dir) {
if (natImage.getLuminanceOrAlpha(u, v) != 0) {
Set<Direction> hide = new HashSet<>();
if (!onBorder) {
for (int i = 0; i < offsets.length; i++) {
int tU = u + offsets[i][1];
int tV = v + offsets[i][0];
if (tU >= 0 && tU < 64 && tV >= 0 && tV < 64 && natImage.getLuminanceOrAlpha(tU, tV) != 0) {
if (dir == Direction.NORTH)
hide.add(hiddenDirN[i]);
if (dir == Direction.SOUTH)
hide.add(hiddenDirS[i]);
if (dir == Direction.EAST)
hide.add(hiddenDirE[i]);
if (dir == Direction.WEST)
hide.add(hiddenDirW[i]);
if (dir == Direction.UP || dir == Direction.DOWN)
hide.add(hiddenDirUD[i]);
}
}
hide.add(dir);
}
cubes.addAll(CustomizableCubeListBuilder.create().texOffs(u - 2, v - 1)
.addBox(x, y, z, pixelSize, hide.toArray(new Direction[hide.size()])).getCubes());
// wrapper.setTextureOffset(u-2, v-1);
// wrapper.addCustomCuboid(x, y, z, pixelSize, pixelSize, pixelSize,
// hide.toArray(new Direction[hide.size()]));
}
}
}

View File

@ -0,0 +1,146 @@
package net.silentclient.client.mods.render.skins.renderlayers;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.silentclient.client.Client;
import net.silentclient.client.mixin.accessors.skins.PlayerEntityModelAccessor;
import net.silentclient.client.mixin.accessors.skins.PlayerSettings;
import net.silentclient.client.mods.render.skins.SkinUtil;
import net.silentclient.client.mods.render.skins.SkinsMod;
import net.silentclient.client.mods.render.skins.render.CustomizableModelPart;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;
public class BodyLayerFeatureRenderer
implements LayerRenderer<AbstractClientPlayer> {
private RenderPlayer playerRenderer;
private final boolean thinArms;
private static final Minecraft mc = Minecraft.getMinecraft();
public BodyLayerFeatureRenderer(
RenderPlayer playerRenderer) {
this.playerRenderer = playerRenderer;
thinArms = ((PlayerEntityModelAccessor)playerRenderer).client$hasThinArms();
bodyLayers.add(new Layer(0, false, EnumPlayerModelParts.LEFT_PANTS_LEG, Shape.LEGS, () -> playerRenderer.getMainModel().bipedLeftLeg, () -> Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Left Leg").getValBoolean()));
bodyLayers.add(new Layer(1, false, EnumPlayerModelParts.RIGHT_PANTS_LEG, Shape.LEGS, () -> playerRenderer.getMainModel().bipedRightLeg, () -> Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Right Leg").getValBoolean()));
bodyLayers.add(new Layer(2, false, EnumPlayerModelParts.LEFT_SLEEVE, thinArms ? Shape.ARMS_SLIM : Shape.ARMS, () -> playerRenderer.getMainModel().bipedLeftArm, () -> Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Left Arm").getValBoolean()));
bodyLayers.add(new Layer(3, true, EnumPlayerModelParts.RIGHT_SLEEVE, thinArms ? Shape.ARMS_SLIM : Shape.ARMS, () -> playerRenderer.getMainModel().bipedRightArm, () -> Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Right Arm").getValBoolean()));
bodyLayers.add(new Layer(4, false, EnumPlayerModelParts.JACKET, Shape.BODY, () -> playerRenderer.getMainModel().bipedBody, () -> Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Body").getValBoolean()));
}
@Override
public void doRenderLayer(AbstractClientPlayer player, float paramFloat1, float paramFloat2, float paramFloat3,
float deltaTick, float paramFloat5, float paramFloat6, float paramFloat7) {
if (!player.hasSkin() || player.isInvisible()) {
return;
}
if(mc.theWorld == null) {
return; // in a menu or something and the model gets rendered
}
if(mc.thePlayer.getPositionVector().squareDistanceTo(player.getPositionVector()) > Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Level Of Detail Distance").getValInt()*Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Level Of Detail Distance").getValInt())return;
PlayerSettings settings = (PlayerSettings) player;
// check for it being setup first to speedup the rendering
if(settings.client$getSkinLayers() == null && !setupModel(player, settings)) {
return; // no head layer setup and wasn't able to setup
}
//this.playerRenderer.bindTexture(player.getLocationSkin());
renderLayers(player, (CustomizableModelPart[]) settings.client$getSkinLayers(), deltaTick);
}
private boolean setupModel(AbstractClientPlayer abstractClientPlayerEntity, PlayerSettings settings) {
if(!SkinUtil.hasCustomSkin(abstractClientPlayerEntity)) {
return false; // default skin
}
SkinUtil.setup3dLayers(abstractClientPlayerEntity, settings, thinArms, null);
return true;
}
private final List<Layer> bodyLayers = new ArrayList<>();
class Layer{
int layersId;
boolean mirrored;
EnumPlayerModelParts modelPart;
Shape shape;
Supplier<ModelRenderer> vanillaGetter;
Supplier<Boolean> configGetter;
public Layer(int layersId, boolean mirrored, EnumPlayerModelParts modelPart, Shape shape,
Supplier<ModelRenderer> vanillaGetter, Supplier<Boolean> configGetter) {
this.layersId = layersId;
this.mirrored = mirrored;
this.modelPart = modelPart;
this.shape = shape;
this.vanillaGetter = vanillaGetter;
this.configGetter = configGetter;
}
}
private enum Shape {
HEAD(0), BODY(0.6f), LEGS(-0.2f), ARMS(0.4f), ARMS_SLIM(0.4f)
;
private final float yOffsetMagicValue;
private Shape(float yOffsetMagicValue) {
this.yOffsetMagicValue = yOffsetMagicValue;
}
}
public void renderLayers(AbstractClientPlayer abstractClientPlayer, CustomizableModelPart[] layers, float deltaTick) {
if(layers == null)return;
float pixelScaling = Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Voxel Size").getValFloat();
float heightScaling = 1.035f;
float widthScaling = Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Voxel Size").getValFloat();
// Overlay refuses to work correctly, this is a workaround for now
boolean redTint = abstractClientPlayer.hurtTime > 0 || abstractClientPlayer.deathTime > 0;
for(Layer layer : bodyLayers) {
if(abstractClientPlayer.isWearing(layer.modelPart) && !layer.vanillaGetter.get().isHidden && layer.configGetter.get()) {
GlStateManager.pushMatrix();
if(abstractClientPlayer.isSneaking()) {
GlStateManager.translate(0.0F, 0.2F, 0.0F);
}
layer.vanillaGetter.get().postRender(0.0625F);
if(layer.shape == Shape.ARMS) {
layers[layer.layersId].x = 0.998f*16;
} else if(layer.shape == Shape.ARMS_SLIM) {
layers[layer.layersId].x = 0.499f*16;
}
if(layer.shape == Shape.BODY) {
widthScaling = Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Body Voxel Width Size").getValFloat();
}else {
widthScaling = Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Voxel Size").getValFloat();
}
if(layer.mirrored) {
layers[layer.layersId].x *= -1;
}
GlStateManager.scale(0.0625, 0.0625, 0.0625);
GlStateManager.scale(widthScaling, heightScaling, pixelScaling);
layers[layer.layersId].y = layer.shape.yOffsetMagicValue;
layers[layer.layersId].render(redTint);
GlStateManager.popMatrix();
}
}
}
@Override
public boolean shouldCombineTextures() {
return false;
}
}

View File

@ -0,0 +1,90 @@
package net.silentclient.client.mods.render.skins.renderlayers;
import com.google.common.collect.Sets;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.client.renderer.entity.layers.LayerRenderer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.silentclient.client.Client;
import net.silentclient.client.mixin.accessors.skins.PlayerEntityModelAccessor;
import net.silentclient.client.mixin.accessors.skins.PlayerSettings;
import net.silentclient.client.mods.render.skins.SkinUtil;
import net.silentclient.client.mods.render.skins.SkinsMod;
import java.util.Set;
public class HeadLayerFeatureRenderer implements LayerRenderer<AbstractClientPlayer> {
private Set<Item> hideHeadLayers = Sets.newHashSet(Items.skull);
private final boolean thinArms;
private static final Minecraft mc = Minecraft.getMinecraft();
private RenderPlayer playerRenderer;
public HeadLayerFeatureRenderer(RenderPlayer playerRenderer) {
thinArms = ((PlayerEntityModelAccessor)playerRenderer).client$hasThinArms();
this.playerRenderer = playerRenderer;
}
@Override
public void doRenderLayer(AbstractClientPlayer player, float paramFloat1, float paramFloat2, float paramFloat3,
float deltaTick, float paramFloat5, float paramFloat6, float paramFloat7) {
if (!player.hasSkin() || player.isInvisible() || !Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Head").getValBoolean()) {
return;
}
if(mc.thePlayer.getPositionVector().squareDistanceTo(player.getPositionVector()) > Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Level Of Detail Distance").getValInt()*Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Level Of Detail Distance").getValInt())return;
ItemStack itemStack = player.getEquipmentInSlot(1); //TODO
if (itemStack != null && hideHeadLayers.contains(itemStack.getItem())) {
return;
}
PlayerSettings settings = (PlayerSettings) player;
// check for it being setup first to speedup the rendering
if(settings.client$getHeadLayers() == null && !setupModel(player, settings)) {
return; // no head layer setup and wasn't able to setup
}
//this.playerRenderer.bindTexture(player.getLocationSkin());
renderCustomHelmet(settings, player, deltaTick);
}
private boolean setupModel(AbstractClientPlayer abstractClientPlayerEntity, PlayerSettings settings) {
if(!SkinUtil.hasCustomSkin(abstractClientPlayerEntity)) {
return false; // default skin
}
SkinUtil.setup3dLayers(abstractClientPlayerEntity, settings, thinArms, null);
return true;
}
public void renderCustomHelmet(PlayerSettings settings, AbstractClientPlayer abstractClientPlayer, float deltaTick) {
if(settings.client$getHeadLayers() == null)return;
if(playerRenderer.getMainModel().bipedHead.isHidden)return;
float voxelSize = Client.getInstance().getSettingsManager().getSettingByClass(SkinsMod.class, "Head Voxel Size").getValFloat();
GlStateManager.pushMatrix();
if(abstractClientPlayer.isSneaking()) {
GlStateManager.translate(0.0F, 0.2F, 0.0F);
}
playerRenderer.getMainModel().bipedHead.postRender(0.0625F);
//this.getParentModel().head.translateAndRotate(matrixStack);
GlStateManager.scale(0.0625, 0.0625, 0.0625);
GlStateManager.scale(voxelSize, voxelSize, voxelSize);
// Overlay refuses to work correctly, this is a workaround for now
boolean tintRed = abstractClientPlayer.hurtTime > 0 || abstractClientPlayer.deathTime > 0;
settings.client$getHeadLayers().render(tintRed);
GlStateManager.popMatrix();
}
@Override
public boolean shouldCombineTextures() {
return false;
}
}

View File

@ -3,16 +3,31 @@ package net.silentclient.client.mods.settings;
import com.google.common.collect.Sets;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAITasks;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.ai.EntityLookHelper;
import net.minecraft.init.Blocks;
import net.silentclient.client.Client;
import net.silentclient.client.event.EventManager;
import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.EntityJoinLevelEvent;
import net.silentclient.client.mixin.accessors.EntityLookHelperAccessor;
import net.silentclient.client.mixin.ducks.EntityAITasksExt;
import net.silentclient.client.mixin.ducks.EntityLivingExt;
import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory;
import net.silentclient.client.mods.Setting;
import net.silentclient.client.mods.other.ai.FastTrig;
import net.silentclient.client.mods.other.ai.FixedEntityLookHelper;
import net.silentclient.client.utils.HUDCaching;
import net.silentclient.client.utils.NotificationUtils;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
public class FPSBoostMod extends Mod {
@ -82,9 +97,42 @@ public class FPSBoostMod extends Mod {
this.addBooleanSetting("Check glError",this, false); // ready
this.addBooleanSetting("Do memory debug",this, true); // ready
EventManager.register(new HUDCaching());
FastTrig.init();
}
@EventTarget
public void onJoinWorldEvent(EntityJoinLevelEvent event) {
if(!Client.getInstance().getSettingsManager().getSettingByClass(FPSBoostMod.class, "Optimized Entity Movement").getValBoolean()) {
return;
}
Entity entity = event.getEntity();
if (entity instanceof EntityLiving) {
EntityLiving living = (EntityLiving)entity;
Iterator<EntityAITasks.EntityAITaskEntry> it = ((List<EntityAITasks.EntityAITaskEntry>) ((EntityAITasksExt) ((EntityLivingExt)((Object)living)).client$getTasks()).client$getTaskEntries()).iterator();
while (it.hasNext()) {
EntityAITasks.EntityAITaskEntry obj = it.next();
if (!(obj instanceof EntityAITasks.EntityAITaskEntry)) continue;
EntityAITasks.EntityAITaskEntry task = obj;
if (task.action instanceof EntityAIWatchClosest) {
it.remove();
continue;
}
if (!(task.action instanceof EntityAILookIdle)) continue;
it.remove();
}
if (living.getLookHelper() == null || living.getLookHelper().getClass() == EntityLookHelper.class) {
EntityLookHelper oldHelper = living.getLookHelper();
((EntityLivingExt)((Object)living)).client$setLookHelper(new FixedEntityLookHelper(living));
((EntityLookHelperAccessor)((Object)living.getLookHelper())).setPosX(((EntityLookHelperAccessor)((Object)oldHelper)).getPosX());
((EntityLookHelperAccessor)((Object)living.getLookHelper())).setPosY(((EntityLookHelperAccessor)((Object)oldHelper)).getPosY());
((EntityLookHelperAccessor)((Object)living.getLookHelper())).setPosZ(((EntityLookHelperAccessor)((Object)oldHelper)).getPosZ());
((EntityLookHelperAccessor)((Object)living.getLookHelper())).setLooking(((EntityLookHelperAccessor)((Object)oldHelper)).isLooking());
((EntityLookHelperAccessor)((Object)living.getLookHelper())).setDeltaLookPitch(((EntityLookHelperAccessor)((Object)oldHelper)).getDeltaLookPitch());
((EntityLookHelperAccessor)((Object)living.getLookHelper())).setDeltaLookYaw(((EntityLookHelperAccessor)((Object)oldHelper)).getDeltaLookYaw());
}
}
}
public static boolean basicEnabled() {
return Client.getInstance().getSettingsManager().getSettingByClass(FPSBoostMod.class, "FPS Boost").getValBoolean();

View File

@ -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();
}

View File

@ -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<Color> getLatestColors(boolean ignoreOpacity) {
ArrayList<Color> 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;
}
}

View File

@ -13,6 +13,7 @@ public class RawInputHandler {
public static Mouse mouse;
public static int dx = 0;
public static int dy = 0;
public static Thread inputThread;
public static void init() {
controllers = ControllerEnvironment.getDefaultEnvironment().getControllers();
@ -44,9 +45,11 @@ public class RawInputHandler {
Minecraft.getMinecraft().mouseHelper = new MouseHelper();
Minecraft.getMinecraft().mouseHelper.grabMouseCursor();
Minecraft.getMinecraft().mouseHelper.ungrabMouseCursor();
inputThread.interrupt();
} else {
Client.logger.info("[SC]: Enabling Raw Mouse Input");
Minecraft.getMinecraft().mouseHelper = new RawMouseHelper();
startThread();
Minecraft.getMinecraft().mouseHelper.grabMouseCursor();
Minecraft.getMinecraft().mouseHelper.ungrabMouseCursor();
}
@ -59,8 +62,13 @@ public class RawInputHandler {
}
public static void startThread() {
Thread inputThread = new Thread(() -> {
inputThread = new Thread(() -> {
while(true){
if (Thread.currentThread().isInterrupted()) {
break;
}
// reload();
// rescan();
if (mouse != null && Minecraft.getMinecraft().currentScreen == null) {
mouse.poll();
dx += (int)mouse.getX().getPollData();
@ -74,7 +82,7 @@ public class RawInputHandler {
try {
Thread.sleep(1);
} catch(InterruptedException e) {
e.printStackTrace();
Client.logger.catching(e);
}
}
});

View File

@ -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<String, EntityPlayer> 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();
}
}

View File

@ -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,10 @@ public class GlobalSettings {
public boolean configsMigrated;
public boolean packsPanoramaEnabled;
public ArrayList<FeaturedServers.FeaturedServerInfo> savedFeaturedServers;
public ArrayList<GlobalSettings.CustomColor> latestColors;
public boolean resourcePacksFetched;
public ArrayList<String> usedResourcePacks;
public GlobalSettings() {
this.config = "Default.txt";
@ -20,6 +25,9 @@ public class GlobalSettings {
this.displayedTutorial = false;
this.packsPanoramaEnabled = true;
this.savedFeaturedServers = new ArrayList<>();
this.latestColors = new ArrayList<>();
this.resourcePacksFetched = false;
this.usedResourcePacks = new ArrayList<>();
}
public String getConfig() {
@ -73,6 +81,57 @@ public class GlobalSettings {
this.savedFeaturedServers = savedFeaturedServers;
}
public ArrayList<CustomColor> 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 boolean isResourcePacksFetched() {
return resourcePacksFetched;
}
public void setResourcePacksFetched(boolean resourcePacksFetched) {
this.resourcePacksFetched = resourcePacksFetched;
}
public ArrayList<String> getUsedResourcePacks() {
if(usedResourcePacks == null) {
this.usedResourcePacks = new ArrayList<>();
}
return usedResourcePacks;
}
public void addToUsedResourcePacks(String pack) {
if(!this.usedResourcePacks.contains(pack)) {
this.usedResourcePacks.add(pack);
}
}
public void save() {
try {
FileOutputStream outputStream = new FileOutputStream(Client.getInstance().getGlobalSettingsFile());
@ -84,4 +143,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;
}
}
}

View File

@ -4,6 +4,8 @@
"refmap": "mixins.SilentClient.refmap.json",
"mixins": [
"accessors.EntityArrowAccessor",
"accessors.EntityLivingAccessor",
"accessors.EntityLookHelperAccessor",
"accessors.FontRendererAccessor",
"accessors.GuiAccessor",
"accessors.GuiInGameAccessor",
@ -32,8 +34,11 @@
"mixins.ChunkRenderDispatcherMixin",
"mixins.CommandHandlerMixin",
"mixins.EffectRendererMixin",
"mixins.EntityAITasksMixin",
"mixins.EntityFXMixin",
"mixins.EntityLivingBaseMixin",
"mixins.EntityLivingMixin",
"mixins.EntityLookHelperMixin",
"mixins.EntityMixin",
"mixins.EntityOtherPlayerMPMixin",
"mixins.EntityPacketsMixin",
@ -123,6 +128,9 @@
"mixins.emotes.EntityPlayerMixin",
"mixins.emotes.MinecraftMixin",
"mixins.emotes.RenderPlayerMixin",
"mixins.lwjgl.WindowsDisplayMixin"
"mixins.lwjgl.WindowsDisplayMixin",
"mixins.skins.PlayerMixin",
"mixins.skins.PlayerRendererMixin",
"mixins.skins.RendererLivingEntityMixin"
]
}

View File

@ -10,4 +10,7 @@ public net.minecraft.client.renderer.tileentity.TileEntityBannerRenderer$TimedBa
public net.minecraft.client.renderer.tileentity.TileEntityBannerRenderer$TimedBannerTexture <init>()V # constructor
# BlockRedstoneTorch
public net.minecraft.block.BlockRedstoneTorch$Toggle
public net.minecraft.block.BlockRedstoneTorch$Toggle
# EntityAITasks
public net.minecraft.entity.ai.EntityAITasks$EntityAITaskEntry