aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
authorMaya <10861407+serenibyss@users.noreply.github.com>2024-11-23 16:25:15 -0600
committerGitHub <noreply@github.com>2024-11-23 22:25:15 +0000
commiteb61c36844bbe980bf87f8f6f438c3ce41745fa3 (patch)
tree273ada649a825c64df13b9021a53944df400c31c /src/main/java/gregtech/common
parentd2793387ad86bc1191d47dd80f9ecca02e4af1da (diff)
downloadGT5-Unofficial-eb61c36844bbe980bf87f8f6f438c3ce41745fa3.tar.gz
GT5-Unofficial-eb61c36844bbe980bf87f8f6f438c3ce41745fa3.tar.bz2
GT5-Unofficial-eb61c36844bbe980bf87f8f6f438c3ce41745fa3.zip
Fix non-elemental plasma cells (#3543)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/items/MetaGeneratedItem01.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java
index 32c2254374..e217c3994f 100644
--- a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java
+++ b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java
@@ -460,7 +460,6 @@ import static gregtech.common.items.IDMetaItem01.ZPM4;
import static gregtech.common.items.IDMetaItem01.ZPM5;
import static gregtech.common.items.IDMetaItem01.ZPM6;
-import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -3511,15 +3510,16 @@ public class MetaGeneratedItem01 extends MetaGeneratedItemX32 {
}
public boolean isPlasmaCellUsed(OrePrefixes aPrefix, Materials aMaterial) {
- Collection<GTRecipe> fusionRecipes = RecipeMaps.fusionRecipes.getAllRecipes();
- if (aPrefix == OrePrefixes.cellPlasma && aMaterial.getPlasma(1L) != null) { // Materials has a plasma fluid
- for (GTRecipe recipe : fusionRecipes) { // Loop through fusion recipes
- if (recipe.getFluidOutput(0) != null) { // Make sure fluid output can't be null (not sure if possible)
+ // Materials has a plasma fluid
+ if (aPrefix == OrePrefixes.cellPlasma && aMaterial.getPlasma(1L) != null) {
+ if (aMaterial.mHasPlasma) return true;
+ // Loop through fusion recipes
+ for (GTRecipe recipe : RecipeMaps.fusionRecipes.getAllRecipes()) {
+ // Make sure fluid output can't be null (not sure if possible)
+ if (recipe.getFluidOutput(0) != null) {
+ // Fusion recipe output matches current plasma cell fluid
if (recipe.getFluidOutput(0)
- .isFluidEqual(aMaterial.getPlasma(1L))) return true; // Fusion recipe
- // output matches
- // current plasma
- // cell fluid
+ .isFluidEqual(aMaterial.getPlasma(1L))) return true;
}
}
}