If anyone encounters the same issue I had, this is the exact modified code snippet I've put into my mod. This should be inserted within the if(luaObject.state == "seeded") branch inside the function SFarmingSystem:growPlant(luaObject, nextGrowing, updateNbOfGrow).
The code this file overrides is from media/lua/server/Farming/SFarmingSystem.lua
local actmods = getActivatedMods();
local activeNR = false;
for i=0, actmods:size()-1, 1 do
if actmods:get(i) == "FarmingNeverRot" then
activeNR = true;
break;
end
end
if (activeNR) then
--NeverRot is this if statement.
if (luaObject.nbOfGrow >6) then
luaObject.nbOfGrow = 6
end
end