Posted May 6, 20187 yr So i have this little method, @SubscribeEvent public void livingUpdate(LivingEvent.LivingUpdateEvent event) { if (event.getEntity() instanceof EntityPlayerSP) { if(minecraft.gameSettings.keyBindDrop.isPressed()) {//doesnt work System.out.println("Test, droped a item"); } if(minecraft.gameSettings.keyBindPlayerList.isPressed()) {//works System.out.println("Test, Showed tab gui thing"); } } } now for some reason player list works but drop doesnt, but if instend if i use isKeyDown it works, but i want it to only update when the key is pressed once, if you get what im saying, not every tick the key is down Edited May 6, 20187 yr by IKnowImEZ
May 6, 20187 yr Why are you using LivingUpdateEvent and not PlayerUpdateEvent? 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.
May 6, 20187 yr Author 35 minutes ago, Draco18s said: Why are you using LivingUpdateEvent and not PlayerUpdateEvent? I dont know, I dident think it really mattered, doubt its going change anything but ill try
May 6, 20187 yr Sorry, its TickEvent.PlayerTickEvent Also, as you're using it to check keybinds on the client side, use TickEvent.ClientTickEvent instead. 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.
May 6, 20187 yr Author 15 minutes ago, Draco18s said: Sorry, its TickEvent.PlayerTickEvent Also, as you're using it to check keybinds on the client side, use TickEvent.ClientTickEvent instead. still dident work):, same thing happened
May 6, 20187 yr Author is there like a event where i can do public void event(someKeyBoardEvent event) {if(event.getKey instanceof KeyBoard.KEY_SOME KEY)}?
May 6, 20187 yr 14 minutes ago, IKnowImEZ said: is there like a event where i can do public void event(someKeyBoardEvent event) {if(event.getKey instanceof KeyBoard.KEY_SOME KEY)}? There is, but you should not do it that way. 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.
May 6, 20187 yr Author 14 minutes ago, Draco18s said: There is, but you should not do it that way. how should i do it then?
May 6, 20187 yr 2 hours ago, Draco18s said: use TickEvent.ClientTickEvent 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.
May 10, 20187 yr On 5/6/2018 at 9:32 PM, Draco18s said: There is, but you should not do it that way. why? he said he wants to respond to a single press. why wouldn't you use key input event? (i never used it myself, so i don't know if it does what i'd expect it to do.)
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.