diff options
author | syeyoung <cyong06@naver.com> | 2021-02-21 16:24:32 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-21 16:24:32 +0900 |
commit | f6b14be048af6d1e05d55de5895499136394948a (patch) | |
tree | e02890fa27e133e132913fe5ecf0645fec709c7c /src/main/java/kr | |
parent | 3df14ad613c004fc7b99d06f6dab768e7eca7dba (diff) | |
download | Skyblock-Dungeons-Guide-f6b14be048af6d1e05d55de5895499136394948a.tar.gz Skyblock-Dungeons-Guide-f6b14be048af6d1e05d55de5895499136394948a.tar.bz2 Skyblock-Dungeons-Guide-f6b14be048af6d1e05d55de5895499136394948a.zip |
terminals
Diffstat (limited to 'src/main/java/kr')
11 files changed, 459 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java index 7abea6b8..e5fbafbd 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java @@ -4,6 +4,7 @@ import kr.syeyoung.dungeonsguide.features.impl.advanced.FeatureDebuggableMap; import kr.syeyoung.dungeonsguide.features.impl.advanced.FeatureRoomCoordDisplay; import kr.syeyoung.dungeonsguide.features.impl.advanced.FeatureRoomDebugInfo; import kr.syeyoung.dungeonsguide.features.impl.boss.*; +import kr.syeyoung.dungeonsguide.features.impl.boss.terminal.FeatureTerminalSolvers; import kr.syeyoung.dungeonsguide.features.impl.dungeon.*; import kr.syeyoung.dungeonsguide.features.impl.etc.FeatureCooldownCounter; import kr.syeyoung.dungeonsguide.features.impl.etc.FeatureDisableMessage; @@ -74,6 +75,8 @@ public class FeatureRegistry { public static final FeatureBossHealth BOSSFIGHT_HEALTH = register(new FeatureBossHealth()); public static final FeatureThornBearPercentage BOSSFIGHT_BEAR_PERCENT = register(new FeatureThornBearPercentage()); public static final FeatureCurrentPhase BOSSFIGHT_CURRENT_PHASE = register(new FeatureCurrentPhase()); + public static final FeatureTerminalSolvers BOSSFIGHT_TERMINAL_SOLVERS = register(new FeatureTerminalSolvers()); + public static final FeatureInstaCloseChest DUNGEON_INSTACLOSE = register(new FeatureInstaCloseChest()); public static final FeatureBoxSkelemaster DUNGEON_BOXSKELEMASTER = register(new FeatureBoxSkelemaster()); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/CorrectThePaneSolutionProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/CorrectThePaneSolutionProvider.java new file mode 100644 index 00000000..33bfa631 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/CorrectThePaneSolutionProvider.java @@ -0,0 +1,35 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss.terminal; + +import net.minecraft.init.Blocks; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; +import net.minecraft.item.EnumDyeColor; +import net.minecraft.item.Item; + +import java.util.ArrayList; +import java.util.List; + +public class CorrectThePaneSolutionProvider implements TerminalSolutionProvider { + @Override + public TerminalSolution provideSolution(ContainerChest chest, List<Slot> clicked) { + TerminalSolution ts = new TerminalSolution(); + ts.setCurrSlots(new ArrayList<Slot>()); + for (Slot inventorySlot : chest.inventorySlots) { + if (inventorySlot.inventory != chest.getLowerChestInventory()) continue; + if (inventorySlot.getHasStack() && inventorySlot.getStack() != null) { + if (inventorySlot.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + inventorySlot.getStack().getItemDamage() == EnumDyeColor.RED.getMetadata()) { + ts.getCurrSlots().add(inventorySlot); + } + } + } + + + return ts; + } + + @Override + public boolean isApplicable(ContainerChest chest) { + return chest.getLowerChestInventory().getName().equals("Correct all the panes!"); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java new file mode 100644 index 00000000..07ab1106 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java @@ -0,0 +1,138 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss.terminal; + +import kr.syeyoung.dungeonsguide.features.SimpleFeature; +import kr.syeyoung.dungeonsguide.features.listener.*; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.gui.inventory.GuiChest; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; +import net.minecraftforge.client.event.GuiOpenEvent; +import net.minecraftforge.client.event.GuiScreenEvent; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import org.lwjgl.input.Mouse; + +import java.util.ArrayList; +import java.util.List; + +public class FeatureTerminalSolvers extends SimpleFeature implements GuiOpenListener, TickListener, GuiPostRenderListener, GuiClickListener, TooltipListener { + public FeatureTerminalSolvers() { + super("Bossfight","F7 GUI Terminal Solver", "Solve f7 gui terminals. (color, startswith, order, navigate, correct panes)", "bossfight.terminals"); + } + + public static final List<TerminalSolutionProvider> solutionProviders = new ArrayList<TerminalSolutionProvider>(); + + static { + solutionProviders.add(new WhatStartsWithSolutionProvider()); + solutionProviders.add(new SelectAllColorSolutionProivider()); + solutionProviders.add(new SelectInOrderSolutionProvider()); + solutionProviders.add(new NavigateMazeSolutionProvider()); + solutionProviders.add(new CorrectThePaneSolutionProvider()); + } + + private TerminalSolutionProvider solutionProvider; + private TerminalSolution solution; + private List<Slot> clicked = new ArrayList<Slot>(); + + @Override + public void onGuiOpen(GuiOpenEvent event) { + if (!isEnabled()) return; + solution = null; + solutionProvider = null; + clicked.clear(); + if (event.gui instanceof GuiChest) { + ContainerChest cc = (ContainerChest) ((GuiChest) event.gui).inventorySlots; + for (TerminalSolutionProvider solutionProvider : solutionProviders) { + if (solutionProvider.isApplicable(cc)) { + solution = solutionProvider.provideSolution(cc, clicked); + this.solutionProvider = solutionProvider; + } + } + } + } + + @Override + public void onTick() { + if (!isEnabled()) return; + if (solutionProvider == null) return; + if (!(Minecraft.getMinecraft().currentScreen instanceof GuiChest)) { + solution = null; + solutionProvider = null; + clicked.clear(); + return; + } + ContainerChest cc = (ContainerChest) ((GuiChest) Minecraft.getMinecraft().currentScreen).inventorySlots; + + solution = solutionProvider.provideSolution(cc, clicked); + } + + @Override + public void onGuiPostRender(GuiScreenEvent.DrawScreenEvent.Post rendered) { + if (!isEnabled()) return; + if (solutionProvider == null) return; + if (!(Minecraft.getMinecraft().currentScreen instanceof GuiChest)) { + solution = null; + solutionProvider = null; + clicked.clear(); + return; + } + + if (solution != null) { + int i = 222; + int j = i - 108; + int ySize = j + (((ContainerChest)(((GuiChest) Minecraft.getMinecraft().currentScreen).inventorySlots)).getLowerChestInventory().getSizeInventory() / 9) * 18; + int left = (rendered.gui.width - 176) / 2; + int top = (rendered.gui.height - ySize ) / 2; + GlStateManager.pushMatrix(); + GlStateManager.disableDepth(); + GlStateManager.disableLighting(); + GlStateManager.colorMask(true, true, true, false); + GlStateManager.translate(left, top, 0); + if (solution.getCurrSlots() != null) { + for (Slot currSlot : solution.getCurrSlots()) { + int x = currSlot.xDisplayPosition; + int y = currSlot.yDisplayPosition; + Gui.drawRect(x, y, x + 16, y + 16, 0x7700FFFF); + } + } + if (solution.getNextSlots() != null) { + for (Slot nextSlot : solution.getNextSlots()) { + int x = nextSlot.xDisplayPosition; + int y = nextSlot.yDisplayPosition; + Gui.drawRect(x, y, x + 16, y + 16, 0x77FFFF00); + } + } + GlStateManager.colorMask(true, true, true, true); + GlStateManager.popMatrix(); + } + } + + @Override + public void onMouseInput(GuiScreenEvent.MouseInputEvent.Pre mouseInputEvent) { + if (!isEnabled()) return; + if (Mouse.getEventButton() == -1) return; + if (solutionProvider == null) return; + if (solution == null) return; + if (solution.getCurrSlots() == null) { + mouseInputEvent.setCanceled(true); + return; + } + mouseInputEvent.setCanceled(true); + Slot s = ((GuiChest) Minecraft.getMinecraft().currentScreen).getSlotUnderMouse(); + if (solution.getCurrSlots().contains(s)) { + clicked.add(s); + Minecraft.getMinecraft().playerController.windowClick(((GuiChest)Minecraft.getMinecraft().currentScreen).inventorySlots.windowId, s.getSlotIndex(), + 2, 0, Minecraft.getMinecraft().thePlayer); + return; + } + } + + @Override + public void onTooltip(ItemTooltipEvent event) { + if (!isEnabled()) return; + if (solutionProvider == null) return; + event.toolTip.clear(); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/NavigateMazeSolutionProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/NavigateMazeSolutionProvider.java new file mode 100644 index 00000000..6a19d848 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/NavigateMazeSolutionProvider.java @@ -0,0 +1,126 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss.terminal; + +import net.minecraft.init.Blocks; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; +import net.minecraft.item.EnumDyeColor; +import net.minecraft.item.Item; + +import java.util.ArrayList; +import java.util.List; + +public class NavigateMazeSolutionProvider implements TerminalSolutionProvider { + @Override + public TerminalSolution provideSolution(ContainerChest chest, List<Slot> clicked) { + TerminalSolution ts = new TerminalSolution(); + ts.setCurrSlots(new ArrayList<Slot>()); + Slot solution = null; + for (Slot inventorySlot : chest.inventorySlots) { + if (inventorySlot.inventory != chest.getLowerChestInventory()) continue; + if (inventorySlot.getHasStack() && inventorySlot.getStack() != null) { + if (inventorySlot.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + inventorySlot.getStack().getItemDamage() == EnumDyeColor.WHITE.getMetadata()) { + int x = inventorySlot.slotNumber % 9; + int y = inventorySlot.slotNumber / 9; + + if (x > 0) { + Slot toChk = chest.inventorySlots.get(y * 9 + x - 1); + + if (toChk.getHasStack() && toChk.getStack() != null && + toChk.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + toChk.getStack().getItemDamage() == EnumDyeColor.LIME.getMetadata()) { + solution = inventorySlot; + break; + } + } + if (x < 8) { + Slot toChk = chest.inventorySlots.get(y * 9 + x + 1); + + if (toChk.getHasStack() && toChk.getStack() != null && + toChk.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + toChk.getStack().getItemDamage() == EnumDyeColor.LIME.getMetadata()) { + solution = inventorySlot; + break; + } + } + if (y > 0) { + Slot toChk = chest.inventorySlots.get((y-1) * 9 + x); + + if (toChk.getHasStack() && toChk.getStack() != null && + toChk.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + toChk.getStack().getItemDamage() == EnumDyeColor.LIME.getMetadata()) { + solution = inventorySlot; + break; + } + } + if (y < chest.getLowerChestInventory().getSizeInventory() / 9 - 1) { + Slot toChk = chest.inventorySlots.get((y+1) * 9 + x); + + if (toChk.getHasStack() && toChk.getStack() != null && + toChk.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + toChk.getStack().getItemDamage() == EnumDyeColor.LIME.getMetadata()) { + solution = inventorySlot; + break; + } + } + } + } + } + + if (solution == null) return null; + ts.getCurrSlots().add(solution); + ts.setNextSlots(new ArrayList<Slot>()); + { + int x = solution.slotNumber % 9; + int y = solution.slotNumber / 9; + + if (x > 0) { + Slot toChk = chest.inventorySlots.get(y * 9 + x - 1); + + if (toChk.getHasStack() && toChk.getStack() != null && + toChk.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + toChk.getStack().getItemDamage() == EnumDyeColor.WHITE.getMetadata()) { + ts.getNextSlots().add(toChk); + return ts; + } + } + if (x < 8) { + Slot toChk = chest.inventorySlots.get(y * 9 + x + 1); + + if (toChk.getHasStack() && toChk.getStack() != null && + toChk.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + toChk.getStack().getItemDamage() == EnumDyeColor.WHITE.getMetadata()) { + ts.getNextSlots().add(toChk); + return ts; + } + } + if (y > 0) { + Slot toChk = chest.inventorySlots.get((y-1) * 9 + x); + + if (toChk.getHasStack() && toChk.getStack() != null && + toChk.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + toChk.getStack().getItemDamage() == EnumDyeColor.WHITE.getMetadata()) { + ts.getNextSlots().add(toChk); + return ts; + } + } + if (y < chest.getLowerChestInventory().getSizeInventory() / 9 - 1) { + Slot toChk = chest.inventorySlots.get((y+1) * 9 + x); + + if (toChk.getHasStack() && toChk.getStack() != null && + toChk.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) && + toChk.getStack().getItemDamage() == EnumDyeColor.WHITE.getMetadata()) { + ts.getNextSlots().add(toChk); + return ts; + } + } + } + + return ts; + } + + @Override + public boolean isApplicable(ContainerChest chest) { + return chest.getLowerChestInventory().getName().equals("Navigate the maze!"); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/SelectAllColorSolutionProivider.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/SelectAllColorSolutionProivider.java new file mode 100644 index 00000000..663cce11 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/SelectAllColorSolutionProivider.java @@ -0,0 +1,42 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss.terminal; + +import net.minecraft.init.Items; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; +import net.minecraft.item.EnumDyeColor; + +import java.util.ArrayList; +import java.util.List; + +public class SelectAllColorSolutionProivider implements TerminalSolutionProvider { + @Override + public TerminalSolution provideSolution(ContainerChest chest, List<Slot> clicked) { + TerminalSolution ts = new TerminalSolution(); + ts.setCurrSlots(new ArrayList<Slot>()); + String name = chest.getLowerChestInventory().getName(); + EnumDyeColor edc = null; + for (EnumDyeColor edc2 : EnumDyeColor.values()) { + if (name.contains(edc2.getName().toUpperCase().replace("_"," "))) { + edc = edc2; + break; + } + } + if (edc == null) return null; + + for (Slot inventorySlot : chest.inventorySlots) { + if (inventorySlot.inventory != chest.getLowerChestInventory()) continue; + if (inventorySlot.getHasStack() && inventorySlot.getStack() != null && !inventorySlot.getStack().isItemEnchanted()) { + if (inventorySlot.getStack().getItem() != Items.dye && inventorySlot.getStack().getItemDamage() == edc.getMetadata()) + ts.getCurrSlots().add(inventorySlot); + else if (inventorySlot.getStack().getItem() == Items.dye && inventorySlot.getStack().getItemDamage() == edc.getDyeDamage()) + ts.getCurrSlots().add(inventorySlot); + } + } + return ts; + } + + @Override + public boolean isApplicable(ContainerChest chest) { + return chest.getLowerChestInventory().getName().startsWith("Select all the "); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/SelectInOrderSolutionProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/SelectInOrderSolutionProvider.java new file mode 100644 index 00000000..d03f71fa --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/SelectInOrderSolutionProvider.java @@ -0,0 +1,54 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss.terminal; + +import net.minecraft.init.Blocks; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; +import net.minecraft.item.EnumDyeColor; +import net.minecraft.item.Item; + +import java.util.ArrayList; +import java.util.List; + +public class SelectInOrderSolutionProvider implements TerminalSolutionProvider { + @Override + public TerminalSolution provideSolution(ContainerChest chest, List<Slot> clicked) { + TerminalSolution ts = new TerminalSolution(); + ts.setCurrSlots(new ArrayList<Slot>()); + int lowest = 1000; + Slot slotLowest = null; + for (Slot inventorySlot : chest.inventorySlots) { + if (inventorySlot.inventory != chest.getLowerChestInventory()) continue; + if (inventorySlot.getHasStack() && inventorySlot.getStack() != null && inventorySlot.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) + && inventorySlot.getStack().getItemDamage() == EnumDyeColor.LIME.getMetadata()) { + if (inventorySlot.getStack().stackSize < lowest) { + lowest = inventorySlot.getStack().stackSize; + slotLowest = inventorySlot; + } + } + } + if (slotLowest != null) + ts.getCurrSlots().add(slotLowest); + + Slot next = null; + for (Slot inventorySlot : chest.inventorySlots) { + if (inventorySlot.inventory != chest.getLowerChestInventory()) continue; + if (inventorySlot.getHasStack() && inventorySlot.getStack() != null && inventorySlot.getStack().getItem() == Item.getItemFromBlock(Blocks.stained_glass_pane) + && inventorySlot.getStack().getItemDamage() == EnumDyeColor.LIME.getMetadata()) { + if (inventorySlot.getStack().stackSize == lowest + 1) { + next = inventorySlot; + } + } + } + if (next != null) { + ts.setNextSlots(new ArrayList<Slot>()); + ts.getNextSlots().add(next); + } + + return ts; + } + + @Override + public boolean isApplicable(ContainerChest chest) { + return chest.getLowerChestInventory().getName().equals("Click in order!"); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/TerminalSolution.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/TerminalSolution.java new file mode 100644 index 00000000..bf82d5f2 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/TerminalSolution.java @@ -0,0 +1,12 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss.terminal; + +import lombok.Data; +import net.minecraft.inventory.Slot; + +import java.util.List; + +@Data +public class TerminalSolution { + private List<Slot> currSlots; + private List<Slot> nextSlots; +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/TerminalSolutionProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/TerminalSolutionProvider.java new file mode 100644 index 00000000..3a3dbe03 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/TerminalSolutionProvider.java @@ -0,0 +1,11 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss.terminal; + +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; + +import java.util.List; + +public interface TerminalSolutionProvider { + TerminalSolution provideSolution(ContainerChest chest, List<Slot> clicked); + boolean isApplicable(ContainerChest chest); +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/WhatStartsWithSolutionProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/WhatStartsWithSolutionProvider.java new file mode 100644 index 00000000..eb33a5b5 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/WhatStartsWithSolutionProvider.java @@ -0,0 +1,33 @@ +package kr.syeyoung.dungeonsguide.features.impl.boss.terminal; + +import kr.syeyoung.dungeonsguide.utils.TextUtils; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; +import org.apache.logging.log4j.core.appender.db.jpa.converter.ThrowableAttributeConverter; + +import java.util.ArrayList; +import java.util.List; + +public class WhatStartsWithSolutionProvider implements TerminalSolutionProvider{ + @Override + public TerminalSolution provideSolution(ContainerChest chest, List<Slot> clicked) { + String that = chest.getLowerChestInventory().getName().replace("What starts with: '", "").replace("'?", "").trim().toLowerCase(); + + TerminalSolution ts = new TerminalSolution(); + ts.setCurrSlots(new ArrayList<Slot>()); + for (Slot inventorySlot : chest.inventorySlots) { + if (inventorySlot.inventory != chest.getLowerChestInventory()) continue; + if (inventorySlot.getHasStack() && inventorySlot.getStack() != null && !inventorySlot.getStack().isItemEnchanted() ) { + String name = TextUtils.stripColor(inventorySlot.getStack().getDisplayName()).toLowerCase(); + if (name.startsWith(that)) + ts.getCurrSlots().add(inventorySlot); + } + } + return ts; + } + + @Override + public boolean isApplicable(ContainerChest chest) { + return chest.getLowerChestInventory().getName().startsWith("What starts with: '"); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java index 2e1451dc..e7aa9421 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java @@ -97,6 +97,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis @Override public void onGuiPreRender(GuiScreenEvent.DrawScreenEvent.Pre rendered) { + if (!isEnabled()) return; if (Minecraft.getMinecraft().currentScreen instanceof GuiGuiLocationConfig || Minecraft.getMinecraft().currentScreen instanceof GuiConfig || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonRoomEdit @@ -294,6 +295,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis @Override public void onMouseInput(GuiScreenEvent.MouseInputEvent.Pre mouseInputEvent) { + if (!isEnabled()) return; if (Minecraft.getMinecraft().currentScreen instanceof GuiGuiLocationConfig || Minecraft.getMinecraft().currentScreen instanceof GuiConfig || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonRoomEdit @@ -383,6 +385,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis @Override public void drawWorld(float partialTicks) { + if (!isEnabled()) return; if (!skyblockStatus.isOnDungeon()) return; if (skyblockStatus.getContext() == null || !skyblockStatus.getContext().getMapProcessor().isInitialized()) return; DungeonContext context = skyblockStatus.getContext(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorNecron.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorNecron.java index 8988a29e..0ad12a11 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorNecron.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bossfight/BossfightProcessorNecron.java @@ -45,7 +45,7 @@ public class BossfightProcessorNecron extends GeneralBossfightProcessor { String healthPart = name.split(" ")[2]; health = TextUtils.reverseFormat(healthPart.substring(0, healthPart.length() - 1)); } - healths.add(new HealthData("Bonzo", (int) health,250000 , this.getCurrentPhase().startsWith("fight-"))); +// healths.add(new HealthData("Bonzo", (int) health,250000 , this.getCurrentPhase().startsWith("fight-"))); return healths; } @@ -55,7 +55,7 @@ public class BossfightProcessorNecron extends GeneralBossfightProcessor { // §e﴾ §c§lBonzo§r §a250k§c❤ §e﴿ public void onEntityUpdate(LivingEvent.LivingUpdateEvent updateEvent) { if (updateEvent.entityLiving.getName().contains("❤") && updateEvent.entityLiving instanceof EntityArmorStand) { - System.out.println(updateEvent.entityLiving.getName()); +// System.out.println(updateEvent.entityLiving.getName()); } } } |