diff options
author | chochem <40274384+chochem@users.noreply.github.com> | 2023-05-17 18:38:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 19:38:56 +0200 |
commit | 4323ab8af257370237d8fd312e9e4024bccc67ab (patch) | |
tree | 46b51d9db218e6a5b18518f4d42bb0325e729d72 /src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java | |
parent | 8e59f92c37c7d035c9c914aff4dbedfb77f0fec9 (diff) | |
download | GT5-Unofficial-4323ab8af257370237d8fd312e9e4024bccc67ab.tar.gz GT5-Unofficial-4323ab8af257370237d8fd312e9e4024bccc67ab.tar.bz2 GT5-Unofficial-4323ab8af257370237d8fd312e9e4024bccc67ab.zip |
More RA2 conversion for automatic gt recipes (#2000)
* fully convert all wiremill recipes and clean up unnecessary duplicate code
* fully convert all polarizer recipes
* fully convert all canner recipes
* RA2 for oredict plank recipes
* RA2 for oredict stoneCobble recipes
* convert some assembler recipes to RA2
* fix
* fix2
* remove recipes that were never in the game
Diffstat (limited to 'src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java')
-rw-r--r-- | src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java | 203 |
1 files changed, 108 insertions, 95 deletions
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java index e36eed66ab..78bfe32e3c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java @@ -1,5 +1,11 @@ package gregtech.loaders.oreprocessing; +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sAssemblerRecipes; +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sCutterRecipes; +import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sLatheRecipes; +import static gregtech.api.util.GT_RecipeBuilder.SECONDS; +import static gregtech.api.util.GT_RecipeBuilder.TICKS; + import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -22,89 +28,60 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { if (aOreDictName.startsWith("plankWood")) { - GT_Values.RA.addLatheRecipe( - GT_Utility.copyAmount(1L, aStack), - GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L), - null, - 10, - 8); - GT_Values.RA.addCNCRecipe( - GT_Utility.copyAmount(4L, aStack), - GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Wood, 1L), - 800, - 1); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(8L, aStack), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), - new ItemStack(Blocks.noteblock, 1), - 200, - 4); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(8L, aStack), - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 1L), - new ItemStack(Blocks.jukebox, 1), - 400, - 4); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(1L, aStack), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 1L), - ItemList.Crate_Empty.get(1L), - 200, - 1); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(1L, aStack), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.WroughtIron, 1L), - ItemList.Crate_Empty.get(1L), - 200, - 1); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(1L, aStack), - GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L), - ItemList.Crate_Empty.get(1L), - 200, - 1); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(1L, aStack), - ItemList.Circuit_Integrated.getWithDamage(0L, 1L), - new ItemStack(Blocks.wooden_button, 1), - 100, - 4); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(2L, aStack), - ItemList.Circuit_Integrated.getWithDamage(0L, 2L), - new ItemStack(Blocks.wooden_pressure_plate, 1), - 200, - 4); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(3L, aStack), - ItemList.Circuit_Integrated.getWithDamage(0L, 3L), - new ItemStack(Blocks.trapdoor, 1), - 300, - 4); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(4L, aStack), - ItemList.Circuit_Integrated.getWithDamage(0L, 4L), - new ItemStack(Blocks.crafting_table, 1), - 400, - 4); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(6L, aStack), - ItemList.Circuit_Integrated.getWithDamage(0L, 6L), - new ItemStack(Items.wooden_door, 1), - 600, - 4); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(8L, aStack), - ItemList.Circuit_Integrated.getWithDamage(0L, 8L), - new ItemStack(Blocks.chest, 1), - 800, - 4); - GT_Values.RA.addAssemblerRecipe( - GT_Utility.copyAmount(6L, aStack), - new ItemStack(Items.book, 3), - new ItemStack(Blocks.bookshelf, 1), - 400, - 4); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(1L, aStack)) + .itemOutputs(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L)) + .noFluidInputs() + .noFluidOutputs() + .duration(10 * TICKS) + .eut(8) + .addTo(sLatheRecipes); + GT_Values.RA.stdBuilder() + .itemInputs( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Iron, 1L)) + .itemOutputs(ItemList.Crate_Empty.get(1L)) + .noFluidInputs() + .noFluidOutputs() + .duration(10 * SECONDS) + .eut(1) + .addTo(sAssemblerRecipes); + GT_Values.RA.stdBuilder() + .itemInputs( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.WroughtIron, 1L)) + .itemOutputs(ItemList.Crate_Empty.get(1L)) + .noFluidInputs() + .noFluidOutputs() + .duration(10 * SECONDS) + .eut(1) + .addTo(sAssemblerRecipes); + GT_Values.RA.stdBuilder() + .itemInputs( + GT_Utility.copyAmount(1L, aStack), + GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 1L)) + .itemOutputs(ItemList.Crate_Empty.get(1L)) + .noFluidInputs() + .noFluidOutputs() + .duration(10 * SECONDS) + .eut(1) + .addTo(sAssemblerRecipes); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(8L, aStack), GT_Utility.getIntegratedCircuit(8)) + .itemOutputs(new ItemStack(Blocks.chest, 1)) + .noFluidInputs() + .noFluidOutputs() + .duration(40 * SECONDS) + .eut(4) + .addTo(sAssemblerRecipes); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(6L, aStack), new ItemStack(Items.book, 3)) + .itemOutputs(new ItemStack(Blocks.bookshelf, 1)) + .noFluidInputs() + .noFluidOutputs() + .duration(20 * SECONDS) + .eut(4) + .addTo(sAssemblerRecipes); if (aStack.getItemDamage() == 32767) { for (byte i = 0; i < 64; i = (byte) (i + 1)) { @@ -112,12 +89,30 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist // Get Recipe and Output, add recipe to delayed removal ItemStack tOutput = GT_ModHandler.getRecipeOutput(tStack, tStack, tStack); if ((tOutput != null) && (tOutput.stackSize >= 3)) { - GT_Values.RA.addCutterRecipe( - GT_Utility.copyAmount(1L, tStack), - GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), - null, - 25, - 4); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(1L, tStack)) + .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) + .fluidInputs(Materials.Water.getFluid(4)) + .noFluidOutputs() + .duration(2 * 25 * TICKS) + .eut(4) + .addTo(sCutterRecipes); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(1L, tStack)) + .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) + .fluidInputs(GT_ModHandler.getDistilledWater(3)) + .noFluidOutputs() + .duration(2 * 25 * TICKS) + .eut(4) + .addTo(sCutterRecipes); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(1L, tStack)) + .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) + .fluidInputs(Materials.Lubricant.getFluid(1)) + .noFluidOutputs() + .duration(25 * TICKS) + .eut(4) + .addTo(sCutterRecipes); GT_ModHandler.removeRecipeDelayed(tStack, tStack, tStack); GT_ModHandler.addCraftingRecipe( GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), @@ -131,12 +126,30 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist ? GT_ModHandler.getRecipeOutput(aStack, aStack, aStack) : GT_ModHandler.getRecipeOutputNoOreDict(aStack, aStack, aStack); if ((tOutput != null) && (tOutput.stackSize >= 3)) { - GT_Values.RA.addCutterRecipe( - GT_Utility.copyAmount(1L, aStack), - GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), - null, - 25, - 4); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(1L, aStack)) + .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) + .fluidInputs(Materials.Water.getFluid(4)) + .noFluidOutputs() + .duration(2 * 25) + .eut(4) + .addTo(sCutterRecipes); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(1L, aStack)) + .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) + .fluidInputs(GT_ModHandler.getDistilledWater(3)) + .noFluidOutputs() + .duration(2 * 25) + .eut(4) + .addTo(sCutterRecipes); + GT_Values.RA.stdBuilder() + .itemInputs(GT_Utility.copyAmount(1L, aStack)) + .itemOutputs(GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput)) + .fluidInputs(Materials.Lubricant.getFluid(1)) + .noFluidOutputs() + .duration(25) + .eut(4) + .addTo(sCutterRecipes); GT_ModHandler.removeRecipeDelayed(aStack, aStack, aStack); GT_ModHandler.addCraftingRecipe( GT_Utility.copyAmount(tOutput.stackSize / 3, tOutput), |