diff options
author | NotAPenguin <michiel.vandeginste@gmail.com> | 2024-09-02 23:17:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-02 23:17:17 +0200 |
commit | 1b820de08a05070909a267e17f033fcf58ac8710 (patch) | |
tree | 02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/gtnhlanth/common/tileentity/recipe/beamline | |
parent | afd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff) | |
download | GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2 GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip |
The Great Renaming (#3014)
* move kekztech to a single root dir
* move detrav to a single root dir
* move gtnh-lanthanides to a single root dir
* move tectech and delete some gross reflection in gt++
* remove more reflection inside gt5u
* delete more reflection in gt++
* fix imports
* move bartworks and bwcrossmod
* fix proxies
* move galactigreg and ggfab
* move gtneioreplugin
* try to fix gt++ bee loader
* apply the rename rules to BW
* apply rename rules to bwcrossmod
* apply rename rules to detrav scanner mod
* apply rename rules to galacticgreg
* apply rename rules to ggfab
* apply rename rules to goodgenerator
* apply rename rules to gtnh-lanthanides
* apply rename rules to gt++
* apply rename rules to kekztech
* apply rename rules to kubatech
* apply rename rules to tectech
* apply rename rules to gt
apply the rename rules to gt
* fix tt import
* fix mui hopefully
* fix coremod except intergalactic
* rename assline recipe class
* fix a class name i stumbled on
* rename StructureUtility to GTStructureUtility to prevent conflict with structurelib
* temporary rename of GTTooltipDataCache to old name
* fix gt client/server proxy names
Diffstat (limited to 'src/main/java/gtnhlanth/common/tileentity/recipe/beamline')
6 files changed, 614 insertions, 0 deletions
diff --git a/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeAdder2.java b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeAdder2.java new file mode 100644 index 0000000000..dad71375c3 --- /dev/null +++ b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeAdder2.java @@ -0,0 +1,165 @@ +package gtnhlanth.common.tileentity.recipe.beamline; + +import java.util.Arrays; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; + +import gregtech.api.gui.modularui.GTUITextures; +import gregtech.api.recipe.RecipeMap; +import gregtech.api.recipe.RecipeMapBackend; +import gregtech.api.recipe.RecipeMapBuilder; +import gregtech.api.util.GTUtility; +import gtnhlanth.common.beamline.Particle; + +public class BeamlineRecipeAdder2 { + + public static final BeamlineRecipeAdder2 instance = new BeamlineRecipeAdder2(); + + public final RecipeMap<RecipeMapBackend> SourceChamberRecipes = RecipeMapBuilder.of("gtnhlanth.recipe.sc") + .minInputs(0, 0) + .maxIO(1, 2, 0, 0) + .amperage(1) + .frontend(SourceChamberFrontend::new) + .progressBar(GTUITextures.PROGRESSBAR_ASSEMBLY_LINE_1) + .neiSpecialInfoFormatter((recipeInfo) -> { + + RecipeSC recipe = (RecipeSC) recipeInfo.recipe; + + float focus = recipe.focus; + float maxEnergy = recipe.maxEnergy; + + int amount = recipe.rate; + + Particle particle = Particle.getParticleFromId(recipe.particleId); + + return Arrays.asList( + + // StatCollector.translateToLocal("beamline.particle") + ": " + particle.getLocalisedName(), + + StatCollector.translateToLocal("beamline.energy") + ": <=" + + GTUtility.formatNumbers(Math.min(maxEnergy, particle.maxSourceEnergy())) + + " keV", + + StatCollector.translateToLocal("beamline.focus") + ": " + GTUtility.formatNumbers(focus), + + StatCollector.translateToLocal("beamline.rate") + ": " + GTUtility.formatNumbers(amount) + + ); + }) + // .slotOverlays(null) + + .build(); + + public final RecipeMap<RecipeMapBackend> TargetChamberRecipes = RecipeMapBuilder.of("gtnhlanth.recipe.tc") + .minInputs(0, 0) + .maxIO(3, 4, 0, 0) + .frontend(TargetChamberFrontend::new) + .neiSpecialInfoFormatter(((recipeInfo) -> { + + RecipeTC recipe = (RecipeTC) recipeInfo.recipe; + + float minEnergy = recipe.minEnergy; + float maxEnergy = recipe.maxEnergy; + + float minFocus = recipe.minFocus; + + float amount = recipe.amount; + + Particle particle = Particle.getParticleFromId(recipe.particleId); + + return Arrays.asList( + + // StatCollector.translateToLocal("beamline.particle") + ": " + particle.getLocalisedName(), + + StatCollector.translateToLocal("beamline.energy") + ": " + + GTUtility.formatNumbers(minEnergy * 1000) + + "-" + + GTUtility.formatNumbers(maxEnergy * 1000) + + " eV", // Note the eV unit + + StatCollector.translateToLocal("beamline.focus") + ": >=" + GTUtility.formatNumbers(minFocus), + + StatCollector.translateToLocal("beamline.amount") + ": " + GTUtility.formatNumbers(amount) + + ); + })) + // .slotOverlays(null) + .progressBar(GTUITextures.PROGRESSBAR_ASSEMBLY_LINE_1) + .progressBarPos(108, 22) + .neiTransferRect(100, 22, 28, 18) + .build(); + + /*** + * + * @param itemInputs - duh + * @param itemOutputs - duh + * @param particleId - The ID of the {@link Particle} generated by the recipe. + * It is recommended to use Particle#ordinal() + * @param rate - The rate/amount of particles generated + * @param maxEnergy - The maximum energy particles generated by this recipe can possess (keV). Set this value >= + * max particle energy to limit it to the latter + * @param focus - Focus of the particle generated + * @param energyRatio - Set high for little-to-no EUt energy scaling, low for the opposite + * @param minEUt - Minimum EUt required for the recipe. ! May not output if input energy is equal to minimum ! + */ + public boolean addSourceChamberRecipe(ItemStack[] itemInputs, ItemStack[] itemOutputs, int particleId, int rate, + float maxEnergy, float focus, float energyRatio, int minEUt) { + + return (SourceChamberRecipes.addRecipe( + new RecipeSC( + false, + itemInputs, + itemOutputs, + null, + new int[] {}, + null, + null, + 20, + minEUt, + particleId, + rate, + maxEnergy, + focus, + energyRatio)) + != null); + } + + /*** + * + * @param itemInput - The item to be used as a target. Should have durability + * @param itemOutput - duh + * @param particleId - The ID of the {@link Particle} used by the recipe. It + * is recommended to use Particle#ordinal() + * @param amount - The total amount of particles required for the recipe to come to completion. The duration of + * the recipe will be determined by this and the input particle rate. + * @param minEnergy - The minimum energy amount required by this recipe in keV (inclusive) + * @param maxEnergy - The maximum energy amount allowed by this recipe in keV (inclusive) + * @param minFocus - Minimum focus allowed by the recipe + * @param energyRatio - Set high for little-to-no EUt energy scaling, low for the opposite + * @param minEUt - Minimum EUt required for the recipe to start + */ + + public boolean addTargetChamberRecipe(ItemStack itemInput, ItemStack itemOutput, ItemStack itemFocus, + int particleId, int amount, float minEnergy, float maxEnergy, float minFocus, float energyRatio, int minEUt) { + + return (TargetChamberRecipes.addRecipe( + new RecipeTC( + false, + itemInput, + itemOutput, + itemFocus, + particleId, + amount, + minEnergy, + maxEnergy, + minFocus, + energyRatio, + minEUt), + false, + false, + false) != null); + + } + +} diff --git a/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java new file mode 100644 index 0000000000..d71b9a571e --- /dev/null +++ b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java @@ -0,0 +1,193 @@ +package gtnhlanth.common.tileentity.recipe.beamline; + +import java.util.Arrays; +import java.util.HashMap; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GTOreDictUnificator; +import gregtech.api.util.GTUtility; +import gtPlusPlus.core.material.MaterialsElements; +import gtnhlanth.common.beamline.Particle; +import gtnhlanth.common.item.MaskList; +import gtnhlanth.common.register.LanthItemList; +import gtnhlanth.common.register.WerkstoffMaterialPool; + +public class BeamlineRecipeLoader { + + public static final HashMap<String, Fluid> coolantMap = new HashMap<>(); + + private static final ItemList[] VIABLE_WAFERS = new ItemList[] { ItemList.Circuit_Silicon_Wafer, + ItemList.Circuit_Silicon_Wafer2, ItemList.Circuit_Silicon_Wafer3, ItemList.Circuit_Silicon_Wafer4, + ItemList.Circuit_Silicon_Wafer5, ItemList.Circuit_Silicon_Wafer6, ItemList.Circuit_Silicon_Wafer7 }; + + public static void load() { + + /* + * Coolant list + */ + + coolantMap.put( + Materials.LiquidNitrogen.getGas(1L) + .getFluid() + .getName(), + Materials.Nitrogen.getGas(1L) + .getFluid()); + coolantMap.put( + Materials.LiquidOxygen.getGas(1L) + .getFluid() + .getName(), + Materials.Oxygen.getGas(1L) + .getFluid()); + coolantMap.put("ic2coolant", FluidRegistry.getFluid("ic2hotcoolant")); + coolantMap.put( + Materials.SuperCoolant.getFluid(1L) + .getFluid() + .getName(), + Materials.Water.getFluid(1L) + .getFluid()); + + /* + * ELECTRON + */ + BeamlineRecipeAdder2.instance.addSourceChamberRecipe( + new ItemStack[] { GTOreDictUnificator.get(OrePrefixes.stick, Materials.Tungsten, 1) }, + null, + Particle.ELECTRON.ordinal(), + 20, + 1000, + 98, + 0.1f, + 7680); + + BeamlineRecipeAdder2.instance.addSourceChamberRecipe( + new ItemStack[] { WerkstoffMaterialPool.LanthanumHexaboride.get(OrePrefixes.stickLong, 1) }, + null, + Particle.ELECTRON.ordinal(), + 60, + 5000, + 99, + 0.3f, + 7680); + + /* + * NEUTRON + */ + BeamlineRecipeAdder2.instance.addSourceChamberRecipe( + new ItemStack[] { MaterialsElements.getInstance().CALIFORNIUM.getDust(1) }, + null, + Particle.NEUTRON.ordinal(), + 10, + 9000, + 95, + 999, + 1920); + + /* + * ALPHA + */ + BeamlineRecipeAdder2.instance.addSourceChamberRecipe( + new ItemStack[] { Materials.Uranium.getDust(1) }, + new ItemStack[] { WerkstoffMaterialPool.Thorium234.get(OrePrefixes.dust, 1) }, + Particle.ALPHA.ordinal(), + 1, + 4270, + 90, + 999, + 480); + + /* + * TARGET CHAMBER + */ + + for (MaskList mask : MaskList.values()) { + + if (mask.getProducedItem() == null) // Blank or error + continue; + + int index = 0; + for (ItemList wafer : VIABLE_WAFERS) { + + index++; + + if (!Arrays.asList(mask.getForbiddenWafers()) + .contains(wafer)) { + + BeamlineRecipeAdder2.instance.addTargetChamberRecipe( + wafer.get(1), + GTUtility.copyAmountUnsafe((int) Math.pow(2, index + 2), mask.getProducedItem()), + new ItemStack(LanthItemList.maskMap.get(mask), 0), + 1, + mask.getBaselineAmount() * (int) Math.pow(Math.sqrt(3), index - 1), // 3x recipe amount increase + // per 2 increases in wafer + // tier. This greatly + // incentivises the use of + // higher tier boule wafer + // recipes + mask.getMinEnergy(), + mask.getMaxEnergy(), + mask.getMinFocus(), + 1, + 1920); + + } + + } + + /* + * if (!Arrays.asList(MaskList.CPU.getForbiddenWafers()).contains(wafer)) { + * BeamlineRecipeAdder.instance.addTargetChamberRecipe( wafer.get(1), GT_Utility.copyAmountUnsafe((int) + * Math.pow(2, index + 2), ItemList.Circuit_Wafer_CPU.get(1)), //Varies new + * ItemStack(LanthItemList.maskMap.get(MaskList.CPU), 0), // Varies 0, 10 * (int) Math.pow(2, index - 1), // + * Varies 1, //Varies 10000000, //Varies 50, //Varies 1, 1920 ); } /* PPIC + */ + + /* + * if (!Arrays.asList(MaskList.PPIC.getForbiddenWafers()).contains(wafer)) { + * GTLog.out.print("Adding recipe for PPIC with " + wafer.get(1).getUnlocalizedName() + " amount: " + 40 * + * (int) Math.pow(2, index - 1)); BeamlineRecipeAdder.instance.addTargetChamberRecipe( wafer.get(1), + * ItemList.Circuit_Wafer_PPIC.get((int) Math.pow(2, index + 2)), //Varies new + * ItemStack(LanthItemList.maskMap.get(MaskList.PPIC), 0), // Varies 0, 40 * (int) Math.pow(2, index - 1), + * // Varies 1, //Varies 10000000, //Varies 50, //Varies 1, 1920 ); } + */ + + } + /* + * BeamlineRecipeAdder2.instance.addTargetChamberRecipe( new ItemStack(Items.coal, 1), new + * ItemStack(Items.diamond, 1), null, 1, 20, 100, 1000, 60, 1, 1920); + * BeamlineRecipeAdder2.instance.addTargetChamberRecipe( new ItemStack(Items.coal, 1), new + * ItemStack(Items.cooked_chicken, 1), null, 1, 20, 1, 10, 60, 1, 1920); + */ + + BeamlineRecipeAdder2.instance.addTargetChamberRecipe( + new ItemStack(Items.chicken, 1), + new ItemStack(Items.cooked_chicken), + null, + Particle.PHOTON.ordinal(), + 400, + 5, + 20, + 80, + 1, + 7864320); + + BeamlineRecipeAdder2.instance.addTargetChamberRecipe( + new ItemStack(Items.chicken, 1), + new ItemStack(Items.egg), + null, + Particle.PHOTON.ordinal(), + 400, + 21, + 600, + 80, + 1, + 7864320); + + } +} diff --git a/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/RecipeSC.java b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/RecipeSC.java new file mode 100644 index 0000000000..979cb6a8bb --- /dev/null +++ b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/RecipeSC.java @@ -0,0 +1,52 @@ +package gtnhlanth.common.tileentity.recipe.beamline; + +import java.util.ArrayList; +import java.util.Arrays; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTUtility; +import gtnhlanth.common.register.LanthItemList; + +public class RecipeSC extends GTRecipe { + + public int particleId; + public int rate; + public float maxEnergy; + public float focus; + public float energyRatio; + + public RecipeSC(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, + FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int particleId, int rate, + float maxEnergy, float focus, float energyRatio) { + + super(aOptimize, aInputs, aOutputs, null, aChances, null, null, aDuration, aEUt, 0); + + this.particleId = particleId; + this.rate = rate; + this.maxEnergy = maxEnergy; + this.focus = focus; + this.energyRatio = energyRatio; + } + + @Override + public ItemStack getRepresentativeOutput(int aIndex) { + + ArrayList<ItemStack> mOutputsWithParticle = new ArrayList<>(); + + ItemStack particleStack = new ItemStack(LanthItemList.PARTICLE_ITEM); + + Items.ender_pearl.setDamage(particleStack, this.particleId); + + mOutputsWithParticle.addAll(Arrays.asList(mOutputs)); + mOutputsWithParticle.add(particleStack); + + ItemStack[] mOutputsWithParticleArray = mOutputsWithParticle.toArray(new ItemStack[0]); + + if (aIndex < 0 || aIndex >= mOutputsWithParticleArray.length) return null; + return GTUtility.copyOrNull(mOutputsWithParticleArray[aIndex]); + } +} diff --git a/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/RecipeTC.java b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/RecipeTC.java new file mode 100644 index 0000000000..30be015abb --- /dev/null +++ b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/RecipeTC.java @@ -0,0 +1,71 @@ +package gtnhlanth.common.tileentity.recipe.beamline; + +import java.util.ArrayList; +import java.util.Arrays; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +import gregtech.api.util.GTRecipe; +import gregtech.api.util.GTUtility; +import gtnhlanth.common.register.LanthItemList; + +public class RecipeTC extends GTRecipe { + + public int particleId; + public int amount; + + public float minEnergy; + public float maxEnergy; + + public float minFocus; + public float energyRatio; + + public ItemStack focusItem; + + public RecipeTC(boolean aOptimize, ItemStack aInput, ItemStack aOutput, ItemStack aFocusItem, int particleId, + int amount, float minEnergy, float maxEnergy, float minFocus, float energyRatio, int aEUt) { + + super( + aOptimize, + new ItemStack[] { aFocusItem, aInput }, + new ItemStack[] { aOutput }, + null, + null, + null, + null, + 1, + aEUt, + 0); + + this.particleId = particleId; + this.amount = amount; + + this.minEnergy = minEnergy; + this.maxEnergy = maxEnergy; + + this.minFocus = minFocus; + + this.energyRatio = energyRatio; + + this.focusItem = aFocusItem; + } + + @Override + public ItemStack getRepresentativeInput(int aIndex) { + + ArrayList<ItemStack> mInputsWithParticle = new ArrayList<>(); + + ItemStack particleStack = new ItemStack(LanthItemList.PARTICLE_ITEM); + Items.ender_pearl.setDamage(particleStack, this.particleId); + + mInputsWithParticle.add(particleStack); + mInputsWithParticle.addAll(Arrays.asList(mInputs)); + + ItemStack[] mInputsWithParticleArray = mInputsWithParticle.toArray(new ItemStack[0]); + + if (aIndex < 0 || aIndex >= mInputsWithParticleArray.length) return null; + return GTUtility.copyOrNull(mInputsWithParticleArray[aIndex]); + } + +} diff --git a/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/SourceChamberFrontend.java b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/SourceChamberFrontend.java new file mode 100644 index 0000000000..3d8a3abfd1 --- /dev/null +++ b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/SourceChamberFrontend.java @@ -0,0 +1,24 @@ +package gtnhlanth.common.tileentity.recipe.beamline; + +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.recipe.RecipeMapFrontend; +import gregtech.nei.RecipeDisplayInfo; + +public class SourceChamberFrontend extends RecipeMapFrontend { + + public SourceChamberFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super(uiPropertiesBuilder, neiPropertiesBuilder); + } + + @Override + public void drawDescription(RecipeDisplayInfo recipeInfo) { + drawEnergyInfo(recipeInfo); + // drawDurationInfo(recipeInfo); Unnecessary and misleading + drawSpecialInfo(recipeInfo); + drawMetadataInfo(recipeInfo); + drawRecipeOwnerInfo(recipeInfo); + } + +} diff --git a/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/TargetChamberFrontend.java b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/TargetChamberFrontend.java new file mode 100644 index 0000000000..87852381e6 --- /dev/null +++ b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/TargetChamberFrontend.java @@ -0,0 +1,109 @@ +package gtnhlanth.common.tileentity.recipe.beamline; + +import static gregtech.api.util.GTUtility.trans; + +import java.util.List; + +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StatCollector; + +import com.gtnewhorizons.modularui.api.math.Pos2d; + +import gregtech.api.recipe.BasicUIPropertiesBuilder; +import gregtech.api.recipe.NEIRecipePropertiesBuilder; +import gregtech.api.recipe.RecipeMapFrontend; +import gregtech.api.util.GTUtility; +import gregtech.api.util.OverclockCalculator; +import gregtech.common.gui.modularui.UIHelper; +import gregtech.nei.GTNEIDefaultHandler; +import gregtech.nei.RecipeDisplayInfo; +import gtnhlanth.util.Util; + +public class TargetChamberFrontend extends RecipeMapFrontend { + + public TargetChamberFrontend(BasicUIPropertiesBuilder uiPropertiesBuilder, + NEIRecipePropertiesBuilder neiPropertiesBuilder) { + super(uiPropertiesBuilder, neiPropertiesBuilder); + } + + public void drawDescription(RecipeDisplayInfo recipeInfo) { + drawEnergyInfo(recipeInfo); + // drawDurationInfo(recipeInfo); + drawSpecialInfo(recipeInfo); + drawMetadataInfo(recipeInfo); + drawRecipeOwnerInfo(recipeInfo); + } + + @Override + protected void drawNEIOverlayForInput(GTNEIDefaultHandler.FixedPositionedStack stack) { + if (stack.isNotConsumed()) { // The stack actually takes damage, but is technically still not considered to be + // consumed by the code + drawNEIOverlayText("PC", stack); + } + } + + @Override + protected List<String> handleNEIItemInputTooltip(List<String> currentTip, + GTNEIDefaultHandler.FixedPositionedStack pStack) { + if (pStack.isNotConsumed()) { // See above + currentTip.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("gtnhlanth.tt.pc")); // Partially + // consumed: + // Takes damage + // in the + // process + } + return currentTip; + } + + @Override + public void drawEnergyInfo(RecipeDisplayInfo recipeInfo) { + if (recipeInfo.calculator.getConsumption() <= 0) return; + + // recipeInfo.drawText(trans("152", "Total: ") + getTotalPowerString(recipeInfo.calculator)); + + recipeInfo.drawText(trans("153", "Usage: ") + getEUtDisplay(recipeInfo.calculator)); + recipeInfo.drawText(trans("154", "Voltage: ") + getVoltageString(recipeInfo.calculator)); + recipeInfo.drawText(trans("155", "Amperage: ") + getAmperageString(recipeInfo.calculator)); + + } + + @Override + public List<Pos2d> getItemOutputPositions(int itemOutputCount) { + return UIHelper.getGridPositions(itemOutputCount, 128, 24, 1, 3); // Make output items display vertically, not + // in a square + } + + @Override + public List<Pos2d> getItemInputPositions(int itemInputCount) { + + /* + * Pos2d posParticle = new Pos2d(8, 28); // Particle item ArrayList<Pos2d> posList = new ArrayList<>(); + * posList.add(posParticle); posList.addAll(UIHelper.getGridPositions(itemInputCount - 1, 36, 28, 3)); + */ + + List<Pos2d> posList = Util.getGridPositions(itemInputCount, 8, 20, 3, 1, 20); + return posList; + } + + private String getEUtDisplay(OverclockCalculator calculator) { + return getEUtWithoutTier(calculator); + } + + private String getEUtWithoutTier(OverclockCalculator calculator) { + return GTUtility.formatNumbers(calculator.getConsumption()) + " EU/t"; + } + + private String getVoltageString(OverclockCalculator calculator) { + long voltage = computeVoltageForEURate(calculator.getConsumption()); + return GTUtility.formatNumbers(voltage) + " EU/t" + GTUtility.getTierNameWithParentheses(voltage); + } + + private long computeVoltageForEURate(long euPerTick) { + return euPerTick; + } + + private String getAmperageString(OverclockCalculator calculator) { + return GTUtility.formatNumbers(1); + } + +} |