diff options
author | syeyoung <cyong06@naver.com> | 2021-02-22 13:37:15 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-22 13:37:15 +0900 |
commit | 4d0beb048ef798656cf4db5b340daae4a3ddd8de (patch) | |
tree | 7e42cc5e62ce8e7652412a8d903bf04ee185e37c /src/main/java/kr/syeyoung/dungeonsguide/Keybinds.java | |
parent | 4f289db303d4e68e68789767b91e3106ff1866d7 (diff) | |
download | Skyblock-Dungeons-Guide-4d0beb048ef798656cf4db5b340daae4a3ddd8de.tar.gz Skyblock-Dungeons-Guide-4d0beb048ef798656cf4db5b340daae4a3ddd8de.tar.bz2 Skyblock-Dungeons-Guide-4d0beb048ef798656cf4db5b340daae4a3ddd8de.zip |
a bit better pathfinding and a toggle
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/Keybinds.java')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/Keybinds.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/Keybinds.java b/src/main/java/kr/syeyoung/dungeonsguide/Keybinds.java index 0ef54a04..c139dc73 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/Keybinds.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/Keybinds.java @@ -2,6 +2,8 @@ package kr.syeyoung.dungeonsguide; import net.minecraft.client.settings.KeyBinding; import net.minecraftforge.fml.client.registry.ClientRegistry; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.InputEvent; import org.lwjgl.input.Keyboard; public class Keybinds @@ -9,6 +11,7 @@ public class Keybinds public static KeyBinding editingSession; public static KeyBinding sendBombdefuse; public static KeyBinding nextSecret; + public static KeyBinding togglePathfind; public static void register() { @@ -18,5 +21,15 @@ public class Keybinds ClientRegistry.registerKeyBinding(sendBombdefuse); nextSecret = new KeyBinding("navigate to next secret. (Req option enabled at /dg)", Keyboard.KEY_NONE, "key.categories.misc"); ClientRegistry.registerKeyBinding(nextSecret); + togglePathfind = new KeyBinding("toggle Pathfind. (Req option enabled at /dg)", Keyboard.KEY_NONE, "key.categories.misc"); + ClientRegistry.registerKeyBinding(togglePathfind); + } + + public static boolean togglePathfindStatus = false; + + @SubscribeEvent + public void onTogglePathfindStatus(InputEvent.KeyInputEvent keyInputEvent) { + if (togglePathfind.isKeyDown()) + togglePathfindStatus = !togglePathfindStatus; } } |