aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/GuiGuiLocationConfig.java7
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/config/guiconfig/PanelDelegate.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java8
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java7
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java9
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