Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Jan 11, 2025
1 parent 428f938 commit 0ec0326
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions src/main/java/reobf/proghatches/main/registration/PHRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
import static gregtech.api.util.GTRecipeConstants.FUEL_VALUE;
import static gregtech.api.util.GTRecipeConstants.RESEARCH_ITEM;
import static gregtech.api.util.GTRecipeConstants.RESEARCH_TIME;
//import static gregtech.api.util.GTRecipeConstants.RESEARCH_TIME;
import static gregtech.api.util.GTRecipeConstants.RTG_DURATION_IN_DAYS;
import static gtPlusPlus.api.recipe.GTPPRecipeMaps.rtgFuels;

Expand Down Expand Up @@ -49,6 +49,7 @@
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TierEU;
import gregtech.api.recipe.RecipeMaps;
import gregtech.api.recipe.RecipeMetadataKey;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTRecipe;
import gregtech.api.util.GTRecipeBuilder;
Expand All @@ -67,6 +68,29 @@
import thaumcraft.common.config.ConfigItems;
//spotless:off
public class PHRecipes implements Runnable {


public static <T extends GTRecipeBuilder > T setScan(T a,int time){
try {
RecipeMetadataKey x=(RecipeMetadataKey) GTRecipeConstants.class.getField("RESEARCH_TIME").get(null);
a.metadata(x, time);
} catch (Exception e) {
}
try {
RecipeMetadataKey x=(RecipeMetadataKey) GTRecipeConstants.class.getField("SCANNING").get(null);
Object scanning=Class.forName("gregtech.api.util.recipe.Scanning").getConstructor(int.class,long.class)
.newInstance(time,32);

a.metadata(x, scanning);
} catch (Exception e) {
}



return a;}



ItemStack[] arms = { Robot_Arm_LV.get(1), // GT++ deprecated ulv tier arm
Robot_Arm_LV.get(1), Robot_Arm_MV.get(1), Robot_Arm_HV.get(1), Robot_Arm_EV.get(1), Robot_Arm_IV.get(1),
Robot_Arm_LuV.get(1), Robot_Arm_ZPM.get(1), Robot_Arm_UV.get(1), Robot_Arm_UHV.get(1), Robot_Arm_UEV.get(1),
Expand Down Expand Up @@ -250,10 +274,12 @@ public void smartArm(){
}



setScan(
GTRecipeBuilder.builder()
,1 * HOURS
)
.metadata(RESEARCH_ITEM, new ItemStack(MyMod.smartarm, 1, ii-1))
.metadata(RESEARCH_TIME, 1 * HOURS)
// .metadata(RESEARCH_TIME, 1 * HOURS)
.itemInputs(
new Object[]{circuitM2,12},
new Object[]{circuitM1, 6},
Expand Down Expand Up @@ -1331,11 +1357,11 @@ public void run() {
.duration(20 * SECONDS).eut(GTValues.VP[3]).addTo(RecipeMaps.assemblerRecipes);



GTValues.RA.stdBuilder()
setScan(
GTValues.RA.stdBuilder() , 1 * HOURS )
.metadata(RESEARCH_ITEM, new ItemStack( GregTechAPI.sBlockMachines,
1,Config.metaTileEntityOffset+Registration.MappingSlaveOffset))
.metadata(RESEARCH_TIME, 1 * HOURS)
// .metadata(RESEARCH_TIME)
.itemInputs(
new ItemStack( GregTechAPI.sBlockMachines,
1,
Expand Down

0 comments on commit 0ec0326

Please sign in to comment.