diff options
Diffstat (limited to 'src/main/java')
6 files changed, 36 insertions, 32 deletions
diff --git a/src/main/java/com/github/technus/tectech/nei/NEI_TT_Config.java b/src/main/java/com/github/technus/tectech/nei/NEI_TT_Config.java index 9d4087ab7e..ffb72638c7 100644 --- a/src/main/java/com/github/technus/tectech/nei/NEI_TT_Config.java +++ b/src/main/java/com/github/technus/tectech/nei/NEI_TT_Config.java @@ -3,8 +3,6 @@ package com.github.technus.tectech.nei; import codechicken.nei.api.IConfigureNEI; import com.github.technus.tectech.recipe.TT_recipe; import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.event.FMLInterModComms; -import net.minecraft.nbt.NBTTagCompound; public class NEI_TT_Config implements IConfigureNEI { // must be NEI*Config public static boolean sIsAdded = true; @@ -32,5 +30,4 @@ public class NEI_TT_Config implements IConfigureNEI { // must be NEI*Config public String getVersion() { return "(1.0)"; } - } diff --git a/src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java b/src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java index 13822059cd..8dd7b543bf 100644 --- a/src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java +++ b/src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java @@ -124,10 +124,7 @@ public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler { drawLine(index++, "Time: " + formatNumbers(recipe.getRecipeTimeInTicks() / 20) + " secs"); drawLine(index++, "Hydrogen: " + formatNumbers(recipe.getHydrogenRequirement()) + " L"); drawLine(index++, "Helium: " + formatNumbers(recipe.getHydrogenRequirement()) + " L"); - drawLine( - index++, - "Spacetime Tier: " - + EOH_TIER_FANCY_NAMES[(int) recipe.getSpacetimeCasingTierRequired()]); + drawLine(index++, "Spacetime Tier: " + EOH_TIER_FANCY_NAMES[(int) recipe.getSpacetimeCasingTierRequired()]); drawLine(index++, "EU Output: " + formatNumbers(recipe.getEUOutput()) + " EU"); drawLine(index++, "EU Input: " + formatNumbers(recipe.getEUStartCost()) + " EU"); drawLine(index++, "Base Recipe Chance: " + formatNumbers(100 * recipe.getBaseRecipeSuccessChance()) + "%"); diff --git a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java index c323790288..16165f4c1f 100644 --- a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java @@ -125,7 +125,8 @@ public class EyeOfHarmonyRecipe { // EU is split between Plasma output and EU output, hence /2. // recipeEnergyEfficiency > 1 determines if this recipe makes more EU than you put in when you sum the // EU in the plasma + the EU output. - fluidStack.amount = (int) ((recipeEnergyEfficiency * 0.01) * this.euOutput / totalEUSumOfIndividualPlasmaFuels); + fluidStack.amount = + (int) ((recipeEnergyEfficiency * 0.01) * this.euOutput / totalEUSumOfIndividualPlasmaFuels); } else { // Hopefully won't happen but just in case. fluidStack.amount = Integer.MAX_VALUE; @@ -138,9 +139,9 @@ public class EyeOfHarmonyRecipe { fluidStackArrayList.add(Materials.Infinity.getMolten((long) (0.1 * fluidStackArrayList.get(0).amount))); } -// Sort fluids by stack size. -// fluidStackArrayList.sort(Comparator.comparingLong((FluidStack fluid) -> fluid.amount)); -// Collections.reverse(fluidStackArrayList); + // Sort fluids by stack size. + // fluidStackArrayList.sort(Comparator.comparingLong((FluidStack fluid) -> fluid.amount)); + // Collections.reverse(fluidStackArrayList); outputFluids = fluidStackArrayList; // End fluid processing. @@ -236,7 +237,8 @@ public class EyeOfHarmonyRecipe { } } - private static void processHelper(HashMapHelper outputMap, Materials material, double mainMultiplier, double probability) { + private static void processHelper( + HashMapHelper outputMap, Materials material, double mainMultiplier, double probability) { outputMap.add(material.mDirectSmelting, (material.mOreMultiplier * 2) * mainMultiplier * probability); int index = 0; @@ -313,7 +315,7 @@ public class EyeOfHarmonyRecipe { try { String plasmaName = plasma.getFluid().getUnlocalizedName(); total += plasmaEnergyMap.get(plasmaName) * plasma.amount; - } catch(Exception e) { + } catch (Exception e) { e.printStackTrace(); } } @@ -348,8 +350,9 @@ public class EyeOfHarmonyRecipe { private static final HashMap<String, Long> plasmaEnergyMap = new HashMap<String, Long>() { { - validPlasmas.forEach((material -> put( - material.getPlasma(1).getFluid().getUnlocalizedName(), (long) (getPlasmaFuelValueInEUPerLiterFromMaterial(material) * getMaxPlasmaTurbineEfficiency())))); + validPlasmas.forEach( + (material -> put(material.getPlasma(1).getFluid().getUnlocalizedName(), (long) + (getPlasmaFuelValueInEUPerLiterFromMaterial(material) * getMaxPlasmaTurbineEfficiency())))); } }; } diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java index ba2e68a7dd..0095fdd409 100644 --- a/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java +++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipe.java @@ -262,9 +262,10 @@ public class TT_recipe extends GT_Recipe { true, false) // Custom NEI handler means this must be false. .setProgressBar(GT_UITextures.PROGRESSBAR_HAMMER, ProgressBar.Direction.DOWN) - .setProgressBarPos(78+1, 24+2) + .setProgressBarPos(78 + 1, 24 + 2) .setUsualFluidOutputCount(18) - .setLogoPos(10, 10).setNEIBackgroundSize(172, 82 + (9 + 10) * 18); + .setLogoPos(10, 10) + .setNEIBackgroundSize(172, 82 + (9 + 10) * 18); public static GT_Recipe_MapTT sResearchableFakeRecipes = new GT_Recipe_MapTT( new HashSet<>(32), diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java index fa3c35ca86..e3413ec4ad 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java @@ -34,23 +34,20 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; -import gregtech.api.util.GT_Utility; import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_OutputBus_ME; import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Output_ME; import java.util.*; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; -import net.minecraftforge.fluids.FluidStack; -import org.apache.commons.lang3.tuple.Pair; - import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; -import net.minecraft.block.Block; -import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.Tessellator; -import gregtech.api.render.TextureFactory; +import net.minecraftforge.fluids.FluidStack; +import org.apache.commons.lang3.tuple.Pair; import org.lwjgl.opengl.GL11; @SuppressWarnings("SpellCheckingInspection") @@ -1768,8 +1765,9 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl private void outputFailedChance() { // todo Replace with proper fluid once added to GT. - int exoticMaterialOutputAmount = (int) ((successChance) * 1440 * (getHydrogenStored() + getHeliumStored()) / 1_000_000_000.0); - mOutputFluids = new FluidStack[] { Materials.Infinity.getFluid(exoticMaterialOutputAmount)}; + int exoticMaterialOutputAmount = + (int) ((successChance) * 1440 * (getHydrogenStored() + getHeliumStored()) / 1_000_000_000.0); + mOutputFluids = new FluidStack[] {Materials.Infinity.getFluid(exoticMaterialOutputAmount)}; super.outputAfterRecipe_EM(); } @@ -1876,8 +1874,8 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl str.add("Time Dilation Field Grade: " + BLUE + timeAccelerationFieldMetadata); str.add("Stabilisation Field Grade: " + BLUE + stabilisationFieldMetadata); str.add(GOLD + "----------------- Internal Fluids Stored ----------------"); - validFluidMap.forEach((key, value) -> - str.add(BLUE + key.getLocalizedName() + RESET + " : " + RED + formatNumbers(value))); + validFluidMap.forEach( + (key, value) -> str.add(BLUE + key.getLocalizedName() + RESET + " : " + RED + formatNumbers(value))); str.add(GOLD + "---------------------- Other Stats ---------------"); if (recipeRunning) { str.add("Recipe Success Chance: " + formatNumbers(100 * successChance) + "%"); @@ -1885,7 +1883,8 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl str.add("EU Output: " + formatNumbers(euOutput)); if (mOutputFluids.length > 0) { // Star matter is always the last element in the array. - str.add("Estimated Star Matter Output: " + formatNumbers(mOutputFluids[mOutputFluids.length-1].amount)); + str.add("Estimated Star Matter Output: " + + formatNumbers(mOutputFluids[mOutputFluids.length - 1].amount)); } str.add(GOLD + "-----------------------------------------------------"); } @@ -2051,5 +2050,4 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl return false; //spotless:on } - } diff --git a/src/main/java/com/github/technus/tectech/util/CommonValues.java b/src/main/java/com/github/technus/tectech/util/CommonValues.java index e3456eafe2..9b3bfebc6b 100644 --- a/src/main/java/com/github/technus/tectech/util/CommonValues.java +++ b/src/main/java/com/github/technus/tectech/util/CommonValues.java @@ -32,7 +32,15 @@ public final class CommonValues { public static final long[] V = GT_Values.V; public static final String[] EOH_TIER_FANCY_NAMES = { - "Crude", "Primitive", "Stable", "Advanced", "Superb", "Exotic", "Perfect", "Tipler", EnumChatFormatting.BOLD + "Gallifreyan" + "Crude", + "Primitive", + "Stable", + "Advanced", + "Superb", + "Exotic", + "Perfect", + "Tipler", + EnumChatFormatting.BOLD + "Gallifreyan" }; private CommonValues() {} |
