3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-25 15:50:14 +01:00

Work around Bedrock players looking like Steve

Dieser Commit ist enthalten in:
Camotoy 2024-06-20 15:24:39 -04:00
Ursprung f49acb2f7c
Commit dd9d5f321b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F
2 geänderte Dateien mit 14 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -309,6 +309,15 @@ public class SkinManager {
return null; return null;
} }
if (DEFAULT_FLOODGATE_STEVE.equals(skinUrl)) {
// https://github.com/GeyserMC/Floodgate/commit/00b8b1b6364116ff4bc9b00e2015ce35bae8abb1 ensures that
// Bedrock players on online-mode servers will always have a textures property. However, this skin is
// also sent our way, and isn't overwritten. It's very likely that this skin is *only* a placeholder,
// and no one should ever be using it outside of Floodgate, and therefore no one wants to see this
// specific Steve skin.
return null;
}
boolean isAlex = skinTexture.has("metadata"); boolean isAlex = skinTexture.has("metadata");
String capeUrl = null; String capeUrl = null;
@ -322,5 +331,7 @@ public class SkinManager {
return new GameProfileData(skinUrl, capeUrl, isAlex); return new GameProfileData(skinUrl, capeUrl, isAlex);
} }
private static final String DEFAULT_FLOODGATE_STEVE = "https://textures.minecraft.net/texture/31f477eb1a7beee631c2ca64d06f8f68fa93a3386d04452ab27f43acdf1b60cb";
} }
} }

Datei anzeigen

@ -29,9 +29,6 @@ import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.cache.Cache; import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheBuilder;
import it.unimi.dsi.fastutil.bytes.ByteArrays; import it.unimi.dsi.fastutil.bytes.ByteArrays;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable; import org.checkerframework.checker.nullness.qual.Nullable;
import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.GeyserImpl;
@ -56,7 +53,9 @@ import java.io.IOException;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.*; import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.*; import java.util.concurrent.*;
import java.util.function.Predicate; import java.util.function.Predicate;