From ba255771e382d0aadddb2b4e11f49e0cdda18cae Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Tue, 13 Feb 2024 15:36:02 +0100 Subject: [PATCH 1/2] fix: add support for backpack skins --- .../mcpatcher/cit/ui/icons/arrow_circle_red.properties | 3 ++- src/custom-resources.js | 3 +++ src/stats/items/processing.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/resourcepacks/Hypixel_Plus/assets/minecraft/mcpatcher/cit/ui/icons/arrow_circle_red.properties b/public/resourcepacks/Hypixel_Plus/assets/minecraft/mcpatcher/cit/ui/icons/arrow_circle_red.properties index f95da95dc3..ab591c605e 100755 --- a/public/resourcepacks/Hypixel_Plus/assets/minecraft/mcpatcher/cit/ui/icons/arrow_circle_red.properties +++ b/public/resourcepacks/Hypixel_Plus/assets/minecraft/mcpatcher/cit/ui/icons/arrow_circle_red.properties @@ -1,3 +1,4 @@ items=minecraft:skull +damage=3 texture=arrow_circle_red -nbt.display.Name=Reset Heart of the Mountain \ No newline at end of file +nbt.display.Name=\u00A7cReset Heart of the Mountain \ No newline at end of file diff --git a/src/custom-resources.js b/src/custom-resources.js index ebafe4b893..97e243d450 100644 --- a/src/custom-resources.js +++ b/src/custom-resources.js @@ -351,6 +351,9 @@ async function loadResourcePacks() { } let regex = properties[property]; + if (regex.includes("\\u00A7")) { + regex = regex.toString().replace(/\\u00A7[0-9a-fk-or]/g, ""); + } if (regex.startsWith("ipattern:")) { regex = mm.makeRe(regex.substring(9), { nocase: true }); diff --git a/src/stats/items/processing.js b/src/stats/items/processing.js index 8d3fe2c58f..a6d25cbfe6 100644 --- a/src/stats/items/processing.js +++ b/src/stats/items/processing.js @@ -283,6 +283,7 @@ export async function processItems(base64, source, customTextures = false, packs const customTexture = getTexture(item, { ignore_id: false, pack_ids: packs, + hotm: true, }); if (customTexture) { From 48da1a6f1a84f49c3690971d472503a0d14a5298 Mon Sep 17 00:00:00 2001 From: DuckySoLucky Date: Tue, 13 Feb 2024 15:53:49 +0100 Subject: [PATCH 2/2] perf: use hotm option only when backapck icons --- src/lib.js | 4 ++-- src/stats/items/processing.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.js b/src/lib.js index 21cd402df1..bb67cd2670 100644 --- a/src/lib.js +++ b/src/lib.js @@ -235,9 +235,9 @@ export async function getStats( console.debug(`${options.debugId}: getStats returned. (${Date.now() - timeStarted}ms)`); if (options.updateLeaderboards === true) { - /*stats.updateLeaderboardData(profile.uuid, allProfiles, { + stats.updateLeaderboardData(profile.uuid, allProfiles, { debugId: `${helper.getClusterId()}/${profile.uuid}@updateLeaderboardData`, - });*/ + }); } return output; diff --git a/src/stats/items/processing.js b/src/stats/items/processing.js index a6d25cbfe6..ddc76a87cd 100644 --- a/src/stats/items/processing.js +++ b/src/stats/items/processing.js @@ -283,7 +283,7 @@ export async function processItems(base64, source, customTextures = false, packs const customTexture = getTexture(item, { ignore_id: false, pack_ids: packs, - hotm: true, + hotm: source === "storage_icons", }); if (customTexture) {