Tomson124 Posted January 18, 2018 Share Posted January 18, 2018 Recently I realized that if you change the config values of my mod (SimplyJetpacks 2), this changes also the values for the jetpacks on servers. The server configs are not changed as far as I know but it seems that always the client configs are loaded. Is there a way to change this, so it loads the config from the server, when the player is on a server? Quote Link to comment Share on other sites More sharing options...
Tomson124 Posted January 25, 2018 Author Share Posted January 25, 2018 On 18.1.2018 at 10:34 PM, diesieben07 said: You should treat singleplayer and multiplayer exactly the same. As soon as a player logs in, send them the necessary config data using a packet (server-side). Then on the client store those values separate from the "actual config values". On the client you then only access those separate values. I changed the side of the ConfigSync from Client to Server, but I guess that is not enough, right? public static void init() { SimplyJetpacks.logger.info("Registering network messages"); instance.registerMessage(MessageJetpackSync.class, MessageJetpackSync.class, 0, Side.CLIENT); instance.registerMessage(MessageConfigSync.class, MessageConfigSync.class, 1, Side.SERVER); instance.registerMessage(MessageKeyboardSync.class, MessageKeyboardSync.class, 2, Side.SERVER); instance.registerMessage(MessageKeyBind.class, MessageKeyBind.class, 4, Side.SERVER); } Quote Link to comment Share on other sites More sharing options...
Tomson124 Posted January 25, 2018 Author Share Posted January 25, 2018 Yeah I did, I am sorry but it is the first time that I have to deal with the client/server side interaction on my own. The current Config is read from the File and then parsed to the NBT. From there is will be read on item init to set the NBT values for each item. I guess I have to get the file on the server side an then write it to the NBT (or a variable) and get it from there on the client side for item init. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.