you would just need to add "Use" to the interact method. as interact wothout any action will just skip the Menu check and left click
But this might result in nullpointer exception as the fire object might not always be there, so make sure to always null check widgets, objects, npcs, whatever you load from ingame
Here is a super simple snippet:
RS2Object fire = script.getObjects().closest("Fire");
if (fire != null) {
if(script.getInventory().isItemSelected()){
if(fire.interact("Use")){
ConditionalSleep2.sleep(1000, () -> script.myPlayer().isAnimating());
}
}else{
if(script.getInventory().interact("Use", "Raw Salmon")){
ConditionalSleep2.sleep(1000, () -> script.getInventory().isItemSelected());
}
}
}