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

Is there a way to get server identifiable values when logging onto a server. I created a mod that I would like to have a config saved that tells the mod whether to activate or not when connecting to servers the user has visited in the past. This is a client side mod.

 

My mod is StepUp. This mod changes the stepHeight to 1 to allow walking up 1 block height instead of having to jump it. A lot of servers have anti-hack tools that prevent fly hacking and unfortunately this mod gets hit with that. I want to make it so when the player deactivates the mod in the server they are playing on, it writes to the config that tells it to either be activated or not next time they join that specific server.

 

Thank you for your time.

FMLNetworkEvent.ClientConnectedToServerEvent

is fired on the client side when you connect to a server (integrated or dedicated). When this fires, you can use

Minecraft.getMinecraft().getCurrentServerData()

to get a

ServerData

object describing the current server (including its IP/domain).

 

I explain more about this event and the

ServerData

class here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.