invalidate cached itemstack if its gonna be used in a real insertion

This commit is contained in:
PrototypeTrousers
2022-03-12 11:03:04 -03:00
parent 6d151bb890
commit cfa9fa2843
4 changed files with 8 additions and 6 deletions
@@ -909,10 +909,6 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
changed = true;
throw new GridAccessException();
}
else
{
itemStack.setCachedItemStack( inputStack );
}
IAEItemStack storedStack = this.gridProxy.getStorage().getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) ).getStorageList().findPrecise( itemStack );
if( storedStack != null )
@@ -930,8 +926,12 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
}
else if( storedStack.isCraftable() )
{
changed = this.handleCrafting( x, adaptor, itemStack ) || changed;
itemStack.setCachedItemStack(inputStack);
changed = this.handleCrafting( x, adaptor, itemStack ) || changed;
}
if (acquired == null) {
itemStack.setCachedItemStack(inputStack);
}
}
}
// else wtf?