mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
Add max stack size check to ItemHelper.extract
This commit is contained in:
parent
676a05ad07
commit
5e14ca71d9
1 changed files with 2 additions and 2 deletions
|
@ -174,7 +174,7 @@ public class ItemHelper {
|
|||
if (!simulate && hasEnoughItems)
|
||||
inv.extractItem(slot, stack.getCount(), false);
|
||||
|
||||
if (extracting.getCount() >= maxExtractionCount) {
|
||||
if (extracting.getCount() >= maxExtractionCount || extracting.getCount() >= extracting.getMaxStackSize()) {
|
||||
if (checkHasEnoughItems) {
|
||||
hasEnoughItems = true;
|
||||
checkHasEnoughItems = false;
|
||||
|
@ -234,7 +234,7 @@ public class ItemHelper {
|
|||
|
||||
if (!simulate)
|
||||
inv.extractItem(slot, stack.getCount(), false);
|
||||
if (extracting.getCount() == maxExtractionCount)
|
||||
if (extracting.getCount() >= maxExtractionCount || extracting.getCount() >= extracting.getMaxStackSize())
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue