mrbuilder1961 / ChatPatches

A Minecraft client-side mod that touches up Minecraft's mundane chat, with configurability in mind!
GNU Lesser General Public License v3.0
43 stars 16 forks source link

Xaero's Minimap Waypoint Sharing Messages are Blank (v204.6.4-1.20.4 Fabric) #158

Open iblowmymind opened 2 months ago

iblowmymind commented 2 months ago

Description

When someone shares a waypoint using Xaero's Minimap, normally it's supposed to display a custom chat message with an add button. The minimap mod accomplishes this with intercepting messages that begin with "xaero-waypoint:" and replacing it with its custom message. However, with Chat Patches, the message will just show up as blank space.

How to reproduce

  1. Install Xaero's Minimap, World Map (optional?) and Chat Patches.
  2. Have someone else in multiplayer create a waypoint and share it.
  3. The message will be blank.

Expected result

The chat message should say the waypoint's name, and have an [Add] button that adds the waypoint.

Log file link

[14:20:59] [Render thread/ERROR]: [ChatUtils.modifyMessage] An error occurred while modifying message 'TestUser shared a waypoint called "Cave" from overworld! §2§n[Add]', returning original:
[14:20:59] [Render thread/ERROR]: [ChatUtils.modifyMessage] /!\ Please report this error on GitHub or Discord with the full log file attached! /!\
java.lang.IllegalStateException: No closing angle bracket found in vanilla message 'TestUser shared a waypoint called "Cave" from overworld! §2§n[Add]' !
    at obro1961.chatpatches.util.ChatUtils.lambda$modifyMessage$3(ChatUtils.java:224) ~[chatpatches-204.6.4.jar:?]
    at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
    at obro1961.chatpatches.util.ChatUtils.modifyMessage(ChatUtils.java:224) ~[chatpatches-204.6.4.jar:?]
    at net.minecraft.class_338.localvar$zko000$chatpatches$modifyMessage(class_338.java:688) ~[client-intermediary.jar:?]
    at net.minecraft.class_338.method_1815(class_338.java) ~[client-intermediary.jar:?]
    at net.minecraft.class_338.method_44811(class_338.java:211) ~[client-intermediary.jar:?]
    at net.minecraft.class_338.method_1812(class_338.java:206) ~[client-intermediary.jar:?]
    at xaero.common.minimap.waypoints.WaypointSharingHandler.onWaypointReceived(WaypointSharingHandler.java:97) ~[Xaeros_Minimap_24.0.3_Fabric_1.20.4.jar:?]
    at xaero.common.events.ClientEvents.handleChatMessage(ClientEvents.java:161) ~[Xaeros_Minimap_24.0.3_Fabric_1.20.4.jar:?]
    at xaero.common.events.ClientEvents.handleClientSystemChatReceivedEvent(ClientEvents.java:154) ~[Xaeros_Minimap_24.0.3_Fabric_1.20.4.jar:?]
    at xaero.common.core.XaeroMinimapCore.onSystemChat(XaeroMinimapCore.java:280) ~[Xaeros_Minimap_24.0.3_Fabric_1.20.4.jar:?]
    at net.minecraft.class_7594.handler$flg000$xaerominimap$onHandleSystemChat(class_7594.java:2039) ~[client-intermediary.jar:?]
    at net.minecraft.class_7594.method_44736(class_7594.java:196) ~[client-intermediary.jar:?]
    at net.minecraft.class_634.method_43596(class_634.java:869) ~[client-intermediary.jar:?]
    at net.minecraft.class_7439.method_43631(class_7439.java:20) ~[client-intermediary.jar:?]
    at net.minecraft.class_7439.method_11054(class_7439.java:7) ~[client-intermediary.jar:?]
    at net.minecraft.class_2600.method_11072(class_2600.java:24) ~[client-intermediary.jar:?]
    at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?]
    at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
    at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?]
    at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?]
    at net.minecraft.class_310.method_1523(class_310.java:1283) ~[client-intermediary.jar:?]
    at net.minecraft.class_310.method_1514(class_310.java:888) ~[client-intermediary.jar:?]
    at net.minecraft.client.main.Main.main(Main.java:265) ~[minecraft-1.20.4-client.jar:?]
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.9.jar:?]
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.9.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.9.jar:?]
    at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) ~[NewLaunch.jar:?]
    at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) ~[NewLaunch.jar:?]
    at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[NewLaunch.jar:?]

Specs and Details

Thanks!

iblowmymind commented 2 months ago

In hindsight, this issue is pretty similar to #156. I should've looked better before creating the issue, I just searched for Xaero and saw nothing so I thought it would be okay. Apologies! Trying out the included test build you linked in that issue, though, does not fix the problem for me. The error message returned in the log is the exact same.

mrbuilder1961 commented 2 months ago

no it's okay, this likely has a slightly different root cause that just happens to be causing the same outcome. i'll try and provide a different test build later to see what's up, but it seems like the xaero chat message is being marked as a vanilla-formatted one, which breaks the existing code bc it isn't actually formatted that way. i'll see what i can do!

also, tysm for the detailed report! it's so organized and it almost makes me want to keep it up lmao

mrbuilder1961 commented 2 months ago

i doubt this will fix the issue, but if you could try loading this and sending the log that would be great! just make sure to try and reproduce the issue again before sending the log. https://cdn.discordapp.com/attachments/901476441080860672/1229197816513958008/chatpatches-204.6.5.jar?ex=662eceac&is=661c59ac&hm=4c4437fd2aef22968873f7e6e257bd35c9f66574f5070dfa0e983ae5c4db8d0c&

BlueJayofEvil commented 2 months ago

i doubt this will fix the issue, but if you could try loading this and sending the log that would be great! just make sure to try and reproduce the issue again before sending the log. https://cdn.discordapp.com/attachments/901476441080860672/1229197816513958008/chatpatches-204.6.5.jar?ex=662eceac&is=661c59ac&hm=4c4437fd2aef22968873f7e6e257bd35c9f66574f5070dfa0e983ae5c4db8d0c&

I'm also having the same issue, so I tried with that build you linked. Still not fixed. Here's my logs: https://mclo.gs/dPI7eY1