Added code formatter

This commit is contained in:
modmuss50 2016-03-24 00:39:26 +00:00
parent 710f9c04e7
commit b9448d5d90
444 changed files with 32383 additions and 26254 deletions

View file

@ -1,12 +1,14 @@
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);
}

View file

@ -5,18 +5,22 @@ 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());
}
}