Skip to content

Commit 1603046

Browse files
Fix Quantum Compressor not running recipe after first time (#18)
Fixes #17
1 parent 149ac46 commit 1603046

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/com/blakebr0/extendedcrafting/tile/TileCompressor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ public void update() {
6969
if (this.materialStack.isEmpty()) {
7070
this.materialStack = input.copy();
7171
mark = true;
72-
//Retrieve new recipe upon non-null item detected
73-
recipe = getRecipe();
7472
}
7573

74+
// Retrieve the recipe after checking if the input is not empty, run every update cycle
75+
recipe = this.getRecipe();
76+
7677
if (!this.inputLimit || (recipe != null && this.materialCount < recipe.getInputCount())) {
7778
if (StackHelper.areStacksEqual(input, this.materialStack)) {
7879
int consumeAmount = input.getCount();
@@ -88,7 +89,6 @@ public void update() {
8889
//Invalidate the cached item and marked state on unsuccessful recipe retrieval
8990
else if(mark) {
9091
this.materialStack = ItemStack.EMPTY;
91-
mark = false;
9292
}
9393
}
9494

0 commit comments

Comments
 (0)