Skip to content

Commit

Permalink
fix architectury dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Yefancy committed Jul 17, 2023
1 parent 22ef8e4 commit aab79fd
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.lowdragmc.lowdraglib.syncdata.annotation.DescSynced;
import com.lowdragmc.lowdraglib.syncdata.annotation.Persisted;
import com.lowdragmc.lowdraglib.syncdata.field.ManagedFieldHolder;
import dev.architectury.utils.value.FloatSupplier;
import lombok.Getter;
import lombok.Setter;
import net.minecraft.MethodsReturnNonnullByDefault;
Expand All @@ -46,6 +45,7 @@
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.function.Supplier;

@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
Expand Down Expand Up @@ -364,14 +364,14 @@ public Widget createUIWidget() {
return group;
}

private static Component getTextWidgetText(String type, FloatSupplier multiplier) {
private static Component getTextWidgetText(String type, Supplier<Float> multiplier) {
Component tooltip;
if (multiplier.getAsFloat() == 1.0) {
if (multiplier.get() == 1.0) {
tooltip = Component.translatable("gtceu.maintenance.configurable_" + type + ".unchanged_description");
} else {
tooltip = Component.translatable("gtceu.maintenance.configurable_" + type + ".changed_description", multiplier.getAsFloat());
tooltip = Component.translatable("gtceu.maintenance.configurable_" + type + ".changed_description", multiplier.get());
}
return Component.translatable("gtceu.maintenance.configurable_" + type, multiplier.getAsFloat()).setStyle(Style.EMPTY.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, tooltip)));
return Component.translatable("gtceu.maintenance.configurable_" + type, multiplier.get()).setStyle(Style.EMPTY.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, tooltip)));
}

}

0 comments on commit aab79fd

Please sign in to comment.