aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/github/technus/tectech/nei/TT_NEI_EyeOfHarmonyHandler.java23
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/TT_recipe.java16
2 files changed, 30 insertions, 9 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 8dd7b543bf..be655f1cec 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
@@ -2,6 +2,7 @@ package com.github.technus.tectech.nei;
import static com.github.technus.tectech.Reference.MODID;
import static com.github.technus.tectech.util.CommonValues.EOH_TIER_FANCY_NAMES;
+import static com.google.common.math.LongMath.pow;
import static gregtech.api.util.GT_Utility.formatNumbers;
import appeng.util.ReadableNumberConverter;
@@ -24,6 +25,8 @@ import org.lwjgl.opengl.GL11;
public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler {
+ private static final long TRILLION = pow(10, 12);
+
public TT_NEI_EyeOfHarmonyHandler(final GT_Recipe.GT_Recipe_Map tMap) {
super(tMap);
if (!NEI_TT_Config.sIsAdded) {
@@ -46,6 +49,7 @@ public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler {
@Override
public List<String> handleItemTooltip(
GuiRecipe<?> gui, ItemStack aStack, List<String> currentToolTip, int aRecipeIndex) {
+ super.handleItemTooltip(gui, aStack, currentToolTip, aRecipeIndex);
if (aStack == null) {
return currentToolTip;
@@ -67,8 +71,6 @@ public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler {
}
}
- // So elements are displayed at bottom, call super method after.
- super.handleItemTooltip(gui, aStack, currentToolTip, aRecipeIndex);
return currentToolTip;
}
@@ -125,8 +127,19 @@ public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler {
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++, "EU Output: " + formatNumbers(recipe.getEUOutput()) + " EU");
- drawLine(index++, "EU Input: " + formatNumbers(recipe.getEUStartCost()) + " EU");
+
+ if (recipe.getEUOutput() < TRILLION ) {
+ drawLine(index++, "EU Output: " + formatNumbers(recipe.getEUOutput()) + " EU");
+ } else {
+ drawLine(index++, "EU Output: " + ReadableNumberConverter.INSTANCE.toWideReadableForm(recipe.getEUOutput()) + " EU");
+ }
+
+ 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++, "Base Recipe Chance: " + formatNumbers(100 * recipe.getBaseRecipeSuccessChance()) + "%");
drawLine(index, "Recipe Energy Efficiency: " + formatNumbers(100 * recipe.getRecipeEnergyEfficiency()) + "%");
drawOverlays(cachedRecipe);
@@ -134,6 +147,6 @@ public class TT_NEI_EyeOfHarmonyHandler extends GT_NEI_DefaultHandler {
@Override
protected void drawLine(int lineNumber, String line) {
- drawText(4, getDescriptionYOffset() + 30 + lineNumber * 9, line, 0xFF000000);
+ drawText(10, getDescriptionYOffset() + lineNumber * 10, line, 0xFF000000);
}
}
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 0095fdd409..b5493eaa09 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
@@ -9,6 +9,7 @@ import com.github.technus.tectech.mechanics.elementalMatter.core.maps.IEMMapRead
import com.github.technus.tectech.mechanics.elementalMatter.core.stacks.IEMStack;
import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable;
import com.gtnewhorizons.modularui.api.math.Pos2d;
+import com.gtnewhorizons.modularui.api.math.Size;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.common.widget.ProgressBar;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -20,6 +21,7 @@ import java.util.function.Supplier;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
+@SuppressWarnings("SpellCheckingInspection")
public class TT_recipe extends GT_Recipe {
public static final String E_RECIPE_ID = "eRecipeID";
public final EMConstantStackMap[] input;
@@ -252,7 +254,7 @@ public class TT_recipe extends GT_Recipe {
null,
RES_PATH_GUI + "basicmachines/Extractor",
1,
- 9 * 10,
+ 9 * 9,
1,
0,
1,
@@ -264,8 +266,7 @@ public class TT_recipe extends GT_Recipe {
.setProgressBar(GT_UITextures.PROGRESSBAR_HAMMER, ProgressBar.Direction.DOWN)
.setProgressBarPos(78 + 1, 24 + 2)
.setUsualFluidOutputCount(18)
- .setLogoPos(10, 10)
- .setNEIBackgroundSize(172, 82 + (9 + 10) * 18);
+ .setLogoPos(10, 10);
public static GT_Recipe_MapTT sResearchableFakeRecipes = new GT_Recipe_MapTT(
new HashSet<>(32),
@@ -538,6 +539,13 @@ public class TT_recipe extends GT_Recipe {
}
@Override
+ public GT_Recipe_Map setNEIBackgroundSize(int width, int height) {
+ useModularUI(true);
+ this.neiBackgroundSize = new Size(172, 80 + 9 * 18);
+ return this;
+ }
+
+ @Override
public boolean usesSpecialSlot() {
return false;
}
@@ -559,7 +567,7 @@ public class TT_recipe extends GT_Recipe {
@Override
public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) {
- return UIHelper.getItemGridPositions(fluidOutputCount, 8, yOrigin + 13 * 17 - 5, xDirMaxCount, 3);
+ return UIHelper.getItemGridPositions(fluidOutputCount, 8, yOrigin + 13 * 17 - 7 - 16, xDirMaxCount, 3);
}
@Override