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

@@ -25,6 +25,7 @@ public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatte
protected boolean prioritize = false;
protected boolean inverted = false;
protected boolean beSubstitute = false;
protected boolean autoFillPattern = false;
protected int activePage = 0;
public FCFluidEncodeTerminal(ItemStack is) {
@@ -51,6 +52,7 @@ public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatte
this.setPrioritization(data.getBoolean("priorization"));
this.setInverted(data.getBoolean("inverted"));
this.setActivePage(data.getInteger("activePage"));
this.setAutoFillPattern(data.getBoolean("autoFillPattern"));
this.pattern.readFromNBT(data, "pattern");
this.output.readFromNBT(data, "outputList");
this.crafting.readFromNBT(data, "craftingGrid");
@@ -66,6 +68,7 @@ public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatte
data.setBoolean("substitute", this.substitute);
data.setBoolean("inverted", this.inverted);
data.setInteger("activePage", this.activePage);
data.setBoolean("autoFillPattern", this.autoFillPattern);
this.pattern.writeToNBT(data, "pattern");
this.output.writeToNBT(data, "outputList");
this.crafting.writeToNBT(data, "craftingGrid");
@@ -204,4 +207,14 @@ public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatte
}
saveChanges();
}
@Override
public boolean isAutoFillPattern() {
return this.autoFillPattern;
}
@Override
public void setAutoFillPattern(boolean canFill) {
this.autoFillPattern = canFill;
}
}