aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/nei/GT_NEI_MolecularTransformer.java
blob: fc2c16b423228526952a39aea587c6aaf4c1530c (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
34
35
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, "Usage: " + MathUtils.formatNumbers(tEUt * aRecipe.mSpecialValue) + " EU/t", -16777216);
			drawText(10, 93, "Voltage: " + MathUtils.formatNumbers(tEUt) + " EU", -16777216);
			drawText(10, 103, "Amperage: " + aRecipe.mSpecialValue, -16777216);			
		}
		if (tDuration > 0) {
			drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : MathUtils.formatNumbers(Long.valueOf(tDuration / 20))) + " secs", -16777216);
		}		
	}

}