aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-10-27 01:47:39 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-10-27 01:47:39 +1000
commitb074293f70fec5df93a6d0610d99a5183dd2cbfd (patch)
treee7c533859b8c2a1e08c188724eae8dabd86e4e25 /src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
parent7000eb5d40f2536ebe7971354fa55d0dab2d265a (diff)
downloadGT5-Unofficial-b074293f70fec5df93a6d0610d99a5183dd2cbfd.tar.gz
GT5-Unofficial-b074293f70fec5df93a6d0610d99a5183dd2cbfd.tar.bz2
GT5-Unofficial-b074293f70fec5df93a6d0610d99a5183dd2cbfd.zip
% Cleaned up material/Material.java using PMD to a rather decent level.
> Inadvertently this refactored things in other classes. % Changed the Blast Smelter Casing Block textures.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java61
1 files changed, 39 insertions, 22 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
index e27a9167ca..4f847d697f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
@@ -10,7 +10,7 @@ import net.minecraft.item.ItemStack;
public class RecipeGen_DustGeneration {
public static void generateRecipes(Material material){
- int tVoltageMultiplier = material.getMeltingPoint_K() >= 2800 ? 64 : 16;
+ int tVoltageMultiplier = material.getMeltingPointK() >= 2800 ? 64 : 16;
Utils.LOG_WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName()); //TODO
//Ring Recipe
@@ -80,30 +80,47 @@ public class RecipeGen_DustGeneration {
Utils.LOG_WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
}
-
- if (inputStacks.length > 0 && inputStacks.length <= 4){
- Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks));
- long[] inputStackSize = material.vSmallestRatio;
- if (inputStackSize != null){
- for (short x=0;x<inputStacks.length;x++){
- if (inputStacks[x] != null && inputStackSize[x] != 0)
- inputStacks[x].stackSize = (int) inputStackSize[x];
- }
- Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks));
- if (GT_Values.RA.addMixerRecipe(
- inputStacks[0], inputStacks[1],
- inputStacks[2], inputStacks[3],
- null, null,
- outputStacks,
- (int) Math.max(material.getMass() * 2L * 1, 1),
- 6 * material.vVoltageMultiplier)){
- Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Utils.LOG_WARNING("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed");
+ //Is this a composite?
+ if (inputStacks != null){
+ //Is this a composite?
+ Utils.LOG_INFO("mixer length: "+inputStacks.length);
+ if (inputStacks.length != 0 && inputStacks.length <= 4){
+ //Log Input items
+ Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks));
+ long[] inputStackSize = material.vSmallestRatio;
+ Utils.LOG_INFO("mixer is stacksizeVar null? "+(inputStackSize != null));
+ //Is smallest ratio invalid?
+ if (inputStackSize != null){
+ //set stack sizes on an input ItemStack[]
+ for (short x=0;x<inputStacks.length;x++){
+ if (inputStacks[x] != null && inputStackSize[x] != 0)
+ inputStacks[x].stackSize = (int) inputStackSize[x];
+ }
+ //Relog input values, with stack sizes
+ Utils.LOG_WARNING(ItemUtils.getArrayStackNames(inputStacks));
+ //Add mixer Recipe
+ if (GT_Values.RA.addMixerRecipe(
+ inputStacks[0], inputStacks[1],
+ inputStacks[2], inputStacks[3],
+ null, null,
+ outputStacks,
+ (int) Math.max(material.getMass() * 2L * 1, 1),
+ 6 * material.vVoltageMultiplier))
+ {
+ Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Utils.LOG_INFO("Dust Mixer Recipe: "+material.getLocalizedName()+" - Failed");
+ }
}
}
}
+
+
+
+
+
+
}
}