Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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?

  • Author
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);
}

 

  • Author

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.