diff options
-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); } } |