diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-12-24 03:59:59 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-12-24 03:59:59 +0000 |
commit | 12dab5d109ac81034fd0a8fe18317024a996af61 (patch) | |
tree | c08e9a305f081fef24df556126be744d19f4c0f8 /src/Java/gtPlusPlus/xmod | |
parent | c1606dd2997151dbf09797092a04294230d42059 (diff) | |
download | GT5-Unofficial-12dab5d109ac81034fd0a8fe18317024a996af61.tar.gz GT5-Unofficial-12dab5d109ac81034fd0a8fe18317024a996af61.tar.bz2 GT5-Unofficial-12dab5d109ac81034fd0a8fe18317024a996af61.zip |
+ Added a config option to adjust the Turbine Rotor removal cut-off point.
+ Added some new Bags/Packs for various things. An Automatic Lunchbox, a Tool Box and a Magicians Satchel.
+ Added full compound of Eglin Steel to ABS. Closes #392.
- Removed all Multi-Tools.
$ Rewrote and Fixed the recipe system. All recipes are queued regardless of when called, then created during the end of the POST_INIT load phase. Fixes too many bugs to list. (Few more to do before tomorrow)
$ Fixed COFH Hard requirement. Closes #398.
% Adjusted the internal map type of the AutoMap. Should improve performance, if only in single digit cpu cycles.
> To-Do) Fix Recipes pertaining to compound materials made from using fluids. State may be detected wrong after recipe system changes.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
15 files changed, 253 insertions, 273 deletions
diff --git a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java index 3dbe10af59..d842c37fcd 100644 --- a/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java +++ b/src/Java/gtPlusPlus/xmod/forestry/bees/custom/GTPP_Bee_Definition.java @@ -852,7 +852,7 @@ public enum GTPP_Bee_Definition implements IBeeDefinition { private static ItemStack issStackValid(ItemStack result){ if (result == null){ - return ItemUtils.getSimpleStack(ModItems.AAA_Broken); + return ItemUtils.getErrorStack(1); } return result; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java index abf8fd9714..6903305f9d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java @@ -70,7 +70,6 @@ public class HANDLER_GT { //Only loads if the config option is true (default: true) if (CORE.ConfigSwitches.enableSkookumChoochers){ new MetaGeneratedGregtechTools(); - new ProcessingToolHeadChoocher().run(); } if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){ @@ -84,6 +83,12 @@ public class HANDLER_GT { } public static void postInit(){ + + //Only loads if the config option is true (default: true) + if (CORE.ConfigSwitches.enableSkookumChoochers){ + new ProcessingToolHeadChoocher().run(); + } + if (CORE.ConfigSwitches.enableNitroFix){ GregtechNitroDieselFix.run(); } @@ -103,6 +108,7 @@ public class HANDLER_GT { private static int removeCrudeTurbineRotors() { int aRemoved = 0; + int CUT = CORE.turbineCutoffBase; Item aU; Collection<GT_Recipe> aAssRecipes = GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList; //170, 172, 174, 176 @@ -122,7 +128,7 @@ public class HANDLER_GT { //Logger.INFO("Found assembler recipe outputting a GT Tool with a meta value of "+aMeta); if (aMeta >= 170 && aMeta <= 176) { //Found a Turbine - int aCutoff = aMeta == 170 ? 75000 : (aMeta == 172 ? 150000 : (aMeta == 174 ? 225000 : 300000)); + int aCutoff = aMeta == 170 ? CUT : (aMeta == 172 ? CUT*2 : (aMeta == 174 ? CUT*3 : CUT*4)); String aType = aMeta == 170 ? "Small " : (aMeta == 172 ? "" : (aMeta == 174 ? "Large " : "Huge ")); Materials aMainMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(aI); Materials aSecondaryMaterial = GT_MetaGenerated_Tool.getSecondaryMaterial(aI); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index fa4cb8a347..31317d5377 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -417,7 +417,10 @@ public enum GregtechItemList implements GregtechItemContainer { Machine_HV_Component_Maker, Machine_EV_Component_Maker, Machine_IV_Component_Maker, - + Machine_LuV_Component_Maker, + Machine_ZPM_Component_Maker, + Machine_UV_Component_Maker, + //Solar Generators GT_Solar_ULV, GT_Solar_LV, GT_Solar_MV, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java index 6ed5eecd38..e2a30851aa 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_AlloySmelter.java @@ -9,6 +9,7 @@ import gregtech.api.enums.ItemList; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; public class RecipeGen_AlloySmelter extends RecipeGen_Base { @@ -30,8 +31,10 @@ public class RecipeGen_AlloySmelter extends RecipeGen_Base { private void generateRecipes(final Material material){ final int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 60 : 15; + + //Nuggets - if (material.getIngot(1) != null && material.getNugget(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getNugget(1))) GT_Values.RA.addAlloySmelterRecipe( material.getIngot(1), ItemList.Shape_Mold_Nugget.get(0), @@ -40,7 +43,7 @@ public class RecipeGen_AlloySmelter extends RecipeGen_Base { 2 * tVoltageMultiplier); //Gears - if (material.getIngot(1) != null && material.getGear(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1))) GT_Values.RA.addAlloySmelterRecipe( material.getIngot(8), ItemList.Shape_Mold_Gear.get(0), @@ -49,7 +52,7 @@ public class RecipeGen_AlloySmelter extends RecipeGen_Base { 2 * tVoltageMultiplier); //Ingot - if (material.getIngot(1) != null && material.getNugget(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getNugget(1))) GT_Values.RA.addAlloySmelterRecipe( material.getNugget(9), ItemList.Shape_Mold_Ingot.get(0), diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java index 0182ca13e8..66941849f8 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Assembler.java @@ -33,6 +33,7 @@ public class RecipeGen_Assembler extends RecipeGen_Base { private void generateRecipes(final Material material){ //Frame Box + if (ItemUtils.checkForInvalidItems(new ItemStack[] {material.getRod(1), material.getFrameBox(1)})) GT_Values.RA.addAssemblerRecipe( material.getRod(4), ItemUtils.getGregtechCircuit(4), @@ -41,6 +42,7 @@ public class RecipeGen_Assembler extends RecipeGen_Base { 8); //Rotor + if (ItemUtils.checkForInvalidItems(new ItemStack[] {material.getPlate(1), material.getRing(1), material.getRotor(1)})) addAssemblerRecipe( material.getPlate(4), material.getRing(1), diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java index b588613224..d4051ff8bf 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java @@ -7,9 +7,7 @@ import net.minecraft.item.ItemStack; import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; -import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; @@ -35,7 +33,7 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { public RecipeGen_DustGeneration(final Material M){ this(M, false); } - + public RecipeGen_DustGeneration(final Material M, final boolean O){ this.toGenerate = M; this.disableOptional = O; @@ -59,74 +57,76 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { final ItemStack[] inputStacks = material.getMaterialComposites(); final ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing); - if (RecipeUtils.recipeBuilder( - tinyDust, tinyDust, tinyDust, - tinyDust, tinyDust, tinyDust, - tinyDust, tinyDust, tinyDust, - normalDust)){ - Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); - } - - if (RecipeUtils.recipeBuilder( - normalDust, null, null, - null, null, null, - null, null, null, - material.getTinyDust(9))){ - Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed"); - } + if (ItemUtils.checkForInvalidItems(tinyDust) && ItemUtils.checkForInvalidItems(normalDust)) { + if (RecipeUtils.recipeBuilder( + tinyDust, tinyDust, tinyDust, + tinyDust, tinyDust, tinyDust, + tinyDust, tinyDust, tinyDust, + normalDust)){ + Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + } - if (RecipeUtils.recipeBuilder( - smallDust, smallDust, null, - smallDust, smallDust, null, - null, null, null, - normalDust)){ - Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + if (RecipeUtils.recipeBuilder( + normalDust, null, null, + null, null, null, + null, null, null, + material.getTinyDust(9))){ + Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed"); + } } - - if (RecipeUtils.recipeBuilder( - null, normalDust, null, - null, null, null, - null, null, null, - material.getSmallDust(4))){ - Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + if (ItemUtils.checkForInvalidItems(smallDust) && ItemUtils.checkForInvalidItems(normalDust)) { + if (RecipeUtils.recipeBuilder( + smallDust, smallDust, null, + smallDust, smallDust, null, + null, null, null, + normalDust)){ + Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + } + if (RecipeUtils.recipeBuilder( + null, normalDust, null, + null, null, null, + null, null, null, + material.getSmallDust(4))){ + Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed"); + } } //Macerate blocks back to dusts. final ItemStack materialBlock = material.getBlock(1); final ItemStack materialFrameBox = material.getFrameBox(1); - if (materialBlock != null) { + if (ItemUtils.checkForInvalidItems(materialBlock)) { GT_ModHandler.addPulverisationRecipe(materialBlock, material.getDust(9)); } - if (materialFrameBox != null) { + if (ItemUtils.checkForInvalidItems(materialFrameBox)) { GT_ModHandler.addPulverisationRecipe(materialFrameBox, material.getDust(2)); } - - if (smallDust != null && tinyDust != null) { + + if (ItemUtils.checkForInvalidItems(smallDust) && ItemUtils.checkForInvalidItems(tinyDust)) { generatePackagerRecipes(material); } - + ItemStack ingot = material.getIngot(1); - if (normalDust != null && ingot != null) { + if (ItemUtils.checkForInvalidItems(normalDust) && ItemUtils.checkForInvalidItems(ingot)) { addFurnaceRecipe(material); addMacerationRecipe(material); } - + //Is this a composite? if ((inputStacks != null) && !disableOptional){ //Is this a composite? @@ -149,13 +149,13 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { //Get us four ItemStacks to input into the mixer ItemStack[] input = new ItemStack[4]; - + input[0] = (inputStacks.length >= 1) ? ((inputStacks[0] == null) ? null : inputStacks[0]) : null; input[1] = (inputStacks.length >= 2) ? ((inputStacks[1] == null) ? null : inputStacks[1]) : null; input[2] = (inputStacks.length >= 3) ? ((inputStacks[2] == null) ? null : inputStacks[2]) : null; input[3] = (inputStacks.length >= 4) ? ((inputStacks[3] == null) ? null : inputStacks[3]) : null; - - + + if (inputStacks.length == 1) { input[1] = input[0]; input[0] = CI.getNumberedCircuit(inputStacks.length+10); @@ -172,8 +172,8 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { input[1] = input[0]; input[0] = CI.getNumberedCircuit(inputStacks.length+10); } - - + + /*for (int g = 0; g<4; g++) { if(inputStacks.length > g) { input[g] = inputStacks[g] != null ? inputStacks[g] : null; @@ -285,7 +285,7 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { input2 = input1; input1 = CI.getNumberedCircuit(20); } - + //Add mixer Recipe FluidStack oxygen = GT_Values.NF; if (material.getComposites() != null){ @@ -344,14 +344,14 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { } return false; } - + public static boolean generatePackagerRecipes(Material aMatInfo) { AutoMap<Boolean> aResults = new AutoMap<Boolean>(); //Small Dust aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(4L, new Object[]{aMatInfo.getSmallDust(4)}), ItemList.Schematic_Dust.get(0L, new Object[0]), aMatInfo.getDust(1), 100, 4)); - //Tiny Dust + //Tiny Dust aResults.put(GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(9L, new Object[]{aMatInfo.getTinyDust(9)}), ItemList.Schematic_Dust.get(0L, new Object[0]), aMatInfo.getDust(1), 100, 4)); - + for (boolean b : aResults) { if (!b) { return false; @@ -359,7 +359,7 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { } return true; } - + private void addMacerationRecipe(Material aMatInfo){ try { Logger.MATERIALS("Adding Maceration recipe for "+aMatInfo.getLocalizedName()+" Ingot -> Dusts"); @@ -378,7 +378,7 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { try { if (aMatInfo.requiresBlastFurnace()) { aOutput = aMatInfo.getHotIngot(1); - if (aOutput != null) { + if (ItemUtils.checkForInvalidItems(aOutput)) { if (addBlastFurnaceRecipe(aMatInfo, aDust, null, aOutput, null, aMatInfo.getMeltingPointK())){ Logger.MATERIALS("Successfully added a blast furnace recipe for "+aMatInfo.getLocalizedName()); } @@ -392,7 +392,7 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { } else { aOutput = aMatInfo.getIngot(1); - if (aOutput != null) { + if (ItemUtils.checkForInvalidItems(aOutput)) { if (CORE.GT_Recipe.addSmeltingAndAlloySmeltingRecipe(aDust, aOutput)){ Logger.MATERIALS("Successfully added a furnace recipe for "+aMatInfo.getLocalizedName()); } @@ -437,6 +437,6 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base { return false; } } - + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java index 2fd7f93c2d..9315826495 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Extruder.java @@ -13,6 +13,7 @@ import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; public class RecipeGen_Extruder extends RecipeGen_Base { @@ -48,36 +49,38 @@ public class RecipeGen_Extruder extends RecipeGen_Base { Logger.WARNING("Generating Extruder recipes for "+material.getLocalizedName()); - //Ingot Recipe - if (material.getIngot(1) != null && material.getBlock(1) != null) - if (addExtruderRecipe( - material.getBlock(1), - shape_Ingot, - material.getIngot(9), - (int) Math.max(material.getMass() * 2L * 1, 1), - 4 * material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Failed"); - } + + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBlock(1))) { + //Ingot Recipe + if (addExtruderRecipe( + material.getBlock(1), + shape_Ingot, + material.getIngot(9), + (int) Math.max(material.getMass() * 2L * 1, 1), + 4 * material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Ingot Recipe: "+material.getLocalizedName()+" - Failed"); + } - //Block Recipe - if (material.getIngot(1) != null && material.getBlock(1) != null) - if (addExtruderRecipe( - material.getIngot(9), - shape_Block, - material.getBlock(1), - (int) Math.max(material.getMass() * 2L * 1, 1), - 8 * material.vVoltageMultiplier)){ - Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Failed"); + //Block Recipe + if (addExtruderRecipe( + material.getIngot(9), + shape_Block, + material.getBlock(1), + (int) Math.max(material.getMass() * 2L * 1, 1), + 8 * material.vVoltageMultiplier)){ + Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Extruder Block Recipe: "+material.getLocalizedName()+" - Failed"); + } } + //Plate Recipe - if (material.getIngot(1) != null && material.getPlate(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) if (addExtruderRecipe( itemIngot, shape_Plate, @@ -90,7 +93,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base { } //Ring Recipe - if (material.getIngot(1) != null && material.getRing(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRing(1))) if (!material.isRadioactive){ if (addExtruderRecipe( itemIngot, @@ -107,7 +110,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base { //Gear Recipe - if (material.getIngot(1) != null && material.getGear(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getGear(1))) if (!material.isRadioactive){ if (addExtruderRecipe( material.getIngot(4), @@ -124,7 +127,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base { //Rod Recipe - if (material.getIngot(1) != null && material.getRod(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) if (addExtruderRecipe( itemIngot, shape_Rod, @@ -139,7 +142,7 @@ public class RecipeGen_Extruder extends RecipeGen_Base { //Bolt Recipe - if (material.getIngot(1) != null && material.getBolt(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) if (!material.isRadioactive){ if (addExtruderRecipe( itemIngot, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java index 5e2675689b..433c07e948 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java @@ -10,6 +10,7 @@ import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; public class RecipeGen_Fluids extends RecipeGen_Base { @@ -46,7 +47,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { if (!material.requiresBlastFurnace()) { // Ingot - if (material.getIngot(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1))) if (GT_Values.RA.addFluidExtractionRecipe(material.getIngot(1), // Input null, // Input 2 material.getFluid(144), // Fluid Output @@ -62,7 +63,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Plate - if (material.getPlate(1) != null) + if (ItemUtils.checkForInvalidItems(material.getPlate(1))) if (GT_Values.RA.addFluidExtractionRecipe(material.getPlate(1), // Input null, // Input 2 material.getFluid(144), // Fluid Output @@ -78,7 +79,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Double Plate - if (material.getPlateDouble(1) != null) + if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1))) if (GT_Values.RA.addFluidExtractionRecipe(material.getPlateDouble(1), // Input null, // Input 2 material.getFluid(288), // Fluid Output @@ -94,7 +95,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Nugget - if (material.getNugget(1) != null) + if (ItemUtils.checkForInvalidItems(material.getNugget(1))) if (GT_Values.RA.addFluidExtractionRecipe(material.getNugget(1), // Input null, // Input 2 material.getFluid(16), // Fluid Output @@ -110,7 +111,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Block - if (material.getBlock(1) != null) + if (ItemUtils.checkForInvalidItems(material.getBlock(1))) if (GT_Values.RA.addFluidExtractionRecipe(material.getBlock(1), // Input null, // Input 2 material.getFluid(144 * 9), // Fluid Output @@ -130,7 +131,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { // Making Shapes from fluid // Ingot - if (material.getIngot(1) != null) + if (ItemUtils.checkForInvalidItems(material.getIngot(1))) if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), // Item Shape material.getFluid(144), // Fluid Input material.getIngot(1), // output @@ -145,7 +146,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Plate - if (material.getPlate(1) != null) + if (ItemUtils.checkForInvalidItems(material.getPlate(1))) if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0), // Item Shape material.getFluid(144), // Fluid Input material.getPlate(1), // output @@ -160,7 +161,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Nugget - if (material.getNugget(1) != null) + if (ItemUtils.checkForInvalidItems(material.getNugget(1))) if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), // Item Shape material.getFluid(16), // Fluid Input material.getNugget(1), // output @@ -175,7 +176,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Gears - if (material.getGear(1) != null) + if (ItemUtils.checkForInvalidItems(material.getGear(1))) if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0), // Item Shape material.getFluid(576), // Fluid Input material.getGear(1), // output @@ -189,7 +190,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Blocks - if (material.getBlock(1) != null) + if (ItemUtils.checkForInvalidItems(material.getBlock(1))) if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), // Item Shape material.getFluid(144 * 9), // Fluid Input material.getBlock(1), // output @@ -220,7 +221,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { ItemList mold_Ring = ItemList.valueOf("Shape_Mold_Ring"); // Rod - if (material.getRod(1) != null) + if (ItemUtils.checkForInvalidItems(material.getRod(1))) if (mold_Rod != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod.get(0), // Item Shape material.getFluid(72), // Fluid Input material.getRod(1), // output @@ -235,7 +236,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Rod Long - if (material.getLongRod(1) != null) + if (ItemUtils.checkForInvalidItems(material.getLongRod(1))) if (mold_Rod_Long != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod_Long.get(0), // Item // Shape material.getFluid(144), // Fluid Input @@ -251,7 +252,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Bolt - if (material.getBolt(1) != null) + if (ItemUtils.checkForInvalidItems(material.getBolt(1))) if (mold_Bolt != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Bolt.get(0), // Item Shape material.getFluid(18), // Fluid Input material.getBolt(1), // output @@ -266,7 +267,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Screw - if (material.getScrew(1) != null) + if (ItemUtils.checkForInvalidItems(material.getScrew(1))) if (mold_Screw != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Screw.get(0), // Item Shape material.getFluid(18), // Fluid Input material.getScrew(1), // output @@ -281,7 +282,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base { } // Ring - if (material.getRing(1) != null) + if (ItemUtils.checkForInvalidItems(material.getRing(1))) if (mold_Ring != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Ring.get(0), // Item Shape material.getFluid(36), // Fluid Input material.getRing(1), // output diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java index 9529b9019a..ddba6b5bf0 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java @@ -3,18 +3,21 @@ package gtPlusPlus.xmod.gregtech.loaders; import net.minecraft.item.ItemStack; import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; - +import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; import gtPlusPlus.api.objects.data.Pair; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialGenerator; import gtPlusPlus.core.material.MaterialStack; import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.recipe.common.CI; @@ -23,12 +26,17 @@ import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; import net.minecraftforge.fluids.FluidStack; -public class RecipeGen_Ore implements Runnable{ +public class RecipeGen_Ore extends RecipeGen_Base { - final Material toGenerate; + public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>(); + + static { + MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); + } public RecipeGen_Ore(final Material M){ this.toGenerate = M; + mRecipeGenMap.add(this); } @Override @@ -368,7 +376,7 @@ public class RecipeGen_Ore implements Runnable{ int mCounter = 0; for (Pair<Integer, Material> f : componentMap){ - if (f.getValue().getState() != MaterialState.SOLID){ + if (f.getValue().getState() != MaterialState.SOLID && f.getValue().getState() != MaterialState.ORE){ Logger.MATERIALS("[Dehydrator] Found Fluid Component, adding "+f.getKey()+" cells of "+f.getValue().getLocalizedName()+"."); mInternalOutputs[mCounter++] = f.getValue().getCell(f.getKey()); mCellCount += f.getKey(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java index 001c494356..15e64534f9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java @@ -14,6 +14,7 @@ import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; public class RecipeGen_Plates extends RecipeGen_Base { @@ -45,6 +46,7 @@ public class RecipeGen_Plates extends RecipeGen_Base { Logger.WARNING("Generating Plate recipes for "+material.getLocalizedName()); //Forge Hammer + if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Single)) if (addForgeHammerRecipe( ingotStackTwo, plate_Single, @@ -56,6 +58,7 @@ public class RecipeGen_Plates extends RecipeGen_Base { Logger.WARNING("Forge Hammer Recipe: "+material.getLocalizedName()+" - Failed"); } //Bender + if (ItemUtils.checkForInvalidItems(ingotStackOne) && ItemUtils.checkForInvalidItems(plate_Single)) if (addBenderRecipe( ingotStackOne, plate_Single, @@ -67,6 +70,7 @@ public class RecipeGen_Plates extends RecipeGen_Base { Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); } //Alloy Smelter + if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Single)) if (GT_Values.RA.addAlloySmelterRecipe( ingotStackTwo, shape_Mold, @@ -81,6 +85,7 @@ public class RecipeGen_Plates extends RecipeGen_Base { //Making Double Plates + if (ItemUtils.checkForInvalidItems(ingotStackTwo) && ItemUtils.checkForInvalidItems(plate_Double)) if (addBenderRecipe( ingotStackTwo, plate_Double, @@ -91,6 +96,8 @@ public class RecipeGen_Plates extends RecipeGen_Base { else { Logger.WARNING("Bender Recipe: "+material.getLocalizedName()+" - Failed"); } + + if (ItemUtils.checkForInvalidItems(plate_SingleTwo) && ItemUtils.checkForInvalidItems(plate_Double)) if (addBenderRecipe( plate_SingleTwo, plate_Double, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java index 8e3ef4e21d..e15c5da29e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java @@ -108,6 +108,10 @@ public class RecipeGen_Recycling implements Runnable { for (final Pair<OrePrefixes, ItemStack> validPrefix : mValidPairs) { try { + if (material == null || validPrefix == null) { + continue; + } + if (material.getState() != MaterialState.SOLID || validPrefix.getKey() == OrePrefixes.ingotHot){ continue; } @@ -118,7 +122,7 @@ public class RecipeGen_Recycling implements Runnable { int mFluidAmount = (int) GT_Utility.translateMaterialToFluidAmount(validPrefix.getKey().mMaterialAmount, true); //Maceration - if (tempStack != null) { + if (ItemUtils.checkForInvalidItems(tempStack)) { // mValidItems[mSlotIndex++] = tempStack; if ((mDust != null) && GT_ModHandler.addPulverisationRecipe(tempStack, mDust)) { Logger.WARNING("Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " @@ -133,12 +137,12 @@ public class RecipeGen_Recycling implements Runnable { } //Arc Furnace - if (tempStack != null) { + if (ItemUtils.checkForInvalidItems(tempStack)) { } //Fluid Extractor - if (tempStack != null) { + if (ItemUtils.checkForInvalidItems(tempStack)) { // mValidItems[mSlotIndex++] = tempStack; if ((mDust != null) && GT_Values.RA.addFluidExtractionRecipe(tempStack, null, material.getFluid(mFluidAmount), 0, 30, 8)) { Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle " diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java index 1646ab1535..79615d8457 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_ShapedCrafting.java @@ -13,6 +13,7 @@ import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; public class RecipeGen_ShapedCrafting extends RecipeGen_Base { @@ -21,7 +22,7 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { static { MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap); } - + public RecipeGen_ShapedCrafting(final Material M){ this.toGenerate = M; mRecipeGenMap.add(this); @@ -37,62 +38,63 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { if (!CORE.GTNH) { //Nuggets - if (material.getNugget(1) != null) - GT_ModHandler.addShapelessCraftingRecipe( - material.getIngot(1), - new Object[]{ - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1), - material.getNugget(1) - }); + if (ItemUtils.checkForInvalidItems(material.getNugget(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) + GT_ModHandler.addShapelessCraftingRecipe( + material.getIngot(1), + new Object[]{ + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1), + material.getNugget(1) + }); } - + //Plates - + //Single Plate Shaped/Shapeless - if (material.getPlate(1) != null && material.getIngot(1) != null) - GT_ModHandler.addCraftingRecipe( - material.getPlate(1), - gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"h", "B", "I", - Character.valueOf('I'), - material.getIngot(1), - Character.valueOf('B'), - material.getIngot(1)}); + if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) + if (material.getPlate(1) != null && material.getIngot(1) != null) + GT_ModHandler.addCraftingRecipe( + material.getPlate(1), + gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"h", "B", "I", + Character.valueOf('I'), + material.getIngot(1), + Character.valueOf('B'), + material.getIngot(1)}); - if (material.getPlate(1) != null && material.getIngot(1) != null) - GT_ModHandler.addShapelessCraftingRecipe( - material.getPlate(1), - new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - material.getIngot(1), - material.getIngot(1)}); + if (ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) + GT_ModHandler.addShapelessCraftingRecipe( + material.getPlate(1), + new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + material.getIngot(1), + material.getIngot(1)}); //Double Plate Shaped/Shapeless - if (material.getPlateDouble(1) != null && material.getPlate(1) != null) - GT_ModHandler.addCraftingRecipe( - material.getPlateDouble(1), - gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, - new Object[]{"I", "B", "h", - Character.valueOf('I'), - material.getPlate(1), - Character.valueOf('B'), - material.getPlate(1)}); + if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) + GT_ModHandler.addCraftingRecipe( + material.getPlateDouble(1), + gregtech.api.util.GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | gregtech.api.util.GT_ModHandler.RecipeBits.BUFFERED, + new Object[]{"I", "B", "h", + Character.valueOf('I'), + material.getPlate(1), + Character.valueOf('B'), + material.getPlate(1)}); - if (material.getPlateDouble(1) != null && material.getPlate(1) != null) - GT_ModHandler.addShapelessCraftingRecipe( - material.getPlateDouble(1), - new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, - material.getPlate(1), - material.getPlate(1)}); + if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1))) + GT_ModHandler.addShapelessCraftingRecipe( + material.getPlateDouble(1), + new Object[]{gregtech.api.enums.ToolDictNames.craftingToolForgeHammer, + material.getPlate(1), + material.getPlate(1)}); //Ring Recipe - if (!material.isRadioactive && material.getRing(1) != null && material.getRod(1) != null){ + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getRing(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { if (CORE.GTNH){ if (RecipeUtils.recipeBuilder( "craftingToolHardHammer", null, null, @@ -121,7 +123,7 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { //Framebox Recipe - if (!material.isRadioactive && material.getFrameBox(1) != null && material.getRod(1) != null){ + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getFrameBox(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { final ItemStack stackStick = material.getRod(1); if (RecipeUtils.recipeBuilder( stackStick, stackStick, stackStick, @@ -166,7 +168,7 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { //Shaped Recipe - Bolts - if (!material.isRadioactive && material.getBolt(1) != null && material.getRod(1) != null){ + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getBolt(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { if (RecipeUtils.recipeBuilder( "craftingToolSaw", null, null, null, material.getRod(1), null, @@ -181,47 +183,47 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { //Shaped Recipe - Ingot to Rod - if (material.getRod(1) != null && material.getIngot(1) != null) - if (RecipeUtils.recipeBuilder( - "craftingToolFile", null, null, - null, material.getIngot(1), null, - null, null, null, - material.getRod(1))){ - Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Failed"); - } + if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getIngot(1))) + if (RecipeUtils.recipeBuilder( + "craftingToolFile", null, null, + null, material.getIngot(1), null, + null, null, null, + material.getRod(1))){ + Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } //Shaped Recipe - Long Rod to two smalls - if (material.getRod(1) != null && material.getLongRod(1) != null) - if (RecipeUtils.recipeBuilder( - "craftingToolSaw", null, null, - material.getLongRod(1), null, null, - null, null, null, - material.getRod(2))){ - Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Failed"); - } + if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getLongRod(1))) + if (RecipeUtils.recipeBuilder( + "craftingToolSaw", null, null, + material.getLongRod(1), null, null, + null, null, null, + material.getRod(2))){ + Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } //Two small to long rod - if (material.getLongRod(1) != null && material.getRod(1) != null) - if (RecipeUtils.recipeBuilder( - material.getRod(1), "craftingToolHardHammer", material.getRod(1), - null, null, null, - null, null, null, - material.getLongRod(1))){ - Logger.WARNING("Long Rod Recipe: "+material.getLocalizedName()+" - Success"); - } - else { - Logger.WARNING("Long Rod Recipe: "+material.getLocalizedName()+" - Failed"); - } + if (ItemUtils.checkForInvalidItems(material.getLongRod(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) + if (RecipeUtils.recipeBuilder( + material.getRod(1), "craftingToolHardHammer", material.getRod(1), + null, null, null, + null, null, null, + material.getLongRod(1))){ + Logger.WARNING("Long Rod Recipe: "+material.getLocalizedName()+" - Success"); + } + else { + Logger.WARNING("Long Rod Recipe: "+material.getLocalizedName()+" - Failed"); + } //Rotor Recipe - if (!material.isRadioactive && material.getRotor(1) != null && material.getRing(1) != null && material.getPlate(1) != null && material.getScrew(1) != null){ + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getRotor(1)) && ItemUtils.checkForInvalidItems(material.getRing(1)) && !material.isRadioactive && ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getScrew(1))) { if (RecipeUtils.recipeBuilder( material.getPlate(1), "craftingToolHardHammer", material.getPlate(1), material.getScrew(1), material.getRing(1), "craftingToolFile", @@ -235,7 +237,7 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { } //Gear Recipe - if (!material.isRadioactive && material.getGear(1) != null && material.getPlate(1) != null && material.getRod(1) != null){ + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getGear(1)) && ItemUtils.checkForInvalidItems(material.getPlate(1)) && ItemUtils.checkForInvalidItems(material.getRod(1))) { if (RecipeUtils.recipeBuilder( material.getRod(1), material.getPlate(1), material.getRod(1), material.getPlate(1), "craftingToolWrench", material.getPlate(1), @@ -249,7 +251,7 @@ public class RecipeGen_ShapedCrafting extends RecipeGen_Base { } //Screws - if (!material.isRadioactive && material.getScrew(1) != null && material.getBolt(1) != null){ + if (!material.isRadioactive && ItemUtils.checkForInvalidItems(material.getScrew(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1))) { if (RecipeUtils.recipeBuilder( "craftingToolFile", material.getBolt(1), null, material.getBolt(1), null, null, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java index c611dda53e..94104ab0d5 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -129,7 +129,7 @@ public class GregtechConduits { wireFactory("RedstoneAlloy", 32, BaseWireID+45, 0, 2, 1, new short[]{178,34,34, 0}); } - if(!GTNH) { + if(!GTNH) { customWireFactory(ALLOY.LEAGRISIUM, 512, BaseWireID + 56, 1, 2, 2); customWireFactory(ELEMENT.getInstance().ZIRCONIUM, 128, BaseWireID + 67, 1, 2, 2); customWireFactory(ALLOY.HG1223, 32768, BaseWireID + 78, 2, 8, 4); @@ -235,8 +235,6 @@ public class GregtechConduits { } } - generateWireRecipes(aMaterial); - } private static void superConductorFactory(final GT_Materials Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps){ @@ -292,7 +290,7 @@ public class GregtechConduits { GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material), new GT_MetaPipeEntity_Fluid(startID+2, "GT_Pipe_"+material.mDefaultLocalName+"", ""+material.mDefaultLocalName+" Fluid Pipe", 0.5F, material, transferRatePerTick*6, heatResistance, isGasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material), new GT_MetaPipeEntity_Fluid(startID+3, "GT_Pipe_"+material.mDefaultLocalName+"_Large", "Large "+material.mDefaultLocalName+" Fluid Pipe", 0.75F, material, transferRatePerTick*8, heatResistance, isGasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GT_MetaPipeEntity_Fluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", GTNH?0.875F:1.0F, material, transferRatePerTick*10, heatResistance, isGasProof).getStackForm(1L)); - generatePipeRecipes(material.mDefaultLocalName, mass, voltage); + //generatePipeRecipes(material.mDefaultLocalName, mass, voltage); } private static void generateNonGTFluidPipes(final GT_Materials material, final Material myMaterial, final int startID, final int transferRatePerSec, final int heatResistance, final boolean isGasProof){ @@ -312,14 +310,14 @@ public class GregtechConduits { GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material), new GregtechMetaPipeEntityFluid(startID+2, "GT_Pipe_"+material.mDefaultLocalName+"", ""+material.mDefaultLocalName+" Fluid Pipe", 0.5F, material, transferRatePerTick*6, heatResistance, isGasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material), new GregtechMetaPipeEntityFluid(startID+3, "GT_Pipe_"+material.mDefaultLocalName+"_Large", "Large "+material.mDefaultLocalName+" Fluid Pipe", 0.75F, material, transferRatePerTick*8, heatResistance, isGasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GregtechMetaPipeEntityFluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", GTNH?0.875F:1.0F, material, transferRatePerTick*10, heatResistance, isGasProof).getStackForm(1L)); - generatePipeRecipes(material.mDefaultLocalName, mass, tVoltageMultiplier); + //generatePipeRecipes(material.mDefaultLocalName, mass, tVoltageMultiplier); } - private static void generatePipeRecipes(final String materialName, final long Mass, final long vMulti){ + public static void generatePipeRecipes(final String materialName, final long Mass, final long vMulti){ String output = materialName.substring(0, 1).toUpperCase() + materialName.substring(1); - output = output.replace("-", "").replace("_", "").replace(" ", ""); + output = Utils.sanitizeString(output); if (output.equals("VoidMetal")){ output = "Void"; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java index adaabed10f..d0b9d9287f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java @@ -1,15 +1,8 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; -import static gtPlusPlus.core.recipe.common.CI.bitsd; - -import gregtech.api.enums.ItemList; -import gregtech.api.util.GT_ModHandler; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.material.ALLOY; -import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.FluidUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ControlCore; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler_Adv; @@ -60,21 +53,6 @@ public class GregtechCustomHatches { "Naquadah Reactor Input hatch" // Local name ).getStackForm(1L)); - RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[6], ALLOY.MARAGING250.getGear(1), CI.component_Plate[6], - CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_AdvancedVacuum.get(1), - CI.getTieredCircuitOreDictName(4), CI.component_Plate[5], ItemList.Hatch_Input_IV.get(1), - CI.component_Plate[5], GregtechItemList.Hatch_Input_Cryotheum.get(1L, new Object[0])); - - RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[5], ALLOY.MARAGING300.getGear(1), CI.component_Plate[5], - CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_Adv_BlastFurnace.get(1), - CI.getTieredCircuitOreDictName(4), CI.component_Plate[6], ItemList.Hatch_Input_IV.get(1), - CI.component_Plate[6], GregtechItemList.Hatch_Input_Pyrotheum.get(1L, new Object[0])); - - RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[8], ALLOY.HG1223.getGear(1), CI.component_Plate[9], - CI.getTieredCircuitOreDictName(7), GregtechItemList.Casing_Naq_Reactor_A.get(1), - CI.getTieredCircuitOreDictName(7), CI.component_Plate[9], ItemList.Hatch_Input_ZPM.get(1), - CI.component_Plate[8], GregtechItemList.Hatch_Input_Naquadah.get(1L, new Object[0])); - } private static void run2() { @@ -106,35 +84,6 @@ public class GregtechCustomHatches { .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30009, "hatch.muffler.adv.tier.09", "Advanced Muffler Hatch (MAX)", 9)) .getStackForm(1L)); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_LV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_MV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_HV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_HV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_HV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_EV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_EV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_EV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_IV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_IV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_IV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LuV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LuV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_LuV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_ZPM.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_ZPM.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_ZPM.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_UV.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_UV.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_UV.get(1) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MAX.get(1L, new Object[0]), bitsd, - new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MAX.get(1), Character.valueOf('P'), - GregtechItemList.Pollution_Cleaner_MAX.get(1) }); - - //GT++ multiblock Control Core Bus GregtechItemList.Hatch_Control_Core .set((new GT_MetaTileEntity_Hatch_ControlCore(30020, "hatch.control.adv", "Control Core Module", 1)) diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java index 3741955e7b..bbe2d10273 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechPollutionDevices.java @@ -2,8 +2,6 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.recipe.common.CI; -import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_AirIntake; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaAtmosphericReconditioner; @@ -53,11 +51,7 @@ public class GregtechPollutionDevices { } GregtechItemList.Hatch_Air_Intake.set(new GT_MetaTileEntity_Hatch_AirIntake(861, "hatch.air.intake.tier.00", "Air Intake Hatch", 5).getStackForm(1L)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[4], "rotorGtStainlessSteel", CI.component_Plate[4], - CI.getTieredCircuitOreDictName(3), CI.machineHull_HV, CI.getTieredCircuitOreDictName(3), - CI.component_Plate[4], CI.electricPump_HV, CI.component_Plate[4], - GregtechItemList.Hatch_Air_Intake.get(1L, new Object[0])); + } |