File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/main/java/com/blakebr0/extendedcrafting/tile Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -61,14 +61,16 @@ public void update() {
6161 boolean mark = false ;
6262
6363 if (!this .getWorld ().isRemote ) {
64- CompressorRecipe recipe = this . getRecipe () ;
64+ CompressorRecipe recipe = null ;
6565 ItemStack output = this .getStackInSlot (0 );
6666 ItemStack input = this .getStackInSlot (1 );
6767
6868 if (!input .isEmpty ()) {
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 ();
7274 }
7375
7476 if (!this .inputLimit || (recipe != null && this .materialCount < recipe .getInputCount ())) {
@@ -83,6 +85,11 @@ public void update() {
8385 mark = true ;
8486 }
8587 }
88+ //Invalidate the cached item and marked state on unsuccessful recipe retrieval
89+ else if (mark ) {
90+ this .materialStack = ItemStack .EMPTY ;
91+ mark = false ;
92+ }
8693 }
8794
8895 if (recipe != null && this .getEnergy ().getEnergyStored () > 0 ) {
You can’t perform that action at this time.
0 commit comments