Skip to content

Commit

Permalink
Error if compat can't be initialized properly
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Sep 14, 2024
1 parent f03b1f1 commit d13a129
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public static void init() {
if (!Mods.INDIUM.isLoaded()) {
ClientPlayConnectionEvents.JOIN.register(SodiumCompat::sendNoIndiumWarning);
}

boolean compatInitialized = false;
for (SpriteUtilCompat value : SpriteUtilCompat.values()) {
if (value.doesWork.get()) {
Minecraft mc = Minecraft.getInstance();
Expand All @@ -48,9 +50,13 @@ public static void init() {
TextureAtlasSprite sawSprite = atlas.apply(SAW_TEXTURE);
value.markSpriteAsActive.accept(sawSprite);
});
compatInitialized = true;
break;
}
}
if (!compatInitialized) {
Create.LOGGER.error("Create's Sodium compat errored and has been partially disabled. Report this!");
}
}

public static void sendNoIndiumWarning(ClientPacketListener handler, PacketSender sender, Minecraft mc) {
Expand Down

0 comments on commit d13a129

Please sign in to comment.