GT5-Unofficial/src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java

33 lines
2.1 KiB
Java
Raw Normal View History

2015-06-23 22:29:05 +00:00
package gregtech.loaders.oreprocessing;
2015-10-03 13:23:52 +00:00
import appeng.core.Api;
import gregtech.GT_Mod;
2015-10-22 02:06:25 +00:00
import gregtech.api.enums.*;
2015-06-23 22:29:05 +00:00
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_RecipeRegistrator;
import gregtech.api.util.GT_Utility;
import net.minecraft.item.ItemStack;
2015-10-22 02:06:25 +00:00
public class ProcessingNugget implements gregtech.api.interfaces.IOreRecipeRegistrator {
public ProcessingNugget() {
OrePrefixes.nugget.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if (aMaterial == Materials.Iron)
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.WroughtIron, 1L));
if (!aMaterial.contains(SubTag.NO_WORKING))
GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), null, (int) Math.max(aMaterial.getMass() / 4L, 1L), 8);
GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), aMaterial.contains(SubTag.SMELTING_TO_GEM) ? ItemList.Shape_Mold_Ball.get(0L, new Object[0]) : ItemList.Shape_Mold_Ingot.get(0L, new Object[0]), GT_OreDictUnificator.get(aMaterial.contains(SubTag.SMELTING_TO_GEM) ? OrePrefixes.gem : OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 200, 2);
if (aMaterial.mStandardMoltenFluid != null)
GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0L, new Object[0]), aMaterial.getMolten(16L), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), 16, 4);
GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null);
GT_RecipeRegistrator.registerReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false);
if (GT_Mod.gregtechproxy.mAE2Integration) {
Api.INSTANCE.registries().matterCannon().registerAmmo(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), aMaterial.getMass());
;
}
}
2015-06-23 22:29:05 +00:00
}