From de54a5bde9c2a51e230e0133b4e8ec8471d6326e Mon Sep 17 00:00:00 2001 From: onebeastchris Date: Thu, 20 Jun 2024 21:17:32 +0200 Subject: [PATCH] Ensure packs actually load --- .../java/org/geysermc/geyser/pack/url/GeyserUrlPackCodec.java | 3 ++- .../geysermc/geyser/registry/loader/ResourcePackLoader.java | 2 ++ .../main/java/org/geysermc/geyser/scoreboard/Scoreboard.java | 2 +- .../java/org/geysermc/geyser/scoreboard/ScoreboardUpdater.java | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/pack/url/GeyserUrlPackCodec.java b/core/src/main/java/org/geysermc/geyser/pack/url/GeyserUrlPackCodec.java index 2c561fe1a..f8b5ba7fb 100644 --- a/core/src/main/java/org/geysermc/geyser/pack/url/GeyserUrlPackCodec.java +++ b/core/src/main/java/org/geysermc/geyser/pack/url/GeyserUrlPackCodec.java @@ -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); } diff --git a/core/src/main/java/org/geysermc/geyser/registry/loader/ResourcePackLoader.java b/core/src/main/java/org/geysermc/geyser/registry/loader/ResourcePackLoader.java index a790c3c6e..71f139973 100644 --- a/core/src/main/java/org/geysermc/geyser/registry/loader/ResourcePackLoader.java +++ b/core/src/main/java/org/geysermc/geyser/registry/loader/ResourcePackLoader.java @@ -235,11 +235,13 @@ public class ResourcePackLoader implements RegistryLoader