After cooking, the oven throws away the resource
            var outPutItem = ItemManager.FindItemDefinition(_config.ResourceName);
            outPutItem.stackable = _config.MaxMateriaStack;

            var item = ItemManager.FindItemDefinition("diesel_barrel");
            var coockable = item.gameObject.AddComponent<ItemModCookable>();
            coockable.amountOfBecome = _config.ResourceAmountInOut;
            coockable.becomeOnCooked = outPutItem;
            coockable.cookTime = 40f;
            coockable.highTemp = 1200;
            coockable.lowTemp = 800;
            item.itemMods = new ItemMod[] { coockable };
if outPutItem = sulfur then everything is fine, but if you make battery.small then the oven throws out the battery
What do I need to do to fix this?

you need to allow the oven to accept the batery in its inventory