From aab79fda28a6c4f7de50261eb5112d46ddda8365 Mon Sep 17 00:00:00 2001 From: KilaBash Date: Mon, 17 Jul 2023 09:07:14 +0800 Subject: [PATCH] fix architectury dependency --- .../multiblock/part/MaintenanceHatchPartMachine.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/MaintenanceHatchPartMachine.java b/common/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/MaintenanceHatchPartMachine.java index 700c68deec..7441f37afb 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/MaintenanceHatchPartMachine.java +++ b/common/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/MaintenanceHatchPartMachine.java @@ -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; @@ -46,6 +45,7 @@ import java.util.Arrays; import java.util.List; import java.util.Objects; +import java.util.function.Supplier; @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault @@ -364,14 +364,14 @@ public Widget createUIWidget() { return group; } - private static Component getTextWidgetText(String type, FloatSupplier multiplier) { + private static Component getTextWidgetText(String type, Supplier 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))); } } \ No newline at end of file