Is it possible to compile a server and client side jar separate from each other? When reading the wiki, under the Fabric Loom documentation it states that when splitting client and common code "A single jar file that works on both the client and server is still built from the two sourcesets." However for my the mod I'm trying to develop it would be better if I had a single jar for both the client and server side to keep them separate. Is this something that is currently possible?
#Separate Client and Server side jar?
4 messages · Page 1 of 1 (latest)
Why do you think it would be better if you had separate jars? Whatever the reason, you are almost certainly misguided at best - separate client/server jars have not been used for about 12 years at this point. In any case, you can accomplish separate jars most easily using gradle subprojects. Have a common module, which contains code needed on both sides, then have a client and server modules, which depend on the common module. Build all the modules and they will produce distinct jars, similarly to multiloader mods
Ahh I see, thanks for the info. The person I am programming this mod for wanted data stored in the server not accessible to clients until a certain time since this server is an mini time based event between me and some friends. He was concerned about people being able to "decompile" it to be able to get that sensitive information, so I suggested spliting the two to prevent that from being a possibility, sending the information from the server to client only when the time comes, so that the clients are only exposed to that data when the server sends it to them, having the data not be present anywhere on the client until then
"Data" as in, fields within the mod classes? That is definitely a case where one would benefit from split jars, yes