aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2023-01-24 21:00:47 +0900
committersyeyoung <cyoung06@naver.com>2023-01-24 21:00:47 +0900
commit284bd590df9fee1daa097d92b227ce9d057b86f6 (patch)
tree3d2709206a1c35a8e05b31f49e7235c3ac80fb2b
parentf67ead2e0e7c359be8585bf2df12e09bad4fc070 (diff)
downloadSkyblock-Dungeons-Guide-284bd590df9fee1daa097d92b227ce9d057b86f6.tar.gz
Skyblock-Dungeons-Guide-284bd590df9fee1daa097d92b227ce9d057b86f6.tar.bz2
Skyblock-Dungeons-Guide-284bd590df9fee1daa097d92b227ce9d057b86f6.zip
- fix it eating up chat message when stomp error
Signed-off-by: syeyoung <cyoung06@naver.com>
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java16
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java4
2 files changed, 14 insertions, 6 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
index 003b5a44..206aed96 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
@@ -100,12 +100,16 @@ public class ChatProcessor {
ChatSubscriber chatSubscribed = it.next();
context.put("removed", processed);
context.put("onceListenered", listened);
- ChatProcessResult chatProcessResult = chatSubscribed.process(txt, context);
- if (chatProcessResult.isRemoveChat()) processed++;
- if (chatProcessResult.isRemoveListener()) listened++;
-
- if (chatProcessResult.isRemoveChat()) chatReceivedEvent.setResult(Event.Result.DENY);
- if (chatProcessResult.isRemoveListener()) it.remove();
+ try {
+ ChatProcessResult chatProcessResult = chatSubscribed.process(txt, context);
+ if (chatProcessResult.isRemoveChat()) processed++;
+ if (chatProcessResult.isRemoveListener()) listened++;
+
+ if (chatProcessResult.isRemoveChat()) chatReceivedEvent.setResult(Event.Result.DENY);
+ if (chatProcessResult.isRemoveListener()) it.remove();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
index a75b11fb..95d7367c 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
@@ -48,6 +48,7 @@ import kr.syeyoung.dungeonsguide.mod.utils.MapUtils;
import kr.syeyoung.dungeonsguide.mod.wsresource.StaticResourceCache;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.client.settings.GameSettings;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
@@ -186,6 +187,9 @@ public class CommandDgDebug extends CommandBase {
case "clearprofile":
clearProfileCommand();
break;
+ case "gimmebright":
+ Minecraft.getMinecraft().gameSettings.setOptionFloatValue(GameSettings.Options.GAMMA, 1000);
+ break;
default:
ChatTransmitter.addToQueue(new ChatComponentText("ain't gonna find much anything here"));
ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §e/dg loadrooms §7-§f Reloads dungeon roomdata."));