diff options
author | miozune <miozune@gmail.com> | 2022-08-16 15:48:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 08:48:42 +0200 |
commit | bbfcef1d7533999536d3b6ab88cd226a9d0e3773 (patch) | |
tree | 24c99da0b5a7356d9fa67e7fbde7164810a2972d /src/main/java | |
parent | bcdb350a9b17d2eb0ee2a36449c4a9aea61391d0 (diff) | |
download | GT5-Unofficial-bbfcef1d7533999536d3b6ab88cd226a9d0e3773.tar.gz GT5-Unofficial-bbfcef1d7533999536d3b6ab88cd226a9d0e3773.tar.bz2 GT5-Unofficial-bbfcef1d7533999536d3b6ab88cd226a9d0e3773.zip |
Standardization for dust stuffed cells (#1267)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java index 1e25c88878..f9a92a672e 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java @@ -76,7 +76,12 @@ public class ProcessingCell implements IOreRecipeRegistrator { tItemAmount = (tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + tItemAmount * tDensityMultiplier / aMaterial.getDensity(); if (tList.size() > 0) { if ((aMaterial.mExtraData & 0x1) != 0) { - GT_Values.RA.addElectrolyzerRecipe(aStack, tCapsuleCount + tItemAmount - 1 <= 0L ? 0 : (int) (tCapsuleCount + tItemAmount - 1), tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(- tCapsuleCount - tItemAmount + 1 <= 0 ? 0 : - tCapsuleCount - tItemAmount + 1), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); + if (GT_Utility.getFluidForFilledItem(aStack, true) == null) { + // dust stuffed cell e.g. Phosphate, Phosphorous Pentoxide + GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 2L * tItemAmount)), Math.min(4, tList.size()) * 30); + } else { + GT_Values.RA.addElectrolyzerRecipe(aStack, tCapsuleCount + tItemAmount - 1 <= 0L ? 0 : (int) (tCapsuleCount + tItemAmount - 1), tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount - tItemAmount + 1 <= 0 ? 0 : -tCapsuleCount - tItemAmount + 1), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30); + } } if ((aMaterial.mExtraData & 0x2) != 0) { GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount))); |