Skip to content

Commit

Permalink
use modid overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Nov 26, 2024
1 parent c434b98 commit 066e1bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public VotingOptionButtonWidget(Position position, int width, int height, Voting
this.prohibited = prohibited;
if (!modIconCache.containsKey(option.id())) {
modIconCache.put(option.id(), Identifier.of(BallotBox.ID, option.id() + "_icon"));
Optional<ModContainer> mod = FabricLoader.getInstance().getModContainer(option.id())
Optional<ModContainer> mod = FabricLoader.getInstance().getModContainer(option.mod_id().isPresent() ? option.mod_id().get() : option.id())
.or(() -> FabricLoader.getInstance().getModContainer(option.id().replace("_", "-")))
.or(() -> FabricLoader.getInstance().getModContainer(option.id().replace("_", "")));
NativeImageBackedTexture icon = mod.isPresent() ? ModMetaUtil.getIcon(mod.get(), 64 * this.client.options.getGuiScale().getValue()) : ModMetaUtil.getMissingIcon();
Expand Down

0 comments on commit 066e1bb

Please sign in to comment.