fix when open the auto filler, always to try update pattern

add using exists item to fill pattern slot
This commit is contained in:
asdflj committed 2023-02-02 11:13:59 +08:00
1 parent 7ecd7d246f
commit a8155c8b17
5 files changed
+51 -4

No files matched your search

@@ -25,12 +25,14 @@ public class ContainerFluidAutoFiller extends AEBaseContainer {
MutablePair<Boolean, ItemStack> result = ContainerFluidAutoFiller.isItemValid(is);
if (result.left) {
if (super.getHasStack()) super.clearStack();
hasChange = true;
super.putStack(result.right);
}
}
}
private final TileFluidAutoFiller tile;
private static boolean hasChange;
public ContainerFluidAutoFiller(InventoryPlayer ipl, TileFluidAutoFiller tile) {
super(ipl, tile);
@@ -54,6 +56,9 @@ public class ContainerFluidAutoFiller extends AEBaseContainer {
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
tile.updatePattern();
if (hasChange) {
tile.updatePattern();
hasChange = false;
}
}
}