diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2022-01-15 13:07:16 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2022-01-15 13:07:16 +0000 |
commit | d3c655a124b349fa7f78b52ca9651c2c4140198a (patch) | |
tree | 0afa1f191379a9efc4ff0495fdca26718777fb06 /src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java | |
parent | f6599e799922840f2e5c94d2c0b638357e75e5cd (diff) | |
download | GT5-Unofficial-d3c655a124b349fa7f78b52ca9651c2c4140198a.tar.gz GT5-Unofficial-d3c655a124b349fa7f78b52ca9651c2c4140198a.tar.bz2 GT5-Unofficial-d3c655a124b349fa7f78b52ca9651c2c4140198a.zip |
Added missing recipes for Rotors and Fine Wire.
Hopefully remove bad plasma related recipes.
Hopefully cleaned up Wire/Cable recipes.
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)); + } } } |