Posted August 27, 201312 yr 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 ?
August 27, 201312 yr 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...
August 27, 201312 yr 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 ?
August 27, 201312 yr 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.
August 27, 201312 yr 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.