Skip to content

Commit

Permalink
Merge pull request #2 from peyang-Celeron/master
Browse files Browse the repository at this point in the history
Fixed an issue where Title was also output without JSON when RawChatMode is enabled.
  • Loading branch information
PeyaPeyaPeyang authored May 10, 2020
2 parents 26ecf22 + de0832c commit d66efba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/main/java/ml/peya/mc/PeyangRawChatViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import ml.peya.mc.commands.*;
import ml.peya.mc.exception.*;
import net.minecraft.client.*;
import net.minecraft.client.gui.*;
import net.minecraft.crash.*;
import net.minecraft.util.*;
import net.minecraftforge.client.*;
Expand All @@ -14,7 +13,6 @@
import net.minecraftforge.fml.common.eventhandler.*;
import net.minecraftforge.fml.relauncher.*;

import java.awt.*;
import java.util.logging.*;

@Mod(modid = PeyangRawChatViewer.MOD_ID,
Expand Down Expand Up @@ -57,9 +55,10 @@ public void chatReceive(ClientChatReceivedEvent e)
//logger.info(e.message.getFormattedText());
if (!isRaw)
return;
if (e.type != 0)
return;
//logger.info(String.valueOf(!isRaw));
IChatComponent chatComponent = e.message;

//logger.info(e.message.getFormattedText());
logger.info(IChatComponent.Serializer.componentToJson(chatComponent));
String json = IChatComponent.Serializer.componentToJson(chatComponent).replace("§", "[Section]");
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "peyangrawchatviewer",
"name": "Peyang Raw Chat Viewer",
"description": " Raw Chat Viewer. /rawchat [on|off] for toggle RawView mode.",
"version": "1.0",
"version": "1.1",
"mcversion": "[1.8,)",
"url": "https://peya.ml/",
"updateUrl": "",
Expand Down

0 comments on commit d66efba

Please sign in to comment.