From aa448c5fd0b44a24df67a2af21f0b7670f2accdd Mon Sep 17 00:00:00 2001 From: Josiah Roberts Date: Fri, 29 Dec 2023 13:24:39 -0500 Subject: [PATCH] Spotless --- .../integration/hwyla/provider/ConverterDataProvider.java | 6 ++++-- .../integration/hwyla/provider/DiodeDataProvider.java | 6 ++++-- .../hwyla/provider/PrimitivePumpDataProvider.java | 1 - .../hwyla/provider/RecipeLogicDataProvider.java | 1 - .../hwyla/provider/SteamBoilerDataProvider.java | 3 ++- .../theoneprobe/provider/ConverterInfoProvider.java | 8 ++++++-- .../theoneprobe/provider/CoverInfoProvider.java | 3 ++- .../provider/ElectricContainerInfoProvider.java | 3 --- .../theoneprobe/provider/LaserContainerInfoProvider.java | 4 +--- .../theoneprobe/provider/PrimitivePumpInfoProvider.java | 5 +++-- .../theoneprobe/provider/RecipeLogicInfoProvider.java | 8 ++++---- .../theoneprobe/provider/SteamBoilerInfoProvider.java | 3 ++- .../theoneprobe/provider/WorkableInfoProvider.java | 4 +--- 13 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/main/java/gregtech/integration/hwyla/provider/ConverterDataProvider.java b/src/main/java/gregtech/integration/hwyla/provider/ConverterDataProvider.java index 6fbf435dabf..593832936cc 100644 --- a/src/main/java/gregtech/integration/hwyla/provider/ConverterDataProvider.java +++ b/src/main/java/gregtech/integration/hwyla/provider/ConverterDataProvider.java @@ -71,13 +71,15 @@ protected NBTTagCompound getNBTData(ConverterTrait capability, NBTTagCompound ta TextFormatting.RESET + " (" + TextFormattingUtil.formatNumbers(amperage) + "A)"); } else { tooltip.add(I18n.format("gregtech.top.transform_input") + " " + - TextFormattingUtil.formatNumbers(FeCompat.toFe(voltage * amperage, FeCompat.ratio(true))) + " FE"); + TextFormattingUtil.formatNumbers(FeCompat.toFe(voltage * amperage, FeCompat.ratio(true))) + + " FE"); } } else { tooltip.add(I18n.format("gregtech.top.convert_eu")); if (accessor.getSide() == frontFacing) { tooltip.add(I18n.format("gregtech.top.transform_output") + " " + - TextFormattingUtil.formatNumbers(FeCompat.toFe(voltage * amperage, FeCompat.ratio(false))) + " FE"); + TextFormattingUtil.formatNumbers(FeCompat.toFe(voltage * amperage, FeCompat.ratio(false))) + + " FE"); } else { tooltip.add(I18n.format("gregtech.top.transform_input") + " " + voltageName + TextFormatting.RESET + " (" + TextFormattingUtil.formatNumbers(amperage) + "A)"); diff --git a/src/main/java/gregtech/integration/hwyla/provider/DiodeDataProvider.java b/src/main/java/gregtech/integration/hwyla/provider/DiodeDataProvider.java index bcbc60964b9..69e38bfaad7 100644 --- a/src/main/java/gregtech/integration/hwyla/provider/DiodeDataProvider.java +++ b/src/main/java/gregtech/integration/hwyla/provider/DiodeDataProvider.java @@ -60,9 +60,11 @@ protected NBTTagCompound getNBTData(IEnergyContainer capability, NBTTagCompound final EnumFacing frontFacing = EnumFacing.byIndex(tag.getInteger("FrontFacing")); if (accessor.getSide() == frontFacing) { // output side - tooltip.add(I18n.format("gregtech.top.transform_output") + " " + TextFormattingUtil.formatNumbers(outputAmperage) + " A"); + tooltip.add(I18n.format("gregtech.top.transform_output") + " " + + TextFormattingUtil.formatNumbers(outputAmperage) + " A"); } else { - tooltip.add(I18n.format("gregtech.top.transform_input") + " " + TextFormattingUtil.formatNumbers(inputAmperage) + " A"); + tooltip.add(I18n.format("gregtech.top.transform_input") + " " + + TextFormattingUtil.formatNumbers(inputAmperage) + " A"); } } return tooltip; diff --git a/src/main/java/gregtech/integration/hwyla/provider/PrimitivePumpDataProvider.java b/src/main/java/gregtech/integration/hwyla/provider/PrimitivePumpDataProvider.java index 0224be61570..3598647818f 100644 --- a/src/main/java/gregtech/integration/hwyla/provider/PrimitivePumpDataProvider.java +++ b/src/main/java/gregtech/integration/hwyla/provider/PrimitivePumpDataProvider.java @@ -3,7 +3,6 @@ import gregtech.api.GTValues; import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; import gregtech.api.metatileentity.multiblock.IPrimitivePump; - import gregtech.api.util.TextFormattingUtil; import net.minecraft.client.resources.I18n; diff --git a/src/main/java/gregtech/integration/hwyla/provider/RecipeLogicDataProvider.java b/src/main/java/gregtech/integration/hwyla/provider/RecipeLogicDataProvider.java index bcb4e4d9181..655dd57aa20 100644 --- a/src/main/java/gregtech/integration/hwyla/provider/RecipeLogicDataProvider.java +++ b/src/main/java/gregtech/integration/hwyla/provider/RecipeLogicDataProvider.java @@ -24,7 +24,6 @@ import mcp.mobius.waila.api.IWailaRegistrar; import org.jetbrains.annotations.NotNull; -import java.text.NumberFormat; import java.util.List; public class RecipeLogicDataProvider extends CapabilityDataProvider { diff --git a/src/main/java/gregtech/integration/hwyla/provider/SteamBoilerDataProvider.java b/src/main/java/gregtech/integration/hwyla/provider/SteamBoilerDataProvider.java index 845c35b68e1..0baaab2927f 100644 --- a/src/main/java/gregtech/integration/hwyla/provider/SteamBoilerDataProvider.java +++ b/src/main/java/gregtech/integration/hwyla/provider/SteamBoilerDataProvider.java @@ -66,7 +66,8 @@ public List getWailaBody(ItemStack itemStack, List tooltip, IWai // Creating steam if (steamRate > 0 && hasWater) { - tooltip.add(I18n.format("gregtech.top.energy_production") + ": " + TextFormattingUtil.formatNumbers(steamRate / 10) + " L/t " + + tooltip.add(I18n.format("gregtech.top.energy_production") + ": " + + TextFormattingUtil.formatNumbers(steamRate / 10) + " L/t " + I18n.format(Materials.Steam.getUnlocalizedName())); } diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/ConverterInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/ConverterInfoProvider.java index 5eef1f346b8..2ef4b0e3e05 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/ConverterInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/ConverterInfoProvider.java @@ -49,12 +49,16 @@ protected void addProbeInfo(@NotNull ConverterTrait capability, @NotNull IProbeI TextFormatting.GREEN + " (" + TextFormattingUtil.formatNumbers(amperage) + "A)"); } else { probeInfo.text(TextStyleClass.INFO + "{*gregtech.top.transform_input*} " + TextFormatting.RED + - TextFormattingUtil.formatNumbers(FeCompat.toFe(capability.getVoltage() * amperage, FeCompat.ratio(true))) + " FE"); + TextFormattingUtil.formatNumbers( + FeCompat.toFe(capability.getVoltage() * amperage, FeCompat.ratio(true))) + + " FE"); } } else { if (data.getSideHit() == facing) { probeInfo.text(TextStyleClass.INFO + "{*gregtech.top.transform_output*} " + TextFormatting.RED + - TextFormattingUtil.formatNumbers(FeCompat.toFe(capability.getVoltage() * amperage, FeCompat.ratio(false))) + " FE"); + TextFormattingUtil.formatNumbers( + FeCompat.toFe(capability.getVoltage() * amperage, FeCompat.ratio(false))) + + " FE"); } else { probeInfo.text(TextStyleClass.INFO + "{*gregtech.top.transform_input*} " + voltageN + TextFormatting.GREEN + " (" + TextFormattingUtil.formatNumbers(amperage) + "A)"); diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/CoverInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/CoverInfoProvider.java index e042aa7598d..6656fcc9d7e 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/CoverInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/CoverInfoProvider.java @@ -204,7 +204,8 @@ private static void transferRateText(@NotNull IProbeInfo probeInfo, @NotNull IIO private static void transferModeText(@NotNull IProbeInfo probeInfo, @NotNull TransferMode mode, @NotNull String rateUnit, int rate, boolean hasFilter) { String text = TextStyleClass.OK + IProbeInfo.STARTLOC + mode.getName() + IProbeInfo.ENDLOC; - if (!hasFilter && mode != TransferMode.TRANSFER_ANY) text += TextStyleClass.LABEL + " " + TextFormattingUtil.formatNumbers(rate) + rateUnit; + if (!hasFilter && mode != TransferMode.TRANSFER_ANY) + text += TextStyleClass.LABEL + " " + TextFormattingUtil.formatNumbers(rate) + rateUnit; probeInfo.text(text); } diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/ElectricContainerInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/ElectricContainerInfoProvider.java index ff983ac357a..4b2e970d7c6 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/ElectricContainerInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/ElectricContainerInfoProvider.java @@ -3,7 +3,6 @@ import gregtech.api.GTValues; import gregtech.api.capability.GregtechCapabilities; import gregtech.api.capability.IEnergyContainer; - import gregtech.api.util.TextFormattingUtil; import net.minecraft.entity.player.EntityPlayer; @@ -14,8 +13,6 @@ import mcjty.theoneprobe.api.IProbeInfo; import org.jetbrains.annotations.NotNull; -import java.text.NumberFormat; - public class ElectricContainerInfoProvider extends CapabilityInfoProvider { @Override diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/LaserContainerInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/LaserContainerInfoProvider.java index 7b4c9e04317..404bf223680 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/LaserContainerInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/LaserContainerInfoProvider.java @@ -3,17 +3,15 @@ import gregtech.api.GTValues; import gregtech.api.capability.GregtechTileCapabilities; import gregtech.api.capability.ILaserContainer; - import gregtech.api.util.TextFormattingUtil; -import mcjty.theoneprobe.api.NumberFormat; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.capabilities.Capability; import mcjty.theoneprobe.api.IProbeHitData; import mcjty.theoneprobe.api.IProbeInfo; +import mcjty.theoneprobe.api.NumberFormat; import org.jetbrains.annotations.NotNull; public class LaserContainerInfoProvider extends CapabilityInfoProvider { diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/PrimitivePumpInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/PrimitivePumpInfoProvider.java index dde6dd0f584..3c7d3d79004 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/PrimitivePumpInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/PrimitivePumpInfoProvider.java @@ -4,7 +4,6 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; import gregtech.api.metatileentity.multiblock.IPrimitivePump; - import gregtech.api.util.TextFormattingUtil; import net.minecraft.block.state.IBlockState; @@ -34,7 +33,9 @@ public void addProbeInfo(@NotNull ProbeMode mode, @NotNull IProbeInfo probeInfo, if (metaTileEntity instanceof IPrimitivePump) { probeInfo.text( TextStyleClass.INFO + "{*gregtech.top.primitive_pump_production*} " + TextFormatting.AQUA + - TextFormattingUtil.formatNumbers(((IPrimitivePump) metaTileEntity).getFluidProduction()) + TextFormatting.RESET + " L/s"); + TextFormattingUtil + .formatNumbers(((IPrimitivePump) metaTileEntity).getFluidProduction()) + + TextFormatting.RESET + " L/s"); } } } diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/RecipeLogicInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/RecipeLogicInfoProvider.java index 7d35c2e180b..3a60fab7db6 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/RecipeLogicInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/RecipeLogicInfoProvider.java @@ -23,8 +23,6 @@ import mcjty.theoneprobe.api.TextStyleClass; import org.jetbrains.annotations.NotNull; -import java.text.NumberFormat; - public class RecipeLogicInfoProvider extends CapabilityInfoProvider { @Override @@ -56,14 +54,16 @@ protected void addProbeInfo(@NotNull AbstractRecipeLogic capability, @NotNull IP MetaTileEntity mte = gtTileEntity.getMetaTileEntity(); if (mte instanceof SteamMetaTileEntity || mte instanceof MetaTileEntityLargeBoiler || mte instanceof RecipeMapSteamMultiblockController) { - text = TextFormatting.AQUA.toString() + TextFormattingUtil.formatNumbers(absEUt) + TextStyleClass.INFO + " L/t {*" + + text = TextFormatting.AQUA.toString() + TextFormattingUtil.formatNumbers(absEUt) + + TextStyleClass.INFO + " L/t {*" + Materials.Steam.getUnlocalizedName() + "*}"; } } if (text == null) { // Default behavior, if this TE is not a steam machine (or somehow not instanceof // IGregTechTileEntity...) - text = TextFormatting.RED.toString() + TextFormattingUtil.formatNumbers(absEUt) + TextStyleClass.INFO + " EU/t" + TextFormatting.GREEN + + text = TextFormatting.RED.toString() + TextFormattingUtil.formatNumbers(absEUt) + TextStyleClass.INFO + + " EU/t" + TextFormatting.GREEN + " (" + GTValues.VNF[GTUtility.getTierByVoltage(absEUt)] + TextFormatting.GREEN + ")"; } diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/SteamBoilerInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/SteamBoilerInfoProvider.java index 72108e8e13b..248d0fc1d02 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/SteamBoilerInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/SteamBoilerInfoProvider.java @@ -37,7 +37,8 @@ public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer play // Creating steam if (steamOutput > 0 && boiler.hasWater()) { probeInfo.text(TextStyleClass.INFO + "{*gregtech.top.energy_production*} " + - TextFormatting.AQUA + TextFormattingUtil.formatNumbers(steamOutput / 10) + TextStyleClass.INFO + " L/t" + " {*" + + TextFormatting.AQUA + TextFormattingUtil.formatNumbers(steamOutput / 10) + + TextStyleClass.INFO + " L/t" + " {*" + Materials.Steam.getUnlocalizedName() + "*}"); } diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/WorkableInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/WorkableInfoProvider.java index 8c2da396051..ac6254aa8b5 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/WorkableInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/WorkableInfoProvider.java @@ -4,17 +4,15 @@ import gregtech.api.capability.GregtechTileCapabilities; import gregtech.api.capability.IWorkable; import gregtech.api.capability.impl.ComputationRecipeLogic; - import gregtech.api.util.TextFormattingUtil; -import mcjty.theoneprobe.api.NumberFormat; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.capabilities.Capability; import mcjty.theoneprobe.api.IProbeHitData; import mcjty.theoneprobe.api.IProbeInfo; +import mcjty.theoneprobe.api.NumberFormat; import org.jetbrains.annotations.NotNull; public class WorkableInfoProvider extends CapabilityInfoProvider {