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

Ensure packs actually load

Dieser Commit ist enthalten in:
onebeastchris 2024-06-20 21:17:32 +02:00
Ursprung ba78dbaf34
Commit de54a5bde9
4 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -82,11 +82,12 @@ public class GeyserUrlPackCodec extends UrlPackCodec {
} else if (pack != null) {
this.fallback = pack;
}
});
}).join(); // Needed to ensure that we don't attempt to read a pack before downloading/checking it
} catch (Exception e) {
throw new IllegalArgumentException("Failed to download pack from the url %s (reason: %s)!".formatted(url, e.getMessage()));
}
}
return ResourcePackLoader.readPack(this);
}

Datei anzeigen

@ -235,11 +235,13 @@ public class ResourcePackLoader implements RegistryLoader<Path, Map<String, Reso
packMap.put(pack.manifest().header().uuid().toString(), pack);
} catch (Exception e) {
instance.getLogger().error(GeyserLocale.getLocaleStringLog("geyser.resource_pack.broken", url));
instance.getLogger().error(e.getMessage());
if (instance.getLogger().isDebug()) {
e.printStackTrace();
}
}
}
return packMap;
}

Datei anzeigen

@ -51,7 +51,7 @@ import java.util.stream.Collectors;
import static org.geysermc.geyser.scoreboard.UpdateType.*;
public final class Scoreboard {
private static final boolean SHOW_SCOREBOARD_LOGS = Boolean.parseBoolean(System.getProperty("Geyser.ShowScoreboardLogs", "true"));
private static final boolean SHOW_SCOREBOARD_LOGS = Boolean.parseBoolean(System.getProperty("Geyser.ShowScoreboardLogs", "false"));
private static final boolean ADD_TEAM_SUGGESTIONS = Boolean.parseBoolean(System.getProperty("Geyser.AddTeamSuggestions", "true"));
private final GeyserSession session;

Datei anzeigen

@ -48,7 +48,7 @@ public final class ScoreboardUpdater extends Thread {
static {
GeyserConfiguration config = GeyserImpl.getInstance().getConfig();
FIRST_SCORE_PACKETS_PER_SECOND_THRESHOLD = Math.min(config.getScoreboardPacketThreshold(), SECOND_SCORE_PACKETS_PER_SECOND_THRESHOLD);
DEBUG_ENABLED = config.isDebugMode();
DEBUG_ENABLED = Boolean.parseBoolean(System.getProperty("Geyser.ShowScoreboardLogs", "false")) && config.isDebugMode();
}
private final GeyserImpl geyser = GeyserImpl.getInstance();