From 88e9da119ef7dd0a5dda686f5781dc7328c584ce Mon Sep 17 00:00:00 2001 From: GodSaveTheDoge <51802433+GodSaveTheDoge@users.noreply.github.com> Date: Wed, 9 Jun 2021 00:35:35 +0200 Subject: Refractored Chronomatron Solver refractored src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java --- .../features/puzzlesolvers/ChronomatronSolver.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/main') diff --git a/src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java index 208cf9b..1fff07a 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java @@ -67,19 +67,13 @@ public class ChronomatronSolver { Slot glassSlot = invSlots.get(i); - if (chronomatronMouseClicks + 1 < chronomatronPattern.size()) { - if (chronomatronPattern.get(chronomatronMouseClicks).equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { - if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); - } - } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); - } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT_TO_NEXT + 0XBE000000); - } - } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + + if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); + } else if (chronomatronMouseClicks + 1 < chronomatronPattern.size() && glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT_TO_NEXT + 0XBE000000); } + } } } else if (invSlots.get(49).getStack().getDisplayName().equals("§aRemember the pattern!")) { -- cgit