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

Hi, I want to know if my mod is installed in the server or just being used clientside only, this is because I want to save data on a Json if the mod is clientside only.

 

I've tried with the world Load/Unload events but on a singleplayer world those trigger multiple times giving both (True/False) results.

 

Thanks!

  • Author

I know how to save the data, what I want to know if the mod is installed on the server or not, if is in the server I save the data on the player, if the mods is being use clientside only, I save the data on a json.

3 hours ago, Tupaç said:

I know how to save the data, what I want to know if the mod is installed on the server or not, if is in the server I save the data on the player, if the mods is being use clientside only, I save the data on a json.

But why not save the data on the player regardless? A singleplayer world still has as associated integrated server that others can join.

  • Author
1 minute ago, ChampionAsh5357 said:

But why not save the data on the player regardless? A singleplayer world still has as associated integrated server that others can join.

Sorry I may be explaining this incorrectly, the idea is that any player with the mod can join a server that doesn't have the mod, so I can't ask the server to save my data because of this, witch I solve saving the data on a json in the profile folder.

5 minutes ago, Tupaç said:

Sorry I may be explaining this incorrectly, the idea is that any player with the mod can join a server that doesn't have the mod, so I can't ask the server to save my data because of this, witch I solve saving the data on a json in the profile folder.

Well then, if you're saving data via the logical server, you can check FmlEnvironment#dist to see if you're on the physical client or physical server.

  • Author
11 minutes ago, ChampionAsh5357 said:

Well then, if you're saving data via the logical server, you can check FmlEnvironment#dist to see if you're on the physical client or physical server.

Hmm, unfortunately this doesn't seems to work, it considers singleplayer as client and that doesn't work with my purpose.

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.