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
|
### 1.5.32
|
||||||
- Added Spanish translation (Samuelrock)
|
- Added Spanish translation (Samuelrock)
|
||||||
|
- Fixed issue where the Pattern Grid can only overwrite patterns when blank ones are present (ineternet)
|
||||||
|
|
||||||
### 1.5.31
|
### 1.5.31
|
||||||
- Improved the "cannot craft! loop in processing..." error message (raoulvdberge)
|
- Improved the "cannot craft! loop in processing..." error message (raoulvdberge)
|
||||||
|
|||||||
@@ -492,8 +492,12 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isPatternAvailable() {
|
||||||
|
return !(patterns.getStackInSlot(0).isEmpty() && patterns.getStackInSlot(1).isEmpty());
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canCreatePattern() {
|
public boolean canCreatePattern() {
|
||||||
if (patterns.getStackInSlot(0).isEmpty()) {
|
if (!isPatternAvailable()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -515,7 +519,7 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
|
|||||||
|
|
||||||
return inputsFilled > 0 && outputsFilled > 0;
|
return inputsFilled > 0 && outputsFilled > 0;
|
||||||
} else {
|
} else {
|
||||||
return !result.getStackInSlot(0).isEmpty();
|
return isPatternAvailable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user