aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorninjaguardian <110734253+ninjaguardian@users.noreply.github.com>2025-06-25 21:23:42 -0500
committerGitHub <noreply@github.com>2025-06-25 22:23:42 -0400
commit8d0681ad13f9786767296d29ca77ace556421404 (patch)
tree76e8f4af4d6fa82b60e505cb7ef7a3d40ff4b3b0 /src/main/java
parent92d852c1107ff9d8da7a7fb612e5804fa1d871f4 (diff)
downloadSkyblocker-8d0681ad13f9786767296d29ca77ace556421404.tar.gz
Skyblocker-8d0681ad13f9786767296d29ca77ace556421404.tar.bz2
Skyblocker-8d0681ad13f9786767296d29ca77ace556421404.zip
Get rid of ETF log spam (#1404)
* Get rid of ETF log spam Added checks to exit if it would cause an error * Add checks to not cache empty skins Also prevents invalid URIs from accidentally setting isSkyblockSkinTexture to true in PlayerSkinTextureDownloaderMixin.java
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/item/PlayerHeadHashCache.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/item/PlayerHeadHashCache.java b/src/main/java/de/hysky/skyblocker/skyblock/item/PlayerHeadHashCache.java
index eef14219..40b0047a 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/item/PlayerHeadHashCache.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/item/PlayerHeadHashCache.java
@@ -28,6 +28,7 @@ public class PlayerHeadHashCache {
.map(profile -> JsonParser.parseString(profile).getAsJsonObject())
.map(profile -> profile.getAsJsonObject("textures").getAsJsonObject("SKIN").get("url").getAsString())
.map(PlayerHeadHashCache::getSkinHash)
+ .filter(hash -> hash != null && !hash.isEmpty())
.mapToInt(String::hashCode)
.forEach(CACHE::add);
@@ -39,6 +40,10 @@ public class PlayerHeadHashCache {
//From MinecraftProfileTexture#getHash
public static String getSkinHash(String url) {
+ if (url != null && url.equals("ETF pre test, skin check")) {
+ return "";
+ }
+
try {
return FilenameUtils.getBaseName(new URI(url).getPath());
} catch (Exception e) {