aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-09-26 18:40:32 +1000
committerAlkalus <draknyte1@hotmail.com>2017-09-26 18:40:32 +1000
commit1435e8a664d28389a0220b6fdfb1d3e7980a7f4e (patch)
tree1cb593ffcc24248fcabcc6c24e5a6991929fac19
parent2f61b44487964411c9a02dcce70e39bae388805e (diff)
downloadGT5-Unofficial-1435e8a664d28389a0220b6fdfb1d3e7980a7f4e.tar.gz
GT5-Unofficial-1435e8a664d28389a0220b6fdfb1d3e7980a7f4e.tar.bz2
GT5-Unofficial-1435e8a664d28389a0220b6fdfb1d3e7980a7f4e.zip
% Changed Blast Smelter Recipe addition again. Input fluids should now be supported.
> This allows more alloys requiring oxygen or argon to be produced.
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java57
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java29
-rw-r--r--src/resources/assets/miscutils/textures/entity/golemStaballoy.pngbin5435 -> 5433 bytes
5 files changed, 100 insertions, 17 deletions
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index f41d2fd8a3..ac0ab3bd61 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -48,9 +48,20 @@ public class RECIPES_GREGTECH {
centrifugeRecipes();
benderRecipes();
cyclotronRecipes();
+ blastSmelterRecipes();
addFuels();
}
+ private static void blastSmelterRecipes() {
+ /*CORE.RA.addBlastSmelterRecipe(
+ new ItemStack[]{},
+ FluidUtils.getFluidStack(fluidName, amount),
+ 0,
+ aDuration,
+ aEUt)*/
+
+ }
+
private static void fluidcannerRecipes() {
GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), FluidUtils.getFluidStack("sulfuricacid", 250), null);
GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250));
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index bc25a32945..3a889fbf36 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -83,15 +83,29 @@ public interface IGregtech_RecipeAdder {
* Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs)
*
* @param aInput = ItemStack[] (not null, and respects StackSize)
- * @param aFluidOutput = Output of the UU-Matter (not null, and respects StackSize)
- * @param aChances = Output Change (can be == 0)
+ * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize)
+ * @param aChances = Output Chance (can be == 0)
* @param aDuration = Duration (must be >= 0)
- * @param aEUt = EU needed for heating up (must be >= 0)
+ * @param aEUt = EU per tick needed for heating up (must be >= 0)
* @return true if the Recipe got added, otherwise false.
*/
public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aOutput, int aChance, int aDuration, int aEUt);
+ /**
+ * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs)
+ *
+ * @param aInput = ItemStack[] (not null, and respects StackSize)
+ * @param aFluidInput = Input of a fluid (can be null, and respects StackSize)
+ * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize)
+ * @param aChances = Output Chance (can be == 0)
+ * @param aDuration = Duration (must be >= 0)
+ * @param aEUt = EU per tick needed for heating up (must be >= 0)
+ * @return true if the Recipe got added, otherwise false.
+ */
+ public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt);
+
+
public boolean addLFTRRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt);
public boolean addLFTRRecipe(ItemStack aInput1, FluidStack aInput2, ItemStack aOutput1, FluidStack aOutput2, int aDuration, int aEUt);
public boolean addLFTRRecipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java
index 31823932ee..2cf667da4f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java
@@ -15,6 +15,7 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator {
private final OrePrefixes[] mSmeltingPrefixes = {
OrePrefixes.crushed,
+ OrePrefixes.ingot,
OrePrefixes.crushedPurified,
OrePrefixes.crushedCentrifuged,
OrePrefixes.dust,
@@ -23,7 +24,7 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator {
OrePrefixes.dustRefined,
OrePrefixes.dustSmall,
OrePrefixes.dustTiny
- };
+ };
public RecipeGen_BlastSmelterGT_Ex() {
for (OrePrefixes tPrefix : this.mSmeltingPrefixes) tPrefix.add(this);
@@ -41,6 +42,11 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator {
}
}
}
+ case ingot:
+ if (aMaterial.mBlastFurnaceRequired) {
+ addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial);
+ }
+ break;
case dustSmall:
if (aMaterial.mBlastFurnaceRequired) {
addBlastRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial);
@@ -65,15 +71,15 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator {
break;
}
}
-
+
public boolean addBlastRecipe(ItemStack input1, ItemStack input2,
FluidStack fluid1, FluidStack fluid2, ItemStack output1,
ItemStack output2, int time, int euCost, Materials smeltInto) {
-
+
//Set up variables.
ItemStack[] components;
int count = 0;
-
+
if (smeltInto == Materials._NULL){
//If the material is null then we probably don't want to try.
return false;
@@ -88,24 +94,47 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator {
else if (input1 == null || input2 == null){
count = 1;
}
- if (fluid1 != null || fluid2 != null){
- //If it uses an input fluid, we cannot handle this. So let's not try. (Annealed copper for example)
- return false;
- }
-
//Set up input components.
ItemStack configCircuit = ItemUtils.getGregtechCircuit(count);
components = new ItemStack[]{configCircuit, input1, input2};
-
+ if (fluid1 != null || fluid2 != null){
+ //If it uses an input fluid, we cannot handle this. So let's not try. (Annealed copper for example)
+ //return false;
+ if (fluid1 != null && fluid2 != null){
+ //Cannot handle two input fluids
+ return false;
+ }
+ FluidStack mInputfluidstack;
+ if (fluid1 != null && fluid2 == null){
+ mInputfluidstack = fluid1;
+ }
+ else if (fluid1 == null && fluid2 != null){
+ mInputfluidstack = fluid2;
+ }
+ else {
+ mInputfluidstack = null;
+ }
+
+ //Try with new handler
+ //Add Blast Smelter Recipe.
+ return CORE.RA.addBlastSmelterRecipe(
+ components,
+ mInputfluidstack,
+ smeltInto.mSmeltInto.getMolten(144L),
+ 100,
+ MathUtils.roundToClosestInt(time*0.8),
+ euCost); // EU Cost
+
+ }
+
//Add Blast Smelter Recipe.
- CORE.RA.addBlastSmelterRecipe(
+ return CORE.RA.addBlastSmelterRecipe(
components,
smeltInto.mSmeltInto.getMolten(144L),
100,
MathUtils.roundToClosestInt(time*0.8),
euCost); // EU Cost
-
- return false;
+
}
-
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index d6b2fe0699..c372335155 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -286,6 +286,35 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, new ItemStack[]{null}, null, new int[]{aChance}, null, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
return true;
}
+
+ @Override
+ public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, final int aChance, int aDuration, final int aEUt) {
+ if ((aInput == null) || (aOutput == null)) {
+ Utils.LOG_WARNING("Fail - Input or Output was null.");
+ return false;
+ }
+
+
+ if (aOutput.isFluidEqual(Materials.PhasedGold.getMolten(1))) {
+ aOutput = Materials.VibrantAlloy.getMolten(aOutput.amount);
+ }
+ if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) {
+ aOutput = Materials.PulsatingIron.getMolten(aOutput.amount);
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) {
+ Utils.LOG_WARNING("Recipe did not register.");
+ return false;
+ }
+
+ for (int das=0;das<aInput.length;das++){
+ if (aInput[das] != null) {
+ Utils.LOG_WARNING("tMaterial["+das+"]: "+aInput[das].getDisplayName()+", Amount: "+aInput[das].stackSize);
+ }
+ }
+
+ Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, new ItemStack[]{null}, null, new int[]{aChance}, new FluidStack[]{aInputFluid}, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
+ return true;
+ }
diff --git a/src/resources/assets/miscutils/textures/entity/golemStaballoy.png b/src/resources/assets/miscutils/textures/entity/golemStaballoy.png
index be04898a0c..307a25bd3f 100644
--- a/src/resources/assets/miscutils/textures/entity/golemStaballoy.png
+++ b/src/resources/assets/miscutils/textures/entity/golemStaballoy.png
Binary files differ