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 --- dependencies.gradle | 2 +- .../base/GregtechMeta_MultiBlockBase.java | 28 +++++++--------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 32de581696..e507d3bfe6 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,6 +1,6 @@ dependencies { compile('com.github.GTNewHorizons:GT5-Unofficial:5.09.41.00:dev') - compile('com.github.GTNewHorizons:StructureLib:1.1.3:dev') + compile('com.github.GTNewHorizons:StructureLib:1.1.5:dev') compile('com.github.GTNewHorizons:NotEnoughItems:2.2.20-GTNH:dev') compile('com.github.GTNewHorizons:CodeChickenCore:1.1.4:dev') compile('com.github.GTNewHorizons:CodeChickenLib:1.1.5.3:dev') 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