diff options
Diffstat (limited to 'src/main')
6 files changed, 63 insertions, 56 deletions
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 adbdcc3a99..d64680855a 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 @@ -66,7 +66,8 @@ public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler { // Draw tooltip on planet item. if (aStack.isItemEqual(currentRecipe.getRecipeTriggerItem())) { - currentToolTip.add(EnumChatFormatting.GRAY + "Total Items: " + formatNumbers(currentRecipe.getSumOfItems())); + currentToolTip.add( + EnumChatFormatting.GRAY + "Total Items: " + formatNumbers(currentRecipe.getSumOfItems())); return currentToolTip; } @@ -138,16 +139,21 @@ public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler { drawLine(index++, "Helium: " + formatNumbers(recipe.getHydrogenRequirement()) + " L"); drawLine(index++, "Spacetime Tier: " + EOH_TIER_FANCY_NAMES[(int) recipe.getSpacetimeCasingTierRequired()]); - if (recipe.getEUOutput() < TRILLION ) { + if (recipe.getEUOutput() < TRILLION) { drawLine(index++, "EU Output: " + formatNumbers(recipe.getEUOutput()) + " EU"); } else { - drawLine(index++, "EU Output: " + ReadableNumberConverter.INSTANCE.toWideReadableForm(recipe.getEUOutput()) + " EU"); + drawLine( + index++, + "EU Output: " + ReadableNumberConverter.INSTANCE.toWideReadableForm(recipe.getEUOutput()) + " EU"); } - if (recipe.getEUOutput() < TRILLION ) { + if (recipe.getEUOutput() < TRILLION) { drawLine(index++, "EU Input: " + formatNumbers(recipe.getEUStartCost()) + " EU"); } else { - drawLine(index++, "EU Input: " + ReadableNumberConverter.INSTANCE.toWideReadableForm(recipe.getEUStartCost()) + " EU"); + drawLine( + index++, + "EU Input: " + ReadableNumberConverter.INSTANCE.toWideReadableForm(recipe.getEUStartCost()) + + " EU"); } drawLine(index++, "Base Recipe Chance: " + formatNumbers(100 * recipe.getBaseRecipeSuccessChance()) + "%"); @@ -164,6 +170,4 @@ public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler { protected void drawLine(int lineNumber, String line) { drawText(7, getDescriptionYOffset() + lineNumber * 10 + 1, line, 0xFF000000); } - - } 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 97b07fe071..3e749b0c22 100644 --- a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java @@ -81,14 +81,15 @@ public class EyeOfHarmonyRecipe { return sumOfItems; } - public EyeOfHarmonyRecipe(ArrayList<Pair<Materials, Long>> materialList, - Block block, - final double recipeEnergyEfficiency, - final long hydrogenRequirement, - final long heliumRequirement, - final long miningTimeSeconds, - final long spacetimeCasingTierRequired, - final double baseSuccessChance) { + public EyeOfHarmonyRecipe( + ArrayList<Pair<Materials, Long>> materialList, + Block block, + final double recipeEnergyEfficiency, + final long hydrogenRequirement, + final long heliumRequirement, + final long miningTimeSeconds, + final long spacetimeCasingTierRequired, + final double baseSuccessChance) { this.recipeTriggerItem = new ItemStack(block); this.outputItems = validDustGenerator(materialList); @@ -111,7 +112,7 @@ public class EyeOfHarmonyRecipe { ArrayList<FluidStack> fluidStackArrayList = validPlasmaGenerator(materialList); for (FluidStack fluidStack : fluidStackArrayList) { - fluidStack.amount = (int) ((spacetimeCasingTierRequired+1) * 1_000_000L); + fluidStack.amount = (int) ((spacetimeCasingTierRequired + 1) * 1_000_000L); } // Add a bonus fluid of compressed star matter. @@ -150,7 +151,8 @@ public class EyeOfHarmonyRecipe { // Process recipes output items. // 6 * 64 = 6 stacks/second for VM tier 3 + Og gas. - this(processDimension(normalOreDimensionWrapper, smallOreDimensionWrapper, miningTimeSeconds), + this( + processDimension(normalOreDimensionWrapper, smallOreDimensionWrapper, miningTimeSeconds), block, recipeEnergyEfficiency, hydrogenRequirement, @@ -265,7 +267,8 @@ public class EyeOfHarmonyRecipe { }); // Iterate over small ores in dimension and add them, kinda hacky but works and is close enough. - smallOreDimWrapper.oreVeinToProbabilityInDimension.forEach((veinInfo, probability) -> processHelper(outputMap, veinInfo.getOreMaterial(), mainMultiplier, probability)); + smallOreDimWrapper.oreVeinToProbabilityInDimension.forEach((veinInfo, probability) -> + processHelper(outputMap, veinInfo.getOreMaterial(), mainMultiplier, probability)); ArrayList<Pair<Materials, Long>> outputList = new ArrayList<>(); @@ -274,8 +277,7 @@ public class EyeOfHarmonyRecipe { return outputList; } - private static ArrayList<FluidStack> validPlasmaGenerator( - final List<Pair<Materials, Long>> planetList) { + private static ArrayList<FluidStack> validPlasmaGenerator(final List<Pair<Materials, Long>> planetList) { ArrayList<FluidStack> plasmaList = new ArrayList<>(); diff --git a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java index a9a1d6e98b..a5f5c7016c 100644 --- a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipeStorage.java @@ -6,12 +6,10 @@ import static java.lang.Math.pow; import com.github.technus.tectech.util.ItemStackLong; import com.google.common.math.LongMath; - -import java.util.*; - import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_OreDictUnificator; +import java.util.*; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import org.apache.commons.lang3.tuple.Pair; @@ -50,12 +48,13 @@ public class EyeOfHarmonyRecipeStorage { GT5OreLayerHelper.dimToOreWrapper.get(dimAbbreviation), GT5OreSmallHelper.dimToSmallOreWrapper.get(dimAbbreviation), blockDimensionDisplay, - 0.6 + blockDimensionDisplay.getDimensionRocketTier() / 10.0, - BILLION * (blockDimensionDisplay.getDimensionRocketTier() + 1), - BILLION * (blockDimensionDisplay.getDimensionRocketTier() + 1), - (long) (18_000L * pow(1.4, blockDimensionDisplay.getDimensionRocketTier())), - blockDimensionDisplay.getDimensionRocketTier(), - 1.0 - blockDimensionDisplay.getDimensionRocketTier() / 10.0));} + 0.6 + blockDimensionDisplay.getDimensionRocketTier() / 10.0, + BILLION * (blockDimensionDisplay.getDimensionRocketTier() + 1), + BILLION * (blockDimensionDisplay.getDimensionRocketTier() + 1), + (long) (18_000L * pow(1.4, blockDimensionDisplay.getDimensionRocketTier())), + blockDimensionDisplay.getDimensionRocketTier(), + 1.0 - blockDimensionDisplay.getDimensionRocketTier() / 10.0)); + } } catch (Exception e) { e.printStackTrace(); System.out.println( @@ -84,7 +83,7 @@ public class EyeOfHarmonyRecipeStorage { sEyeofHarmonyRecipes.addRecipe( false, - new ItemStack[]{planetItem}, + new ItemStack[] {planetItem}, outputItems.toArray(new ItemStack[0]), recipe, null, @@ -96,7 +95,8 @@ public class EyeOfHarmonyRecipeStorage { } } - private void specialDeepDarkRecipe(HashMap<String, EyeOfHarmonyRecipe> hashMap, final BlockDimensionDisplay planetItem) { + private void specialDeepDarkRecipe( + HashMap<String, EyeOfHarmonyRecipe> hashMap, final BlockDimensionDisplay planetItem) { HashSet<Materials> validMaterialSet = new HashSet<>(); @@ -119,16 +119,17 @@ public class EyeOfHarmonyRecipeStorage { long rocketTier = 9; - hashMap.put("DD", new EyeOfHarmonyRecipe( - processDD(validMaterialList), - planetItem, - 0.6 + rocketTier / 10.0, - BILLION * (rocketTier + 1), - BILLION * (rocketTier + 1), - (long) (18_000L * pow(1.4, rocketTier)), - rocketTier-1, // -1 so that we avoid out of bounds exception on NEI render. - 1.0 - rocketTier / 10.0)); - + hashMap.put( + "DD", + new EyeOfHarmonyRecipe( + processDD(validMaterialList), + planetItem, + 0.6 + rocketTier / 10.0, + BILLION * (rocketTier + 1), + BILLION * (rocketTier + 1), + (long) (18_000L * pow(1.4, rocketTier)), + rocketTier - 1, // -1 so that we avoid out of bounds exception on NEI render. + 1.0 - rocketTier / 10.0)); } private ArrayList<Pair<Materials, Long>> processDD(ArrayList<Materials> validMaterialList) { @@ -148,4 +149,4 @@ public class EyeOfHarmonyRecipeStorage { return outputList; } -}
\ No newline at end of file +} 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 bcb2d386c3..dcb6964ad2 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 @@ -560,8 +560,8 @@ public class TT_recipe extends GT_Recipe { @Override public List<Pos2d> getItemOutputPositions(int itemOutputCount) { - return UIHelper.getItemGridPositions(min(itemOutputCount, maxItemsToRender+1), 7, yOrigin + 36, xDirMaxCount, 12); - + return UIHelper.getItemGridPositions( + min(itemOutputCount, maxItemsToRender + 1), 7, yOrigin + 36, xDirMaxCount, 12); } @Override 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 85a482a353..7a4bc0a6b7 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 @@ -1708,14 +1708,13 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl public boolean processRecipe(EyeOfHarmonyRecipe recipeObject) { -// if ((getHydrogenStored() < currentRecipe.getHydrogenRequirement()) -// || (getHeliumStored() < currentRecipe.getHeliumRequirement())) { -// return false; -// } + // if ((getHydrogenStored() < currentRecipe.getHydrogenRequirement()) + // || (getHeliumStored() < currentRecipe.getHeliumRequirement())) { + // return false; + // } // todo: DEBUG, DELETE THIS: - if ((getHydrogenStored() < 100) - || (getHeliumStored() < 100)) { + if ((getHydrogenStored() < 100) || (getHeliumStored() < 100)) { return false; } @@ -1898,14 +1897,16 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl str.add("EU Output: " + RED + formatNumbers(euOutput) + RESET + " EU"); if (mOutputFluids.length > 0) { // Star matter is always the last element in the array. - str.add("Estimated Star Matter Output: " - + RED + formatNumbers(mOutputFluids[mOutputFluids.length - 1].amount) + RESET + " L"); + str.add("Estimated Star Matter Output: " + RED + + formatNumbers(mOutputFluids[mOutputFluids.length - 1].amount) + RESET + " L"); } long euPerTick = euOutput / maxProgresstime(); if (euPerTick < LongMath.pow(10, 12)) { str.add("Estimated EU/t: " + RED + formatNumbers(euOutput / maxProgresstime()) + RESET + " EU/t"); } else { - str.add("Estimated EU/t: " + RED + ReadableNumberConverter.INSTANCE.toWideReadableForm(euOutput / maxProgresstime()) + RESET + " EU/t"); + str.add("Estimated EU/t: " + RED + + ReadableNumberConverter.INSTANCE.toWideReadableForm(euOutput / maxProgresstime()) + RESET + + " EU/t"); } str.add(GOLD + "-----------------------------------------------------"); } diff --git a/src/main/java/com/github/technus/tectech/util/ItemStackLong.java b/src/main/java/com/github/technus/tectech/util/ItemStackLong.java index 83787dadaf..94b5dcb88a 100644 --- a/src/main/java/com/github/technus/tectech/util/ItemStackLong.java +++ b/src/main/java/com/github/technus/tectech/util/ItemStackLong.java @@ -22,8 +22,7 @@ public class ItemStackLong { return stackSize; } - public long compareTo(ItemStackLong itemStackLong) - { - return(stackSize - itemStackLong.stackSize); + public long compareTo(ItemStackLong itemStackLong) { + return (stackSize - itemStackLong.stackSize); } } |