-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Zorbatron/recipe-change
Add recipes for the CoAL casings and a couple silly recipes + Config fix
- Loading branch information
Showing
16 changed files
with
275 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/com/zorbatron/zbgt/api/recipes/helpers/RecipeIOMod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.zorbatron.zbgt.api.recipes.helpers; | ||
|
||
import com.github.bsideup.jabel.Desugar; | ||
|
||
import gregtech.api.recipes.RecipeMap; | ||
|
||
@Desugar | ||
public record RecipeIOMod(RecipeMap<?> recipeMap, int minItemInputs, int minItemOutputs, int minFluidInputs, | ||
int minFluidOutputs) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.zorbatron.zbgt.recipe; | ||
|
||
import static gregtech.api.unification.material.Materials.Water; | ||
import static net.minecraft.init.Blocks.COBBLESTONE; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
import appeng.api.AEApi; | ||
import appeng.api.definitions.IMaterials; | ||
import gregtech.api.GTValues; | ||
import gregtech.api.recipes.RecipeMaps; | ||
|
||
public class AE2Recipes { | ||
|
||
public static void init() { | ||
final IMaterials ae2Materials = AEApi.instance().definitions().materials(); | ||
|
||
RecipeMaps.COMPRESSOR_RECIPES.recipeBuilder() | ||
.input(COBBLESTONE, 256_000) | ||
.outputs(ae2Materials.singularity().maybeStack(1).orElse(ItemStack.EMPTY)) | ||
.EUt(GTValues.VA[GTValues.HV]).duration(20 * 60) | ||
.buildAndRegister(); | ||
|
||
RecipeMaps.COMPRESSOR_RECIPES.recipeBuilder() | ||
.fluidInputs(Water.getFluid(256_000_000)) | ||
.outputs(ae2Materials.singularity().maybeStack(1).orElse(ItemStack.EMPTY)) | ||
.EUt(GTValues.VA[GTValues.HV]).duration(20 * 60) | ||
.buildAndRegister(); | ||
} | ||
} |
104 changes: 104 additions & 0 deletions
104
src/main/java/com/zorbatron/zbgt/recipe/CasingRecipes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package com.zorbatron.zbgt.recipe; | ||
|
||
import static com.zorbatron.zbgt.recipe.helpers.RecipeAssists.*; | ||
import static gregtech.api.GTValues.*; | ||
import static gregtech.api.recipes.RecipeMaps.ASSEMBLER_RECIPES; | ||
import static gregtech.api.recipes.RecipeMaps.ASSEMBLY_LINE_RECIPES; | ||
import static gregtech.api.unification.material.Materials.Naquadria; | ||
import static gregtech.api.unification.ore.OrePrefix.*; | ||
|
||
import java.util.Arrays; | ||
|
||
import net.minecraft.util.IStringSerializable; | ||
|
||
import com.zorbatron.zbgt.common.block.ZBGTMetaBlocks; | ||
import com.zorbatron.zbgt.common.block.blocks.CoALCasing; | ||
import com.zorbatron.zbgt.common.block.blocks.ZBGTBlockMultiblockCasing; | ||
|
||
import gregtech.api.block.VariantBlock; | ||
import gregtech.api.recipes.ModHandler; | ||
import gregtech.api.unification.OreDictUnifier; | ||
import gregtech.api.unification.material.Material; | ||
import gregtech.api.unification.material.Materials; | ||
import gregtech.common.ConfigHolder; | ||
|
||
public class CasingRecipes { | ||
|
||
public static void init() { | ||
ZBGTBlockMultiblockCasings(); | ||
CoALCasings(); | ||
} | ||
|
||
private static void ZBGTBlockMultiblockCasings() { | ||
Arrays.stream(ZBGTBlockMultiblockCasing.CasingType.values()).forEach( | ||
casing -> registerMetalCasingRecipe(casing.getMaterial(), ZBGTMetaBlocks.MULTIBLOCK_CASING, casing)); | ||
} | ||
|
||
// Copied from GCYL: CEu | ||
private static < | ||
T extends Enum<T> & IStringSerializable> void registerMetalCasingRecipe(Material inputMaterial, | ||
VariantBlock<T> outputCasingType, | ||
T outputCasing) { | ||
ModHandler.addShapedRecipe(String.format("metal_casing_%s", inputMaterial), | ||
outputCasingType.getItemVariant(outputCasing, ConfigHolder.recipes.casingsPerCraft), | ||
"PhP", "PFP", "PwP", | ||
'P', OreDictUnifier.get(plate, inputMaterial), | ||
'F', OreDictUnifier.get(frameGt, inputMaterial)); | ||
|
||
ASSEMBLER_RECIPES.recipeBuilder().duration(50).EUt(16) | ||
.input(plate, inputMaterial, 6) | ||
.input(frameGt, inputMaterial) | ||
.circuitMeta(6) | ||
.outputs(outputCasingType.getItemVariant(outputCasing, ConfigHolder.recipes.casingsPerCraft)) | ||
.buildAndRegister(); | ||
} | ||
|
||
private static void CoALCasings() { | ||
for (int tier = LV; tier <= IV; tier++) { | ||
ASSEMBLER_RECIPES.recipeBuilder() | ||
.input(frameGt, getMaterialByTier(tier)) | ||
.input(plateDense, getMaterialByTier(tier), 4) | ||
.input(getRobotArmByTier(tier), 4) | ||
.input(getPistonByTier(tier), 8) | ||
.input(getMotorByTier(tier), 10) | ||
.input(gear, getMaterialByTier(tier), 4) | ||
.input(cableGtQuadruple, getCableByTier(tier), 6) | ||
.input(circuit, getMarkerMaterialByTier(tier), 8) | ||
.input(circuit, getMarkerMaterialByTier(tier - 1), 16) | ||
.fluidInputs(Materials.SolderingAlloy.getFluid(tier * L * 2)) | ||
.outputs(ZBGTMetaBlocks.CoAL_CASING.getItemVariant(CoALCasing.CasingType.getCasingByTier(tier))) | ||
.EUt(VA[tier]).duration(150) | ||
.buildAndRegister(); | ||
} | ||
|
||
for (int tier = LuV; tier <= UV; tier++) { | ||
int fluidAdditive = (tier - ZPM) * 2; | ||
int finalTier = tier; | ||
|
||
ASSEMBLY_LINE_RECIPES.recipeBuilder() | ||
.input(frameGt, getMaterialByTier(tier)) | ||
.input(plateDense, getMaterialByTier(tier), 6) | ||
.input(getRobotArmByTier(tier), 8) | ||
.input(getPistonByTier(tier)) | ||
.input(getMotorByTier(tier), 16) | ||
.input(gear, getMaterialByTier(tier)) | ||
.input(gearSmall, getMaterialByTier(tier)) | ||
.input(cableGtQuadruple, getCableByTier(tier), 8) | ||
.input(circuit, getMarkerMaterialByTier(tier), 8) | ||
.input(circuit, getMarkerMaterialByTier(tier - 1), 16) | ||
.fluidInputs(Materials.SolderingAlloy.getFluid((10 + fluidAdditive) * L)) | ||
.fluidInputs(tier > ZPM ? | ||
Materials.Polybenzimidazole.getFluid((10 + fluidAdditive) * L * 2) : | ||
Materials.Polyethylene.getFluid((10 + fluidAdditive) * L * 2)) | ||
.fluidInputs(tier > ZPM ? Naquadria.getFluid((10 + fluidAdditive) * L * 2) : null) | ||
.outputs(ZBGTMetaBlocks.CoAL_CASING.getItemVariant(CoALCasing.CasingType.getCasingByTier(tier))) | ||
.stationResearch(research -> research | ||
.researchStack(ZBGTMetaBlocks.CoAL_CASING | ||
.getItemVariant(CoALCasing.CasingType.getCasingByTier(finalTier - 1))) | ||
.CWUt((int) Math.pow(16, finalTier - IV)) | ||
.EUt(VA[finalTier])) | ||
.EUt(VA[tier]).duration(20 * 15) | ||
.buildAndRegister(); | ||
} | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...tron/zbgt/loaders/recipe/CoALRecipes.java → ...om/zorbatron/zbgt/recipe/CoALRecipes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ron/zbgt/loaders/recipe/CoverRecipes.java → ...m/zorbatron/zbgt/recipe/CoverRecipes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.