3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-03 16:31:14 +02:00

Add device type to debug to be able to isolate platform specific requirements

Dieser Commit ist enthalten in:
onebeastchris 2024-06-24 18:30:34 +02:00
Ursprung 86f13898c7
Commit 27659d0f2b
2 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -305,7 +305,7 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
// If a remote pack ends up here, that usually implies that a client was not able to download the pack
if (codec instanceof UrlPackCodec urlPackCodec) {
ResourcePackLoader.testUrlPack(urlPackCodec);
ResourcePackLoader.testUrlPack(session, urlPackCodec);
}
data.setChunkIndex(packet.getChunkIndex());

Datei anzeigen

@ -42,6 +42,7 @@ import org.geysermc.geyser.pack.SkullResourcePackManager;
import org.geysermc.geyser.pack.path.GeyserPathPackCodec;
import org.geysermc.geyser.pack.url.GeyserUrlPackCodec;
import org.geysermc.geyser.registry.Registries;
import org.geysermc.geyser.session.GeyserSession;
import org.geysermc.geyser.text.GeyserLocale;
import org.geysermc.geyser.util.FileUtils;
import org.geysermc.geyser.util.WebUtils;
@ -252,10 +253,12 @@ public class ResourcePackLoader implements RegistryLoader<Path, Map<String, Reso
*
* @param codec the codec of the resource pack that wasn't successfully downloaded by a Bedrock client.
*/
public static void testUrlPack(UrlPackCodec codec) {
public static void testUrlPack(GeyserSession session, UrlPackCodec codec) {
if (CACHED_FAILED_PACKS.getIfPresent(codec.url()) == null) {
CACHED_FAILED_PACKS.put(codec.url(), codec);
GeyserImpl.getInstance().getLogger().warning("A client was not able to download the resource pack at %s. Is it still available? Running check now:");
GeyserImpl.getInstance().getLogger().warning("""
A Bedrock client (%s, playing on %s / %s) was not able to download the resource pack at %s. Is it still available? Running check now.
""".formatted(session.bedrockUsername(), session.getClientData().getDeviceOs().name(), session.getClientData().getDeviceId(), codec.url()));
downloadPack(codec.url(), true);
}
}