diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java index 5f53defc2f..7355ac7dc0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java @@ -8,6 +8,8 @@ import gregtech.api.util.GT_Utility; import gtPlusPlus.api.interfaces.RunnableWithInfo; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialGenerator; +import gtPlusPlus.core.recipe.common.CI; +import gtPlusPlus.core.util.minecraft.ItemUtils; import net.minecraft.item.ItemStack; public class RecipeGen_Plasma extends RecipeGen_Base { @@ -27,15 +29,18 @@ public class RecipeGen_Plasma extends RecipeGen_Base { generateRecipes(this.toGenerate); } - private void generateRecipes(final Material material) { - // Cool Plasma - ItemStack aPlasmaCell = material.getPlasmaCell(1); - ItemStack aCell = material.getCell(1); - if (material.getPlasmaCell(1) != null){ - GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : null, (int) Math.max(1024L, 1024L * material.getMass()), 4); - } - if (material.getCell(1) != null && material.getPlasmaCell(1) != null){ - GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L)); + private void generateRecipes(final Material material) { + if (material.getPlasma() != null) { + // Cool Plasma + ItemStack aPlasmaCell = material.getPlasmaCell(1); + ItemStack aCell = material.getCell(1); + ItemStack aContainerItem = GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : CI.emptyCells(1); + if (ItemUtils.checkForInvalidItems(new ItemStack[] {aPlasmaCell, aContainerItem})){ + GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), aContainerItem, (int) Math.max(1024L, 1024L * material.getMass()), 4); + } + if (ItemUtils.checkForInvalidItems(new ItemStack[] {aCell, aPlasmaCell})){ + GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L)); + } } } |