Changed item quantity of a craftable item to 0 (#1613)

* Changed item quantity of a craftable item to 0

Whenever a system has none of a specific item but the ability to craft it, the grid saves the quantity as 1. Quantity sorting would make use of this and sort it alphabetically together with other quantity 1 items. This change should make quantity sorting think craftable items have a quantity of 0, making all of them appear behind itemstacks with the quantity 1 (or higher).

* Moving code logic to GridStackItem

* Update GridSortingQuantity.java

* Changed stack quantity logic

Craftable itemstacks remain stored as "1 item" internally. Other classes will be given the information that the stack is empty, though.

* Update CHANGELOG.md
This commit is contained in:
ineternet
2018-01-09 19:12:23 +01:00
committed by Raoul
parent 3d6ff79ada
commit 12cc9428ee
2 changed files with 2 additions and 1 deletions

View File

@@ -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)
- Changed stack quantity of craftable items from 1 to 0 to fix Quantity Sorting (ineternet)
### 1.5.31
- Improved the "cannot craft! loop in processing..." error message (raoulvdberge)

View File

@@ -114,7 +114,7 @@ public class GridStackItem implements IGridStack {
@Override
public int getQuantity() {
return stack.getCount();
return doesDisplayCraftText() ? 0 : stack.getCount();
}
@Override