aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java
blob: e3dc24099532a189a6c5266b8d65710c72afe7d5 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package gtPlusPlus.xmod.gregtech.loaders;

import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;

import gtPlusPlus.core.material.Material;

public class RecipeGen_AlloySmelter  implements Runnable{

	final Material toGenerate;

	public RecipeGen_AlloySmelter(final Material M){
		this.toGenerate = M;
	}

	@Override
	public void run() {
		generateRecipes(this.toGenerate);
	}

	public static void generateRecipes(final Material material){
		final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 60 : 15;

		//Nuggets
		GT_Values.RA.addAlloySmelterRecipe(
				material.getIngot(1),
				ItemList.Shape_Mold_Nugget.get(1),
				material.getNugget(9),
				(int) Math.max(material.getMass() * 2L, 1L),
				2 * tVoltageMultiplier);

		//Gears
		GT_Values.RA.addAlloySmelterRecipe(
				material.getIngot(8),
				ItemList.Shape_Mold_Gear.get(1),
				material.getGear(1),
				(int) Math.max(material.getMass() * 2L, 1L),
				2 * tVoltageMultiplier);
		
		//Ingot
		GT_Values.RA.addAlloySmelterRecipe(
				material.getNugget(9),
				ItemList.Shape_Mold_Ingot.get(1),
				material.getIngot(1),
				(int) Math.max(material.getMass() * 2L, 1L),
				2 * tVoltageMultiplier);

	}

}