use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class MaterialRecipeHandler method processGem.
public static void processGem(OrePrefix gemPrefix, GemMaterial material) {
long materialAmount = gemPrefix.materialAmount;
ItemStack crushedStack = OreDictUnifier.getDust(material, materialAmount);
if (material.hasFlag(MORTAR_GRINDABLE)) {
ModHandler.addShapedRecipe(String.format("gem_to_dust_%s_%s", material, gemPrefix), crushedStack, "X", "m", 'X', new UnificationEntry(gemPrefix, material));
}
OrePrefix prevPrefix = GTUtility.getItem(GEM_ORDER, GEM_ORDER.indexOf(gemPrefix) - 1, null);
ItemStack prevStack = prevPrefix == null ? ItemStack.EMPTY : OreDictUnifier.get(prevPrefix, material, 2);
if (!prevStack.isEmpty()) {
ModHandler.addShapelessRecipe(String.format("gem_to_gem_%s_%s", prevPrefix, material), prevStack, "h", new UnificationEntry(gemPrefix, material));
RecipeMaps.FORGE_HAMMER_RECIPES.recipeBuilder().input(gemPrefix, material).outputs(prevStack).duration(20).EUt(16).buildAndRegister();
}
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class MaterialRecipeHandler method processTinyDust.
public static void processTinyDust(OrePrefix orePrefix, DustMaterial material) {
ItemStack tinyDustStack = OreDictUnifier.get(orePrefix, material);
ItemStack dustStack = OreDictUnifier.get(OrePrefix.dust, material);
ModHandler.addShapedRecipe(String.format("tiny_dust_disassembling_%s", material.toString()), GTUtility.copyAmount(9, tinyDustStack), "X ", " ", 'X', new UnificationEntry(OrePrefix.dust, material));
ModHandler.addShapedRecipe(String.format("tiny_dust_assembling_%s", material.toString()), dustStack, "XXX", "XXX", "XXX", 'X', new UnificationEntry(orePrefix, material));
RecipeMaps.PACKER_RECIPES.recipeBuilder().input(orePrefix, material, 9).inputs(new CountableIngredient(new IntCircuitIngredient(1), 0)).outputs(dustStack).buildAndRegister();
RecipeMaps.UNPACKER_RECIPES.recipeBuilder().input(OrePrefix.dust, material).inputs(new CountableIngredient(new IntCircuitIngredient(1), 0)).outputs(GTUtility.copyAmount(9, tinyDustStack)).buildAndRegister();
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class PartsRecipeHandler method processStick.
public static void processStick(OrePrefix stickPrefix, DustMaterial material) {
if (material instanceof GemMaterial || material instanceof IngotMaterial) {
RecipeMaps.LATHE_RECIPES.recipeBuilder().input(material instanceof GemMaterial ? OrePrefix.gem : OrePrefix.ingot, material).outputs(OreDictUnifier.get(OrePrefix.stick, material, 2)).duration((int) Math.max(material.getAverageMass() * 2, 1)).EUt(16).buildAndRegister();
}
if (material.hasFlag(GENERATE_BOLT_SCREW)) {
ItemStack boltStack = OreDictUnifier.get(OrePrefix.bolt, material);
RecipeMaps.CUTTER_RECIPES.recipeBuilder().input(stickPrefix, material).outputs(GTUtility.copyAmount(4, boltStack)).duration((int) Math.max(material.getAverageMass() * 2L, 1L)).EUt(4).buildAndRegister();
ModHandler.addShapedRecipe(String.format("bolt_saw_%s", material.toString()), GTUtility.copyAmount(2, boltStack), "s ", " X", 'X', new UnificationEntry(OrePrefix.stick, material));
}
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class PartsRecipeHandler method processFineWire.
public static void processFineWire(OrePrefix fineWirePrefix, IngotMaterial material) {
ItemStack fineWireStack = OreDictUnifier.get(fineWirePrefix, material);
ModHandler.addShapelessRecipe(String.format("fine_wire_%s", material.toString()), fineWireStack, 'x', new UnificationEntry(OrePrefix.foil, material));
if (material.cableProperties != null) {
RecipeMaps.WIREMILL_RECIPES.recipeBuilder().input(OrePrefix.wireGtSingle, material).outputs(OreDictUnifier.get(OrePrefix.wireFine, material, 4)).duration(200).EUt(8).buildAndRegister();
} else {
RecipeMaps.WIREMILL_RECIPES.recipeBuilder().input(OrePrefix.ingot, material).outputs(OreDictUnifier.get(OrePrefix.wireFine, material, 8)).duration(400).EUt(8).buildAndRegister();
}
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class PartsRecipeHandler method processPlate.
public static void processPlate(OrePrefix platePrefix, DustMaterial material) {
if (material.shouldGenerateFluid()) {
RecipeMaps.FLUID_SOLIDFICATION_RECIPES.recipeBuilder().notConsumable(MetaItems.SHAPE_MOLD_PLATE).fluidInputs(material.getFluid(L)).outputs(OreDictUnifier.get(platePrefix, material)).duration(40).EUt(8).buildAndRegister();
}
if (material.hasFlag(MORTAR_GRINDABLE)) {
ItemStack dustStack = OreDictUnifier.get(OrePrefix.dust, material);
ModHandler.addShapedRecipe(String.format("plate_to_dust_%s", material), dustStack, "X", "m", 'X', new UnificationEntry(OrePrefix.plate, material));
}
}
Aggregations