Skip to content

Commit

Permalink
use id connector
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Aug 28, 2024
1 parent ce8fdbf commit ddd8b92
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public Pair<Component, SwitchyUIPosition> getPreviewComponent(String presetName)

FlowLayout originsFlow = Containers.horizontalFlow(Sizing.content(), Sizing.content());
originsFlow.verticalAlignment(VerticalAlignment.CENTER);
if (!FabricLoader.getInstance().isModLoaded("connectormod")) originsFlow.child(Components.item(ORB_OF_ORIGIN.getDefaultStack()).margins(Insets.right(2)));
if (!FabricLoader.getInstance().isModLoaded("connector")) originsFlow.child(Components.item(ORB_OF_ORIGIN.getDefaultStack()).margins(Insets.right(2)));
List<String> names = new ArrayList<>(origins.values().stream().map(OriginsClientModule::safeGetName).map(Text::getString).toList());
Collections.reverse(names);
originsFlow.child(Components.label(Feedback.literal(String.join(" | ", names)).setStyle(Style.EMPTY.withColor(Formatting.GRAY))));
Expand Down
2 changes: 1 addition & 1 deletion compat/src/main/java/folk/sisby/switchy/SwitchyCompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void onInitialize() {
if (FabricLoader.getInstance().isModLoaded("styled-nicknames")) StyledNicknamesModule.register();
if (FabricLoader.getInstance().isModLoaded("fabrictailor")) FabricTailorModule.register();
if (FabricLoader.getInstance().isModLoaded("origins")) OriginsModule.register();
if (FabricLoader.getInstance().isModLoaded("apoli") && !FabricLoader.getInstance().isModLoaded("connectormod")) ApoliModule.register();
if (FabricLoader.getInstance().isModLoaded("apoli") && !FabricLoader.getInstance().isModLoaded("connector")) ApoliModule.register();
if (FabricLoader.getInstance().isModLoaded("pehkui")) PehkuiModule.register();
if (FabricLoader.getInstance().isModLoaded("fabrication")) FabricationArmorModule.register();
LOGGER.info("[Switchy Compat] Initialized!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static OriginComponent getForgeComponent(ServerPlayerEntity player) {

@SuppressWarnings("deprecation")
private static OriginComponent getComponent(ServerPlayerEntity player) {
return FabricLoader.getInstance().isModLoaded("connectormod") ? getForgeComponent(player) : ModComponents.ORIGIN.get(player);
return FabricLoader.getInstance().isModLoaded("connector") ? getForgeComponent(player) : ModComponents.ORIGIN.get(player);
}

private static void setOrigin(ServerPlayerEntity player, OriginLayer layer, Origin origin) {
Expand Down

0 comments on commit ddd8b92

Please sign in to comment.