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

Hayho!

 

I'm about to make my mod, Industrial Farming, Server-compatible.

 

Therefore, I have to convert every Packet Handling stuff to something the Server is able to deal with - And here comes my problem.

 

The Gui of one of my blocks contains a Slider. The value set by this slider is supposed to go to the Block TileEntity on both sides, Server and Client. Since the Gui is ClientSide only, I have to get the MinecraftServer-instance to send the corresponding packet. But if I use the common methods to send Packets from Client to Server, neither "PacketDispatcher.sendPacketToServer([Packet])" nor "FMLClientHandler.instance().sendPacket([Packet])" work

 

- Do you know any possibility to get a variable set in the Client be sent to the Server?

 

note, that this works completely fine in SinglePlayer.

 

Thanks,

Luigi

What do you mean by "does not work"?

 

Do you have a packet handler set and are using the same channel on both sides?

  • Author

Well, yes, I have a PacketHandler, of course.

 

As I said before, when I have a singleplayer world, everything works fine. But if I use Server and Client seperatly, things are getting weird.

 

And no, I use two different packet channels, one for Server and one for Client Side. That's fine, too.

 

Greets

And no, I use two different packet channels, one for Server and one for Client Side. That's fine, too.

Maybe I'm missunderstanding something, but you say that you send packets over different channels? I'm kinda wondering why you would do that. Why don't you use the same channel for both client and server? Seperating channels would only makes sense when you have to handle submodules, but not to seperate client and server.

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.