diff options
author | BuggyAl <64368488+BuggyAl@users.noreply.github.com> | 2023-02-27 22:06:44 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 13:06:44 +0900 |
commit | a0c1dc1a29f960b5fe97ec96411e86fff9df0fd2 (patch) | |
tree | 299f58dca7627f809514d2c1f1ec983f2f87ad74 /mod | |
parent | 728f1863377135fd71cc81c3abdc6c05506fff62 (diff) | |
download | Skyblock-Dungeons-Guide-a0c1dc1a29f960b5fe97ec96411e86fff9df0fd2.tar.gz Skyblock-Dungeons-Guide-a0c1dc1a29f960b5fe97ec96411e86fff9df0fd2.tar.bz2 Skyblock-Dungeons-Guide-a0c1dc1a29f960b5fe97ec96411e86fff9df0fd2.zip |
cancel invalid clicks in terminal (#351)
* cancel invalid clicks in terminal
Signed-off-by: BuggyAl <64368488+BuggyAl@users.noreply.github.com>
* - An option for blocking click
Signed-off-by: syeyoung <cyoung06@naver.com>
---------
Signed-off-by: BuggyAl <64368488+BuggyAl@users.noreply.github.com>
Signed-off-by: syeyoung <cyoung06@naver.com>
Co-authored-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod')
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/FeatureTerminalSolvers.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/FeatureTerminalSolvers.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/FeatureTerminalSolvers.java index 800b75d1..8b6b2f22 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/FeatureTerminalSolvers.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/FeatureTerminalSolvers.java @@ -20,8 +20,10 @@ package kr.syeyoung.dungeonsguide.mod.features.impl.boss.terminal; +import kr.syeyoung.dungeonsguide.mod.config.types.TCBoolean; import kr.syeyoung.dungeonsguide.mod.events.annotations.DGEventHandler; import kr.syeyoung.dungeonsguide.mod.events.impl.DGTickEvent; +import kr.syeyoung.dungeonsguide.mod.features.FeatureParameter; import kr.syeyoung.dungeonsguide.mod.features.SimpleFeature; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; @@ -40,8 +42,12 @@ import java.util.List; public class FeatureTerminalSolvers extends SimpleFeature { public FeatureTerminalSolvers() { super("Bossfight.Floor 7","F7 GUI Terminal Solver", "Solve f7 gui terminals. (color, starts with, order, navigate, correct panes)", "bossfight.terminals"); + + addParameter("cancelwrongclick", new FeatureParameter<>("cancelwrongclick", "Block invalid clicks", "", true, TCBoolean.INSTANCE, nval -> block = nval)); } + private boolean block = true; + public static final List<TerminalSolutionProvider> solutionProviders = new ArrayList<TerminalSolutionProvider>(); static { @@ -142,7 +148,9 @@ public class FeatureTerminalSolvers extends SimpleFeature { Slot s = ((GuiChest) Minecraft.getMinecraft().currentScreen).getSlotUnderMouse(); if (solution.getCurrSlots().contains(s)) { clicked.add(s); - return; + } else { + if (block) + mouseInputEvent.setCanceled(true); } } |