Fixes a handfull of recipe issues in FTB Beyond, closes #1021

(cherry picked from commit eef08aa)
This commit is contained in:
modmuss50 2017-05-23 12:52:30 +01:00
parent 4e47e2102e
commit ae5b07d6bb
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
3 changed files with 23 additions and 20 deletions

View file

@ -32,7 +32,7 @@ public class CentrifugeRecipe extends BaseRecipe {
boolean useOreDic = false;
public CentrifugeRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3,
public CentrifugeRecipe(Object input1, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3,
ItemStack output4, int tickTime, int euPerTick) {
super(Reference.centrifugeRecipe, tickTime, euPerTick);
if (input1 != null)
@ -49,7 +49,7 @@ public class CentrifugeRecipe extends BaseRecipe {
addOutput(output4);
}
public CentrifugeRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3,
public CentrifugeRecipe(Object input1, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3,
ItemStack output4, int tickTime, int euPerTick, boolean useOreDic) {
this(input1, input2, output1, output2, output3, output4, tickTime, euPerTick);
this.useOreDic = useOreDic;

View file

@ -327,11 +327,12 @@ public class ModRecipes {
ItemParts.getPartByName("NaKCoolantSimple"), 'W',
IC2Duplicates.CABLE_ICOPPER.getStackBasedOnConfig(), 'C',
"circuitBasic");
CraftingHelper.addShapedOreRecipe(ItemUpgrades.getUpgradeByName("transformer"), "GGG", "WTW", "GCG", 'G',
"blockGlass", 'W', IC2Duplicates.CABLE_IGOLD.getStackBasedOnConfig(), 'C',
"circuitBasic", 'T', IC2Duplicates.MVT.getStackBasedOnConfig());
}
CraftingHelper.addShapedOreRecipe(ItemUpgrades.getUpgradeByName("transformer"), "GGG", "WTW", "GCG", 'G',
"blockGlass", 'W', IC2Duplicates.CABLE_IGOLD.getStackBasedOnConfig(), 'C',
"circuitBasic", 'T', IC2Duplicates.MVT.getStackBasedOnConfig());
CraftingHelper.addShapedOreRecipe(ItemUpgrades.getUpgradeByName("energy_storage"), "PPP", "WBW", "PCP", 'P',
"plankWood", 'W', IC2Duplicates.CABLE_ICOPPER.getStackBasedOnConfig(), 'C',
@ -361,7 +362,7 @@ public class ModRecipes {
CraftingHelper
.addShapedOreRecipe(ItemParts.getPartByName("dataControlCircuit"), "ADA", "DID", "ADA", 'I', "ingotIridium",
'A', ItemParts.getPartByName("advancedCircuit"), 'D', ItemParts.getPartByName("dataStorageCircuit"));
'A', "circuitAdvanced", 'D', ItemParts.getPartByName("dataStorageCircuit"));
CraftingHelper
.addShapedOreRecipe(ItemParts.getPartByName("dataOrb"), "DDD", "DSD", "DDD",

View file

@ -102,7 +102,7 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
register(getMaterial("red_garnet", 16, Type.DUST), 3000, getMaterial("pyrope", 3, Type.DUST), getMaterial("almandine", 5, Type.DUST), getMaterial("spessartine", 8, Type.DUST));
register(getMaterial("yellow_garnet", 16, Type.DUST), 3500, getMaterial("andradite", 5, Type.DUST), getMaterial("grossular", 8, Type.DUST), getMaterial("uvarovite", 3, Type.DUST));
register(getMaterial("dark_ashes", 2, Type.DUST), 240, getMaterial("ashes", 2, Type.DUST));
register(getMaterial("marble", 8, Type.DUST), 1040, getMaterial("magnesium", Type.DUST), getMaterial("calcite", 7, Type.DUST));
register("dustMarble", 1040, getMaterial("magnesium", Type.DUST), getMaterial("calcite", 7, Type.DUST));
register(getMaterial("basalt", 16, Type.DUST), 2040, getMaterial("peridot", Type.DUST), getMaterial("calcite", 3, Type.DUST), getMaterial("flint", 8, Type.DUST), getMaterial("dark_ashes", 4, Type.DUST));
register(getMaterial("hydrogen", 4, Type.CELL), 3000, getMaterial("deuterium", Type.CELL));
register(getMaterial("deuterium", 4, Type.CELL), 3000, getMaterial("tritium", Type.CELL));
@ -111,7 +111,7 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
register(getMaterial("sulfur", Type.CELL), 40, getMaterial("sulfur", Type.DUST));
}
static void register(ItemStack input, int ticks, boolean oreDict, ItemStack... outputs) {
static void register(Object input, int ticks, boolean oreDict, ItemStack... outputs) {
ItemStack output1;
ItemStack output2 = null;
ItemStack output3 = null;
@ -143,19 +143,21 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
}
if (input.getItem() instanceof DynamicCell) {
int inputCount = input.getCount();
if (cellCount < inputCount) {
if (output2 == null) {
output2 = DynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output3 == null) {
output3 = DynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output4 == null) {
output4 = DynamicCell.getEmptyCell(inputCount - cellCount);
if(input instanceof ItemStack){
if (((ItemStack) input).getItem() instanceof DynamicCell) {
int inputCount = ((ItemStack) input).stackSize;
if (cellCount < inputCount) {
if (output2 == null) {
output2 = DynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output3 == null) {
output3 = DynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output4 == null) {
output4 = DynamicCell.getEmptyCell(inputCount - cellCount);
}
}
}
cellCount -= inputCount;
cellCount -= inputCount;
}
}
if (cellCount < 0) {
@ -171,7 +173,7 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
RecipeHandler.addRecipe(new CentrifugeRecipe(input, cells, output1, output2, output3, output4, ticks, 5, oreDict));
}
static void register(ItemStack input, int ticks, ItemStack... outputs) {
static void register(Object input, int ticks, ItemStack... outputs) {
register(input, ticks, true, outputs);
}
}