use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class OreRecipeHandler method processCrushedCentrifuged.
public static void processCrushedCentrifuged(OrePrefix centrifugedPrefix, DustMaterial material) {
ItemStack dustStack = OreDictUnifier.get(OrePrefix.dust, material);
ItemStack byproductStack = OreDictUnifier.get(OrePrefix.dust, GTUtility.selectItemInList(2, material, material.oreByProducts, DustMaterial.class), 1);
RecipeMaps.FORGE_HAMMER_RECIPES.recipeBuilder().input(centrifugedPrefix, material).outputs(dustStack).duration(60).EUt(8).buildAndRegister();
RecipeMaps.MACERATOR_RECIPES.recipeBuilder().input(centrifugedPrefix, material).outputs(dustStack).chancedOutput(byproductStack, 1400, 850).duration(200).EUt(12).buildAndRegister();
ModHandler.addShapelessRecipe(String.format("centrifuged_ore_to_dust_%s", material), dustStack, 'h', new UnificationEntry(centrifugedPrefix, material));
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class PipeRecipeHandler method processPipeNormal.
private static void processPipeNormal(OrePrefix pipePrefix, IngotMaterial material) {
ItemStack pipeStack = OreDictUnifier.get(pipePrefix, material);
RecipeMaps.EXTRUDER_RECIPES.recipeBuilder().input(OrePrefix.ingot, material, 3).notConsumable(MetaItems.SHAPE_EXTRUDER_PIPE_MEDIUM).outputs(pipeStack).duration((int) material.getAverageMass()).EUt(6 * getVoltageMultiplier(material)).buildAndRegister();
ModHandler.addShapedRecipe(String.format("medium_%s_pipe", material.toString()), GTUtility.copyAmount(2, pipeStack), "XXX", "f h", "XXX", 'X', new UnificationEntry(OrePrefix.plate, material));
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class ToolRecipeHandler method processHammerHead.
public static void processHammerHead(OrePrefix toolPrefix, SolidMaterial solidMaterial) {
if (!solidMaterial.hasFlag(NO_WORKING)) {
processSimpleToolHead(toolPrefix, solidMaterial, MetaItems.HARD_HAMMER, "II ", "IIh", "II ");
}
SolidMaterial handleMaterial = Materials.Wood;
if (!solidMaterial.hasFlag(NO_WORKING)) {
ModHandler.addShapedRecipe(String.format("hammer_%s", solidMaterial.toString()), MetaItems.HARD_HAMMER.getStackForm(solidMaterial), "XX ", "XXS", "XX ", 'X', new UnificationEntry(OrePrefix.ingot, solidMaterial), 'S', new UnificationEntry(OrePrefix.stick, handleMaterial));
}
if (!solidMaterial.hasFlag(DustMaterial.MatFlags.NO_SMASHING)) {
int voltageMultiplier = getVoltageMultiplier(solidMaterial);
RecipeMaps.EXTRUDER_RECIPES.recipeBuilder().input(OrePrefix.ingot, solidMaterial, 6).notConsumable(MetaItems.SHAPE_EXTRUDER_HAMMER).outputs(OreDictUnifier.get(toolPrefix, solidMaterial)).duration((int) solidMaterial.getAverageMass() * 6).EUt(8 * voltageMultiplier).buildAndRegister();
}
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class ToolRecipeHandler method processWrenchHead.
public static void processWrenchHead(OrePrefix toolPrefix, SolidMaterial solidMaterial) {
processSimpleElectricToolHead(toolPrefix, solidMaterial, new MetaToolValueItem[] { MetaItems.WRENCH_LV, MetaItems.WRENCH_MV, MetaItems.WRENCH_HV });
ModHandler.addShapedRecipe(String.format("wrench_head_%s", solidMaterial.toString()), OreDictUnifier.get(OrePrefix.toolHeadWrench, solidMaterial), "hXW", "XRX", "WXd", 'X', new UnificationEntry(OrePrefix.plate, solidMaterial), 'R', new UnificationEntry(OrePrefix.ring, Materials.Steel), 'W', new UnificationEntry(OrePrefix.screw, Materials.Steel));
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class ToolRecipeHandler method processSimpleToolHead.
public static void processSimpleToolHead(OrePrefix toolPrefix, SolidMaterial solidMaterial, MetaToolValueItem toolItem, Object... recipe) {
Material handleMaterial = Materials.Wood;
ModHandler.addShapelessRecipe(String.format("%s_%s_%s", toolPrefix.name(), solidMaterial, handleMaterial), toolItem.getStackForm(solidMaterial), new UnificationEntry(toolPrefix, solidMaterial), new UnificationEntry(OrePrefix.stick, handleMaterial));
if (solidMaterial instanceof IngotMaterial && solidMaterial.hasFlag(GENERATE_PLATE)) {
addSimpleToolRecipe(toolPrefix, solidMaterial, toolItem, new UnificationEntry(OrePrefix.plate, solidMaterial), new UnificationEntry(OrePrefix.ingot, solidMaterial), recipe);
}
if (solidMaterial instanceof GemMaterial) {
addSimpleToolRecipe(toolPrefix, solidMaterial, toolItem, new UnificationEntry(OrePrefix.gem, solidMaterial), new UnificationEntry(OrePrefix.gem, solidMaterial), recipe);
}
}
Aggregations