Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
josiah-roberts committed Dec 29, 2023
1 parent 5b1f657 commit aa448c5
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<AbstractRecipeLogic> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public List<String> getWailaBody(ItemStack itemStack, List<String> 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()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -14,8 +13,6 @@
import mcjty.theoneprobe.api.IProbeInfo;
import org.jetbrains.annotations.NotNull;

import java.text.NumberFormat;

public class ElectricContainerInfoProvider extends CapabilityInfoProvider<IEnergyContainer> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ILaserContainer> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
import mcjty.theoneprobe.api.TextStyleClass;
import org.jetbrains.annotations.NotNull;

import java.text.NumberFormat;

public class RecipeLogicInfoProvider extends CapabilityInfoProvider<AbstractRecipeLogic> {

@Override
Expand Down Expand Up @@ -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 + ")";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() + "*}");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<IWorkable> {
Expand Down

0 comments on commit aa448c5

Please sign in to comment.