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'm using org.lwjgl.input.Keyboard in my onRightClick method of my item class . When i try to load the mod on server loader of course gives a error that org.lwjgl.input.Keyboard not found . How should i use it correctly ?

A server does not have any keyboard input. Because a server is not a client.

Only clients have rendering and keyboard/mouse input.

A server will crash if you try to handle any of this.

 

Ask your self, when you speak of the servers keyboard, what key input are you speaking about?

Of the many players on the server, which one's keyboard do you want to listen to?

 

If you need keyboard input to affect the server you will have to do it clientside and then send a packet to the server, and handle it on the server side :)

 

If you tell us what you are trying to accomplish we may be able to give you some more hints.

 

If you are unfamiliar with packets, checkout www.minecraftforge.net/wiki/Packet_Handling and then http://www.minecraftforge.net/wiki/Advanced_Packet_Handling

If you guys dont get it.. then well ya.. try harder...

  • Author

*Mazetar, thanks  :) I have one more question about packet. Is there a way of sending some complex data like ItemStack or EntityPlayer via packets ?

Well, you can save whole object into bits and reconstruct it by reading them.

This is a lot of information and packets are limited in size.

You should consider what is the minimum data you need in each case. I am quite sure you don't need whole objects.

im pretty sure if you need to sent a entityPlayer you are doing it wrong

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

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.