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 so I'm just learning forge now and am kind of confused about the whole client vs server side topic that I read about on forge: ForgeDocs. I don't understand how I'm supposed to structure my project and classes so that their methods doesn't cause this server-client conflict. Is there a list of certain methods that are client side only? I'm pretty new to forge so any advice or help would be appreciated!

Edited by bigMojitos

Basically, any class that contains a `client` package will almost always be client-side only. Everything else is either executed in common code (which means both sides), or on server only (which most people never interact with). The separation is just to make sure you understand that those in the vanilla client package do not exist on a physical server, so if you ever want to directly call code for that, you need to make sure using one of the methods described in the doc that the code only gets called then. This includes playing sounds directly (not through SoundEvent), rendering objects, player interactions with keyboard and mouse, and the Minecraft instance.

If you have trouble with a specific area, just ask another question in the modder support forum or on the discord. It's better to work through problems when you encounter them and you can't work out a solution on your own. Otherwise, you'll never actually program anything.

37 minutes ago, bigMojitos said:

Is there a list of certain methods that are client side only?

You can check for yourself whether a method is only available on the client side, use your IDE to open the class. If the class or the method is annotated with @OnlyIn (with Dist#CLIENT) the full class or the method is client only.
As far as i know there are no server side only classes/methods.

In general:

  • Client side stuff is: Keyboard & Mouse input, Rendering of Screens and Entities
  • Server side stuff is: Block placing & Entity spawning

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.