Jump to content

Do you need same forge mod on server AND client?


gardengnomer

Recommended Posts

Hello!

This if my first post here. I got interested in Forge because of its ability to add new blocks to the game.

However, I was under the impression that making a server-side mod would be sufficient for this.

After struggling through some tutorials, I finally managed to make a mod and got it to run on my server, only to have my client rejected with

 

Network Disconnect: Mod rejections [FMLMod:tutorial{1.0.0}]

 

So, do I need all my clients to have the same mods installed?, or could this be caused by some other error e.g. in my build.gradle file?

Link to comment
Share on other sites

Whether or not each side needs a Forge mod installed depends on what the mod does.

 

If it adds a new Block or Item, both the client and server must have the mod installed.

 

If it adds a new server-side command, only the server needs to have the mod installed (though the client will also need it installed if you want to use any non-vanilla localisations).

 

If it changes client-side things like rendering, only the client needs to have the mod installed.

 

Set @Mod#clientSideOnly or @Mod#serverSideOnly to true if the mod is client-only or server-only to prevent it from being loaded on the opposite physical side. Set @Mod#acceptableRemoteVersions to "*" (i.e. accept any version, including none) if the mod is only required on one side.

 

Edit: acceptableRemoteVersions, not acceptedMinecraftVersions.

Edited by Choonster
  • Like 2

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.

Link to comment
Share on other sites

Blocks need to exist on both sides because the server needs to track it and the client needs to render it! 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

12 hours ago, gardengnomer said:

I got interested in Forge because of its ability to add new blocks to the game.

However, I was under the impression that making a server-side mod would be sufficient

Think about it for a moment... The client displays things. How could it display a new block known only to the server? Servers do not distribute renderers and their textures.

 

In fact, with graphics-heavy mods, it is possible to make a server-only version of a mod by removing its assets folder before compiling it. Indeed, this is what I do for my paintings mod (shrinking the server version from megabytes down to 45k).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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