I'm not enforcing any rules... I'm barely even familiar with less than half of them... but if a person comes to your Forum expecting you to give them all the answers without knowing what the **** Java is................. you know what I mean? Then I try to help out by telling them not to "leave the Forums," but to hold their horses and move back a step to the very first one which is to be familiar with the language.
I never hinted him to copy anything...
Yes, I understand why my usage of the event is wrong because I don't use the event at all
I don't know, I never subscribed to the event in my coding career anyway
Example:
/* Event fired when specified keys are pressed */
@SubscribeEvent //Subscribes an event with a normal priority
public void onKeyInput(KeyInputEvent eventIn) //Method
{
EntityPlayer playerIn = (EntityPlayer) Minecraft.getMinecraft.thePlayer; //Gets the player instance
if (playerIn != null && playerIn instanceof EntityPlayer) //If the entity is existent and it's a player.........
{
if (Minecraft.getMinecraft().gameSettings.keyBindDrop.isKeyDown()) //Then if Drop key is down........ (BEWARE!!! CLIENT SIDE HERE!!! From here on, server-side = ded, only packets will make it live again!)
{
playerIn.motionY = 1.0D; // Boing :) (client)
PacketHandler.INSTANCE.sendToServer(new MessageExample()); // To the server-side we Gooooo!!!!! (server)
KeyBinding.unPressAllKeys(); //Unpress currently pressed keys
playerIn.addChatMessage(new TextComponentString("Ya might want'a pick that BACKKKK up!!!!"));
}
}
}
Pretty self-explanatory
All wrong except the one I did not quote, and for that you can just send packets...
1. You can check for the pressed key via Keyboard or Minecraft.
2. Yes you can...???
3. No, it is called for any SPECIFIED pressed key.
ex.
Minecraft.getMinecraft().gameSettings.keyBindJump.isKeyDown()
Minecraft.getMinecraft().gameSettings.keyBindForward.isKeyDown()
etc.
I understand... but we're talking BASICS! He doesn't even know what a METHOD is...............
"You start modding with making your main class, then proxies, and then the most crucial part... the methods that need to be run within" ~Diesieben July 24th, 2013.
Do you see where I'm comin' from??
Well, then you check for the key you want pressed... and then you write your code block...
You... interact with... your... inventory... by pressing 'E???' I'M PREEEEETTTTY SURE........... it's built in for Minecraft......................................
Ho-ho-ho-hold on.
First ask yourself this: Do you know Java and/or the basics of it, at least?
If you do not then learn the language. It is not that difficult.
this is ignored if only client reads the code...
You have to send a packet to the server to do this action. It's not THAT difficult.
But I guess you found your way out, so you can just move on