aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java
blob: 65e4c651c1123f5ced206c797b520c3f1df92728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package gtPlusPlus.nei;

import codechicken.nei.recipe.TemplateRecipeHandler;
import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.util.math.MathUtils;

public class GT_NEI_MolecularTransformer extends GTPP_NEI_DefaultHandler {

	public GT_NEI_MolecularTransformer() {
		super(GTPP_Recipe_Map.sMolecularTransformerRecipes);
	}
	
	@Override
	public TemplateRecipeHandler newInstance() {
		return new GT_NEI_MolecularTransformer();
	}

	@Override
	public void drawExtras(final int aRecipeIndex) {
		GT_Recipe aRecipe = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe;
		final long tEUt = aRecipe.mEUt;
		final long tDuration = aRecipe.mDuration;
		if (tEUt != 0) {
			drawText(10, 73, "Total: " + MathUtils.formatNumbers((long) (tDuration * tEUt)) + " EU", -16777216);
			drawText(10, 83, "Voltage: " + MathUtils.formatNumbers(tEUt) + " EU", -16777216);
		}
		if (tDuration > 0) {
			drawText(10, 93, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(0.05d * tDuration)) + " secs", -16777216);
		}		
	}

}