pattern terminal add auto fill blank pattern

This commit is contained in:
asdflj committed 2023-02-17 12:04:11 +08:00
1 parent 271917c765
commit 09c1c49529
11 files changed
+122 -3

No files matched your search

@@ -35,4 +35,8 @@ public interface IItemPatternTerminal extends IItemTerminal {
boolean isCraftingRecipe();
void sortCraftingItems();
boolean isAutoFillPattern();
void setAutoFillPattern(boolean canFill);
}
@@ -56,6 +56,7 @@ public class WirelessPatternTerminalExInventory extends MEMonitorHandler<IAEItem
protected boolean prioritize = false;
protected boolean inverted = false;
protected boolean beSubstitute = false;
protected boolean autoFillPattern = false;
protected int activePage = 0;
@SuppressWarnings("unchecked")
@@ -111,6 +112,7 @@ public class WirelessPatternTerminalExInventory extends MEMonitorHandler<IAEItem
this.setPrioritization(data.getBoolean("priorization"));
this.setInverted(data.getBoolean("inverted"));
this.setActivePage(data.getInteger("activePage"));
this.setAutoFillPattern(data.getBoolean("autoFillPattern"));
}
public void writeToNBT() {
@@ -121,6 +123,7 @@ public class WirelessPatternTerminalExInventory extends MEMonitorHandler<IAEItem
data.setBoolean("priorization", this.prioritize);
data.setBoolean("inverted", this.inverted);
data.setInteger("activePage", this.activePage);
data.setBoolean("autoFillPattern", this.autoFillPattern);
}
@Override
@@ -396,6 +399,16 @@ public class WirelessPatternTerminalExInventory extends MEMonitorHandler<IAEItem
saveChanges();
}
@Override
public boolean isAutoFillPattern() {
return this.autoFillPattern;
}
@Override
public void setAutoFillPattern(boolean canFill) {
this.autoFillPattern = canFill;
}
@Override
public void saveSettings() {
this.writeToNBT();
@@ -56,6 +56,7 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
protected boolean prioritize = false;
protected boolean inverted = false;
protected boolean beSubstitute = false;
protected boolean autoFillPattern = false;
protected int activePage = 0;
@SuppressWarnings("unchecked")
@@ -110,6 +111,7 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
this.setCombineMode(data.getBoolean("combine"));
this.setBeSubstitute(data.getBoolean("beSubstitute"));
this.setActivePage(data.getInteger("activePage"));
this.setAutoFillPattern(data.getBoolean("autoFillPattern"));
}
public void writeToNBT() {
@@ -119,6 +121,7 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
data.setBoolean("combine", this.combine);
data.setBoolean("beSubstitute", this.beSubstitute);
data.setInteger("activePage", this.activePage);
data.setBoolean("autoFillPattern", this.autoFillPattern);
}
@Override
@@ -368,6 +371,16 @@ public class WirelessPatternTerminalInventory extends MEMonitorHandler<IAEItemSt
saveChanges();
}
@Override
public boolean isAutoFillPattern() {
return this.autoFillPattern;
}
@Override
public void setAutoFillPattern(boolean canFill) {
this.autoFillPattern = canFill;
}
@Override
public void saveSettings() {
this.writeToNBT();