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:
ineternet
2018-01-09 18:02:36 +01:00
committed by Raoul
parent a8a4005fe0
commit 3d6ff79ada
2 changed files with 7 additions and 2 deletions

View File

@@ -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();
}
}