Fixed issue with pattern overwriting (#1610)
* Fixed issue with pattern overwriting Pattern overwriting if the blank pattern (top slot in the pattern slots) slot was empty. Fixed this by only considering a recipe invalid if there are *absolutely no* patterns available, meaning none in top and none in bottom. * Fixed a line typo, sorry * fixed patternAvailable, returned opposite * Updated name to isPatternAvailable * Added newest change to the changelog Second line in the 1.5.32 version added.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
### 1.5.32
|
||||
- Added Spanish translation (Samuelrock)
|
||||
- Fixed issue where the Pattern Grid can only overwrite patterns when blank ones are present (ineternet)
|
||||
|
||||
### 1.5.31
|
||||
- Improved the "cannot craft! loop in processing..." error message (raoulvdberge)
|
||||
|
||||
@@ -491,9 +491,13 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
|
||||
patterns.setStackInSlot(1, pattern);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isPatternAvailable() {
|
||||
return !(patterns.getStackInSlot(0).isEmpty() && patterns.getStackInSlot(1).isEmpty());
|
||||
}
|
||||
|
||||
public boolean canCreatePattern() {
|
||||
if (patterns.getStackInSlot(0).isEmpty()) {
|
||||
if (!isPatternAvailable()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -515,7 +519,7 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
|
||||
|
||||
return inputsFilled > 0 && outputsFilled > 0;
|
||||
} else {
|
||||
return !result.getStackInSlot(0).isEmpty();
|
||||
return isPatternAvailable();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user