Fixed not being able to extract half a stack of items with max stack size 1 in Grid when using right click, fixes #1626
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
### 1.5.32
|
||||
- Added Spanish translation (Samuelrock)
|
||||
- Fixed issue where the Pattern Grid can only overwrite patterns when blank ones are present (ineternet)
|
||||
- Fixed not being able to extract half a stack of items with max stack size 1 in Grid when using right click (raoulvdberge)
|
||||
- Changed stack quantity of craftable items from 1 to 0 to fix Quantity Sorting (ineternet)
|
||||
|
||||
### 1.5.31
|
||||
|
||||
@@ -58,7 +58,11 @@ public class ItemGridHandler implements IItemGridHandler {
|
||||
if ((flags & EXTRACT_HALF) == EXTRACT_HALF && itemSize > 1) {
|
||||
size = itemSize / 2;
|
||||
|
||||
if (size > maxItemSize / 2) {
|
||||
// Rationale for this check:
|
||||
// If we have 32 buckets, and we want to extract half, we expect/need to get 8 (max stack size 16 / 2).
|
||||
// Without this check, we would get 16 (total stack size 32 / 2).
|
||||
// Max item size also can't be 1. Otherwise, if we want to extract half of 8 lava buckets, we would get size 0 (1 / 2).
|
||||
if (size > maxItemSize / 2 && maxItemSize != 1) {
|
||||
size = maxItemSize / 2;
|
||||
}
|
||||
} else if (single) {
|
||||
|
||||
@@ -58,7 +58,11 @@ public class ItemGridHandlerPortable implements IItemGridHandler {
|
||||
if ((flags & EXTRACT_HALF) == EXTRACT_HALF && itemSize > 1) {
|
||||
size = itemSize / 2;
|
||||
|
||||
if (size > maxItemSize / 2) {
|
||||
// Rationale for this check:
|
||||
// If we have 32 buckets, and we want to extract half, we expect/need to get 8 (max stack size 16 / 2).
|
||||
// Without this check, we would get 16 (total stack size 32 / 2).
|
||||
// Max item size also can't be 1. Otherwise, if we want to extract half of 8 lava buckets, we would get size 0 (1 / 2).
|
||||
if (size > maxItemSize / 2 && maxItemSize != 1) {
|
||||
size = maxItemSize / 2;
|
||||
}
|
||||
} else if (single) {
|
||||
|
||||
Reference in New Issue
Block a user