Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/main/java/com/lambda/mixin/render/TooltipComponentMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ private static void of(TooltipData tooltipData, CallbackInfoReturnable<TooltipCo
return;
}

if (MapPreview.INSTANCE.isEnabled()) cir.setReturnValue((switch (tooltipData) {
case MapPreview.MapComponent mapComponent -> mapComponent;
case BundleTooltipData bundleTooltipData -> new BundleTooltipComponent(bundleTooltipData.contents());
case ProfilesTooltipComponent.ProfilesData profilesData -> new ProfilesTooltipComponent(profilesData);
default -> throw new IllegalArgumentException("Unknown TooltipComponent");
}));
if (MapPreview.INSTANCE.isEnabled()) switch (tooltipData) {
case MapPreview.MapComponent mapComponent -> cir.setReturnValue(mapComponent);
case BundleTooltipData bundleTooltipData -> cir.setReturnValue(new BundleTooltipComponent(bundleTooltipData.contents()));
case ProfilesTooltipComponent.ProfilesData profilesData -> cir.setReturnValue(new ProfilesTooltipComponent(profilesData));
default -> {} // ignore
}
}
}