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

I am currently working on a part of my code that requires, that the called method knows, if it was called by Server Side (Side.Server) or Client Side (Side.Client).

Is there any universal way to check which side is calling the method?

(By universal i mean u do not need an additional parameter in the method declaration,

you just call a persistent method like "FMLClientHandler.instance().getServer().getEntityWorld()" and get the result)

The TileEntitys are Going to kill us all and take over the entire (Minecraft) world!

FMLcommonHandler.instance().getEffectiveSide() returns Side.SERVER or Side.CLIENT.

 

This might be what you need.  I've never had to use it myself, and it has a disclaimer that it might be unreliable, but it might be all you can get.

 

It might be better to refactor your code so it doesn't need to tell which side it is on, or uses a source of information other than the method parameters it gets.  Might be more robust.  Hard to know without more specific info...

 

-TGG

  • Author

That was exactly what i needed, thx :D

The TileEntitys are Going to kill us all and take over the entire (Minecraft) world!

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.