This is a bit strange and out of the blue to ask but for modpacks is it ok to modify jar files? All I want to do is alter json language files and edit sprites. This could be done via texture packs but I'd rather do it from the jar file because it is easier and I don't know how to create a texture pack. I just want to know because this could be against a rule or violating terms of service i dont know. I understand if it isnt allowed due to people being able to sneak viruses in or something malicious but im still curious. Sorry if this question is irrelevant or answered somewhere else.
I have tested something with this though. The mods dont appear in the modlist itself but they still appear in the files. At least when exporting the profile via zip files. Unsure if curseforge uses a different method.
Generally not a good idea to alter the mod jar itself specially if you don't own the mod. You should always check the mods license as well. Any mods from CurseForge Should show up in the packs manifest file and not the overrides/mods folder. With this being said uploading a pack with a modified jar will most likely get rejected on the spot.
Probably best to use a texture pack for this in the end. if it is ok to do so.