aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/goodgenerator/util
diff options
context:
space:
mode:
authorGDCloud <93287602+GDCloudstrike@users.noreply.github.com>2023-10-11 23:19:39 +0200
committerGitHub <noreply@github.com>2023-10-11 23:19:39 +0200
commit33c59c4fdfd1caaeec56de65300b1624002a4652 (patch)
tree6c751f86b18322bd1860c7d3ea6119a38b1fb23b /src/main/java/goodgenerator/util
parent4a204b99695ebdcc2ceeef5288063edd4215d292 (diff)
downloadGT5-Unofficial-33c59c4fdfd1caaeec56de65300b1624002a4652.tar.gz
GT5-Unofficial-33c59c4fdfd1caaeec56de65300b1624002a4652.tar.bz2
GT5-Unofficial-33c59c4fdfd1caaeec56de65300b1624002a4652.zip
Add UXV Component Assemblyline functionality (#214)
* reduce recipe size for uxv parts * stop mhdcsm from being compacted * first attempt at large stacks * Working mhdcsm conversion * remove divisor * add casing recipe * spotless * remove wildcard import * remove unnecessary parentheses * no need for pairs * convert 64+ stacksize materials * spotless * add comment * address reviews * typo * small uxv casing texture update
Diffstat (limited to 'src/main/java/goodgenerator/util')
-rw-r--r--src/main/java/goodgenerator/util/StackUtils.java13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/main/java/goodgenerator/util/StackUtils.java b/src/main/java/goodgenerator/util/StackUtils.java
index da928d4d63..d876f583be 100644
--- a/src/main/java/goodgenerator/util/StackUtils.java
+++ b/src/main/java/goodgenerator/util/StackUtils.java
@@ -48,27 +48,16 @@ public class StackUtils {
ArrayList<ItemStack> output = new ArrayList<>();
for (int index = 0; index < stacks.size(); index++) {
ItemStack i = stacks.get(index);
- boolean hasDupe = false;
int newSize = i.stackSize;
for (int j = index + 1; j < stacks.size(); j++) {
ItemStack is2 = stacks.get(j);
if (GT_Utility.areStacksEqual(i, is2)) {
- hasDupe = true;
newSize += is2.stackSize;
stacks.remove(j);
j--;
}
}
- if (hasDupe) {
- if (newSize >= 64) {
- for (int k = 0; k < newSize / 64; k++) {
- output.add(GT_Utility.copyAmount(64, i));
- }
- }
- if (newSize % 64 > 0) {
- output.add(GT_Utility.copyAmount(newSize > 64 ? newSize % 64 : newSize, i));
- }
- } else output.add(i);
+ output.add(GT_Utility.copyAmountUnsafe(newSize, i));
}
return output;
}