Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.nukacraft.src;
- import cpw.mods.fml.common.eventhandler.SubscribeEvent;
- import cpw.mods.fml.common.gameevent.TickEvent;
- import cpw.mods.fml.relauncher.Side;
- public class EventActionPrimaryKey2 {
- boolean k_Button_left, k_Button_left_last = false;
- @SubscribeEvent
- public void actionButton_left(TickEvent.PlayerTickEvent event) {
- if (event.phase == TickEvent.Phase.START && event.side == Side.CLIENT) {
- if (RegKey2.button_left.getIsKeyPressed()) {
- k_Button_left = true;
- if (!k_Button_left_last && k_Button_left) ActionPrimaryKey2.actionButton_leftClient(event.player, true);//press down
- k_Button_left_last = k_Button_left;
- } else {
- k_Button_left = false;
- if (k_Button_left_last && !k_Button_left) ActionPrimaryKey2.actionButton_leftClient(event.player, false);//unpress down
- k_Button_left_last = k_Button_left;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment