diff options
author | syeyoung <cyong06@naver.com> | 2021-02-20 01:41:02 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-20 01:41:02 +0900 |
commit | 8d78c44b5a389981b7e80eb758ed7dced69e8d88 (patch) | |
tree | d3bc9931301718bf4ab0b59eeb7b9d7491b52b2b /src/main/java/kr/syeyoung/dungeonsguide | |
parent | 7c15d593f5f583fc819835f7c0265137beb9c270 (diff) | |
download | Skyblock-Dungeons-Guide-8d78c44b5a389981b7e80eb758ed7dced69e8d88.tar.gz Skyblock-Dungeons-Guide-8d78c44b5a389981b7e80eb758ed7dced69e8d88.tar.bz2 Skyblock-Dungeons-Guide-8d78c44b5a389981b7e80eb758ed7dced69e8d88.zip |
solve few bugs, and nice hax
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide')
5 files changed, 32 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java index 53727698..873ecb04 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java @@ -80,7 +80,12 @@ public class GuiGuiLocationConfig extends GuiScreen { @Override public void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException { super.mouseClicked(mouseX, mouseY, mouseButton); - mainPanel.mouseClicked0(mouseX, mouseY,mouseX,mouseY, mouseButton); + try { + mainPanel.mouseClicked0(mouseX, mouseY, mouseX, mouseY, mouseButton); + } catch (IllegalArgumentException ignored) { + } catch (Throwable t) { + t.printStackTrace(); + } } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java index 6add50c4..1ae85ac5 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java @@ -65,6 +65,8 @@ public class PanelDelegate extends MPanel { } lastX = absMouseX; lastY = absMouseY; + + if (selectedPart != -1) throw new IllegalArgumentException("bruh, a hack to stop event progress"); } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java index f0461a1e..953de255 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java @@ -21,6 +21,7 @@ import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.passive.EntityBat; import net.minecraft.init.Items; import net.minecraft.util.BlockPos; @@ -165,6 +166,13 @@ public class GeneralRoomProcessor implements RoomProcessor { @Override public void onEntityUpdate(LivingEvent.LivingUpdateEvent updateEvent) { + if (updateEvent.entityLiving instanceof EntityArmorStand && + updateEvent.entityLiving.getName() != null && + updateEvent.entityLiving.getName().contains("Mimic") && + !dungeonRoom.getContext().isGotMimic()) { + dungeonRoom.getContext().setGotMimic(true); + Minecraft.getMinecraft().thePlayer.sendChatMessage("/pc $DG-Mimic"); + } } @Override diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java index fc86aeb9..3e287802 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java @@ -149,6 +149,13 @@ public class RoomProcessorBombDefuseSolver extends GeneralRoomProcessor { byte[] bytes = baos.toByteArray(); String str = Base64.encode(bytes); Minecraft.getMinecraft().thePlayer.sendChatMessage("/pc $DG-BD " +str); + + for (ChamberSet ch:chambers) { + if (ch.getLeft() != null && ch.getLeft().getProcessor() != null) + ch.getLeft().getProcessor().onDataRecieve(compound); + if (ch.getRight() != null && ch.getRight().getProcessor() != null) + ch.getRight().getProcessor().onDataRecieve(compound); + } } catch (IOException e2) { e2.printStackTrace(); e.sendDebugChat(new ChatComponentText("Failed to send Bomb Defuse Chat")); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java index 8621af57..c3b4c170 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java @@ -9,6 +9,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.BlockPos; +import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; import javax.vecmath.Vector2f; @@ -93,6 +94,14 @@ public class GoldenPathLeftProcessor extends GeneralDefuseChamberProcessor { public void onSendData() { if (goldenPathsolution == null) return; Minecraft.getMinecraft().thePlayer.sendChatMessage("/pc $DG-BDGP "+goldenPathsolution); + + ChatComponentText text = new ChatComponentText("$DG-BDGP "+goldenPathsolution); + for (RoomProcessorBombDefuseSolver.ChamberSet ch: getSolver().getChambers()) { + if (ch.getLeft() != null && ch.getLeft().getProcessor() != null) + ch.getLeft().getProcessor().chatReceived(text); + if (ch.getRight() != null && ch.getRight().getProcessor() != null) + ch.getRight().getProcessor().chatReceived(text); + } } @Override |