aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2018-05-27 18:08:07 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2018-05-27 18:08:07 +1000
commit32b61f816d9f8bd63ff3cd8eb0f9e129116f47d6 (patch)
tree3bafb8a99446833020be12acbb3b55842dba134d /src
parent86689424df4766f3042751dca10bb1bab9a03f69 (diff)
downloadGT5-Unofficial-32b61f816d9f8bd63ff3cd8eb0f9e129116f47d6.tar.gz
GT5-Unofficial-32b61f816d9f8bd63ff3cd8eb0f9e129116f47d6.tar.bz2
GT5-Unofficial-32b61f816d9f8bd63ff3cd8eb0f9e129116f47d6.zip
$ Fixed empty ABS recipes being generated.
$ Findbugs fixes.
Diffstat (limited to 'src')
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java204
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java6
4 files changed, 9 insertions, 205 deletions
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index 1cdc08c1db..84db0bd7af 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -117,209 +117,7 @@ public class RECIPES_GREGTECH {
FluidUtils.getFluidStack("molten.trinium", 136 * 144), 0, 20 * 3000,
2040);
}
-
- /*
- // Red Steel
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(6),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 4),
- ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 4),
- ItemUtils.getItemStackOfAmountFromOreDict("dustZinc", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustBismuth", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSteel", 10),
- ItemUtils.getItemStackOfAmountFromOreDict("dustBlackSteel", 20) },
- FluidUtils.getFluidStack("molten.redsteel", 40 * 144), 0, MathUtils.findPercentageOfInt(65 * 20, 80),
- !CORE.GTNH ? 120 : 480);
-
- // Blue Steel
- CORE.RA.addBlastSmelterRecipe(new ItemStack[] { ItemUtils.getGregtechCircuit(5),
- ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 12),
- ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 18),
- ItemUtils.getItemStackOfAmountFromOreDict("dustZinc", 5),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSteel", 30),
- ItemUtils.getItemStackOfAmountFromOreDict("dustBlackSteel", 60)
-
- }, FluidUtils.getFluidStack("molten.bluesteel", 125 * 144), 0, MathUtils.findPercentageOfInt(70 * 20, 80), !CORE.GTNH ? 120 : 480);
-
- // Stainless Steel
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(14),
- ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 6),
- ItemUtils.getItemStackOfAmountFromOreDict("dustNickel", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustManganese", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 1) },
- FluidUtils.getFluidStack("molten.stainlesssteel", 9 * 144), 0,
- MathUtils.findPercentageOfInt(85 * 20, 80), !CORE.GTNH ? 120 : 480);
-
- // Eglin
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(7),
- ItemUtils.getItemStackOfAmountFromOreDict("dustNickel", 5),
- ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 23),
- ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3),
- ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 3),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSilicon", 12) },
- FluidUtils.getFluidStack("molten.eglinsteel", 48 * 144), 0, MathUtils.findPercentageOfInt(30 * 20, 80),
- 120);
- if (!CORE.GTNH) {
-
- // TungstenSteel
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(2),
- ItemUtils.getItemStackOfAmountFromOreDict("ingotTungsten", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("ingotSteel", 1) },
- FluidUtils.getFluidStack("molten.tungstensteel", 2 * 144), 0,
- MathUtils.findPercentageOfInt(75 * 20, 80), 480);
-
- // HSS-G
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(14),
- ItemUtils.getItemStackOfAmountFromOreDict("dustTungstenSteel", 5),
- ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustMolybdenum", 2),
- ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 1) },
- FluidUtils.getFluidStack("molten.hssg", 9 * 144), 0, MathUtils.findPercentageOfInt(450 * 20, 80),
- 120);
-
- // HSS-G
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(5),
- ItemUtils.getItemStackOfAmountFromOreDict("dustTungsten", 5),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSteel", 5),
- ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 2),
- ItemUtils.getItemStackOfAmountFromOreDict("dustMolybdenum", 4),
- ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 2) },
- FluidUtils.getFluidStack("molten.hssg", 18 * 144), 0, MathUtils.findPercentageOfInt(900 * 20, 80),
- 120);
-
- // HSS-E
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(14),
- ItemUtils.getItemStackOfAmountFromOreDict("dustHSSG", 6),
- ItemUtils.getItemStackOfAmountFromOreDict("dustCobalt", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSilicon", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustManganese", 1) },
- FluidUtils.getFluidStack("molten.hsse", 9 * 144), 0, MathUtils.findPercentageOfInt(540 * 20, 80),
- 120);
-
- // HSS-S
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(3),
- ItemUtils.getItemStackOfAmountFromOreDict("dustHSSG", 6),
- ItemUtils.getItemStackOfAmountFromOreDict("dustOsmium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 2) },
- FluidUtils.getFluidStack("molten.hsss", 9 * 144), 0, MathUtils.findPercentageOfInt(810 * 20, 80),
- 120);
-
- // Osmiridium
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(2),
- ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 3),
- ItemUtils.getItemStackOfAmountFromOreDict("dustOsmium", 1) },
- Materials.Helium.getGas(1000), FluidUtils.getFluidStack("molten.osmiridium", 4 * 144), 0,
- MathUtils.findPercentageOfInt(500 * 20, 80), 1920);
-
- // Naq Alloy
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(2),
- ItemUtils.getItemStackOfAmountFromOreDict("dustNaquadah", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustOsmiridium", 1) },
- Materials.Argon.getGas(1000), FluidUtils.getFluidStack("molten.naquadahalloy", 2 * 144), 0,
- MathUtils.findPercentageOfInt(500 * 20, 80), 30720);
-
- // Nickel-Zinc-Ferrite
- if (Materials.get("NickelZincFerrite") != null) {
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(2),
- ItemUtils.getItemStackOfAmountFromOreDict("dustFerriteMixture", 6) },
- Materials.Oxygen.getGas(2000), FluidUtils.getFluidStack("molten.nickelzincferrite", 2 * 144), 0,
- MathUtils.findPercentageOfInt(600 * 20, 80), 120);
- }
-
- // Gallium-Arsenide
- if (Materials.get("GalliumArsenide") != null) {
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(2),
- ItemUtils.getItemStackOfAmountFromOreDict("dustGallium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustArsenic", 1) },
- FluidUtils.getFluidStack("molten.galliumarsenide", 2 * 144), 0,
- MathUtils.findPercentageOfInt(600 * 20, 80), 120);
- }
-
- // TungstenCarbide
- if (Materials.get("TungstenCarbide") != null) {
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(12),
- ItemUtils.getItemStackOfAmountFromOreDict("dustTungsten", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1) },
- FluidUtils.getFluidStack("molten.tungstencarbide", 2 * 144), 0,
- MathUtils.findPercentageOfInt(
- (int) Math.max(Materials.get("TungstenCarbide").getMass() / 40L, 1L)
- * Materials.get("TungstenCarbide").mBlastFurnaceTemp,
- 80),
- 480);
- }
-
- // Vanadium-Gallium
- if (Materials.get("VanadiumGallium") != null) {
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(12),
- ItemUtils.getItemStackOfAmountFromOreDict("dustGallium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 3) },
- FluidUtils.getFluidStack("molten.vanadiumgallium", 4 * 144), 0,
- MathUtils.findPercentageOfInt((int) Math.max(Materials.VanadiumGallium.getMass() / 40L, 1L)
- * Materials.VanadiumGallium.mBlastFurnaceTemp, 80),
- 480);
- }
-
- // EIO
- // Dark Steel
- if (ItemUtils.getItemStackOfAmountFromOreDict("dustElectricalSteel", 1) != ItemUtils
- .getSimpleStack(ModItems.AAA_Broken)) {
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(2),
- ItemUtils.getItemStackOfAmountFromOreDict("dustElectricalSteel", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustObsidian", 1) },
- FluidUtils.getFluidStack("molten.darksteel", 2 * 144), 0,
- MathUtils.findPercentageOfInt(200 * 20, 80), 120);
- }
-
- // Pulsating Iron
- if (ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1) != ItemUtils
- .getSimpleStack(ModItems.AAA_Broken)) {
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(2),
- ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1),
- ItemUtils.getSimpleStack(Items.ender_pearl) },
- FluidUtils.getFluidStack("molten.pulsatingiron", 2 * 144), 0,
- MathUtils.findPercentageOfInt(8 * 20, 80), 120);
- }
-
- // Energetic Alloy
- if (ItemUtils.getItemStackOfAmountFromOreDict("dustEnergeticAlloy", 1) != ItemUtils
- .getSimpleStack(ModItems.AAA_Broken)) {
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(12),
- ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1),
- ItemUtils.getSimpleStack(Items.glowstone_dust) },
- FluidUtils.getFluidStack("molten.redstone", 144),
- FluidUtils.getFluidStack("molten.energeticalloy", 144), 0,
- MathUtils.findPercentageOfInt(9 * 20, 80), 120);
- }
-
- // Vibrant Alloy
- if (ItemUtils.getItemStackOfAmountFromOreDict("dustVibrantAlloy", 1) != ItemUtils
- .getSimpleStack(ModItems.AAA_Broken)) {
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] { ItemUtils.getGregtechCircuit(12),
- ItemUtils.getItemStackOfAmountFromOreDict("dustEnergeticAlloy", 1),
- ItemUtils.getSimpleStack(Items.ender_pearl) },
- FluidUtils.getFluidStack("molten.vibrantalloy", 144), 0,
- MathUtils.findPercentageOfInt(16 * 20, 80), 480);
- }
- }*/
+
}
private static void fluidcannerRecipes() {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
index e3eb5e7549..6f60a71c77 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
@@ -23,7 +23,7 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT_MetaTileEntity_Hatch_InputBattery
extends
GT_MetaTileEntity_Hatch {
- public GT_Recipe_Map mRecipeMap = null;
+ public final GT_Recipe_Map mRecipeMap = null;
public GT_MetaTileEntity_Hatch_InputBattery(int aID, String aName,
String aNameRegional, int aTier) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 386d259cab..ac856a7a93 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -97,7 +97,7 @@ GT_MetaTileEntity_MultiBlockBase {
public String[] getInfoData() {
AutoMap<String> mInfo = new AutoMap<String>();
- if (this.getMetaName() != "") {
+ if (!this.getMetaName().equals("")) {
mInfo.put(this.getMetaName());
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index f15eb5cf3a..05861d2525 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -12,6 +12,7 @@ import gregtech.api.util.Recipe_GT;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.data.ArrayUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
@@ -375,6 +376,11 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
+ aInput[das].stackSize);
}
}
+
+ ArrayUtils.removeNulls(aInput);
+ if (aInput.length <= 1) {
+ return false;
+ }
Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, new ItemStack[] { null }, null,
new int[] { aChance*10 }, new FluidStack[] { aInputFluid }, new FluidStack[] { aOutput }, aDuration, aEUt,