parent
b9448d5d90
commit
33985f1a31
444 changed files with 26235 additions and 32364 deletions
|
@ -1,14 +1,12 @@
|
|||
package techreborn.client.keybindings;
|
||||
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class KeyBindings
|
||||
{
|
||||
public class KeyBindings {
|
||||
|
||||
public static KeyBinding config = new KeyBinding(ModInfo.Keys.CONFIG, Keyboard.KEY_P, ModInfo.Keys.CATEGORY);
|
||||
public static KeyBinding config = new KeyBinding(ModInfo.Keys.CONFIG,
|
||||
Keyboard.KEY_P, ModInfo.Keys.CATEGORY);
|
||||
|
||||
}
|
||||
|
|
|
@ -5,22 +5,18 @@ import net.minecraftforge.fml.common.gameevent.InputEvent;
|
|||
import techreborn.Core;
|
||||
import techreborn.lib.Key;
|
||||
|
||||
public class KeyInputEventHandler
|
||||
{
|
||||
private static Key getPressedKeybinding()
|
||||
{
|
||||
if (KeyBindings.config.isPressed())
|
||||
{
|
||||
return Key.CONFIG;
|
||||
}
|
||||
public class KeyInputEventHandler {
|
||||
private static Key getPressedKeybinding() {
|
||||
if (KeyBindings.config.isPressed()) {
|
||||
return Key.CONFIG;
|
||||
}
|
||||
|
||||
return Key.UNKNOWN;
|
||||
}
|
||||
return Key.UNKNOWN;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void handleKeyInputEvent(InputEvent.KeyInputEvent event)
|
||||
{
|
||||
Core.logHelper.info(getPressedKeybinding());
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void handleKeyInputEvent(InputEvent.KeyInputEvent event) {
|
||||
Core.logHelper.info(getPressedKeybinding());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue