Allow overriding of a pattern

This commit is contained in:
raoulvdberge
2017-11-05 00:39:38 +01:00
parent 92c0b2aece
commit 5927a6e78a

View File

@@ -456,7 +456,9 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
public void onCreatePattern() {
if (canCreatePattern()) {
patterns.extractItem(0, 1, false);
if (patterns.getStackInSlot(1).isEmpty()) {
patterns.extractItem(0, 1, false);
}
ItemStack pattern = new ItemStack(RSItems.PATTERN);
@@ -491,7 +493,7 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
}
public boolean canCreatePattern() {
if (patterns.getStackInSlot(0).isEmpty() || !patterns.getStackInSlot(1).isEmpty()) {
if (patterns.getStackInSlot(0).isEmpty()) {
return false;
}