From 3187571a15ef7b4fd4648b75eb7aa87254e3451d Mon Sep 17 00:00:00 2001 From: miozune Date: Fri, 26 Aug 2022 17:16:19 +0900 Subject: Fix void protection requires too many slots than actual (#301) * Fix void protection requires too many slots than actual * remove proper stack size --- .../base/GregtechMeta_MultiBlockBase.java | 28 +++++++--------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'src/main/java/gtPlusPlus/xmod') diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 0e5027fc09..f6d4d3946c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -475,9 +475,6 @@ public abstract class GregtechMeta_MultiBlockBase> aInputMap = new ConcurrentHashSet>(); @@ -489,24 +486,17 @@ public abstract class GregtechMeta_MultiBlockBase 64) { - int aSlotsNeedsForThisStack = (int) Math.ceil((double) ((float) aStackSize / 64f)); - // Should round up and add as many stacks as required nicely. - aRecipeSlotsRequired += aSlotsNeedsForThisStack; - for (int o=0;o 64 ? 64 : aStackSize; - aY = aY.copy(); - aY.stackSize = 0; - aInputMap.add(new FlexiblePair(aY, aStackToRemove)); - } - } - else { - // Only requires one slot - aRecipeSlotsRequired++; + + int aSlotsNeedsForThisStack = (int) Math.ceil((float) aStackSize / aY.getMaxStackSize()); + // Should round up and add as many stacks as required nicely. + for (int o=0;o(aY, aStackSize)); - } + aInputMap.add(new FlexiblePair(aY, aStackToRemove)); + } } } -- cgit