Areas (Forge)

Areas (Forge)

890k Downloads

Collective 1.19.2 6.57 breaking Show Me What You've Got!

SCPRedMage opened this issue ยท 1 comments

commented

Information

Minecraft version: 1.19.2
Modloader: Fabric
Fabric loader version: 0.14.21
Environment: Multiplayer

First mod name: Collective
First mod version: 6.57

Second mod name: Show Me What You've Got!
Second mod version: 1.0.3

Description

Show Me What You've Got! allows you to send chat messages with items links in them, so other players can view them via tooltips. With Collective installed, chat messages with items linked don't appear in chat, even on the sender's end.

It appears this is because the playerInfo sent to showMessageToPlayer() is null, preventing it from running playerInfo.getProfile(). I resolved this by changing line 47 in ChatListenerMixin.java to:
Component newMessage = CollectiveChatEvents.CLIENT_CHAT_RECEIVED.invoker().onClientChat(bound.chatType(), component, (playerInfo != null ? playerInfo.getProfile().getId() : null));
Compiling with that change I was able to get the chat messages to appear, and everything seems to be working properly.

Crash report

java.lang.NullPointerException: Cannot invoke "net.minecraft.class_640.method_2966()" because "playerInfo" is null
	at net.minecraft.class_7594.handler$dbg000$collective$showMessageToPlayer(class_7594.java:2531) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_44943(class_7594.java:193) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_44768(class_7594.java:165) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594$1.accept(class_7594.java:123) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_44818(class_7594.java:99) ~[client-intermediary.jar:?]
	at net.minecraft.class_7594.method_44733(class_7594.java:113) ~[client-intermediary.jar:?]
	at net.minecraft.class_634.method_43595(class_634.java:833) ~[client-intermediary.jar:?]
	at net.minecraft.class_7438.method_43629(class_7438.java:27) ~[client-intermediary.jar:?]
	at net.minecraft.class_7438.method_11054(class_7438.java:11) ~[client-intermediary.jar:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:22) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.redirect$cfl000$c2me-opts-scheduling$redirectExecuteTask(class_1255.java:1021) [client-intermediary.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:131) [client-intermediary.jar:?]
	at net.minecraft.class_1255.method_5383(class_1255.java:116) [client-intermediary.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1129) [client-intermediary.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:768) [client-intermediary.jar:?]
	at net.minecraft.client.main.Main.method_44604(Main.java:244) [client-intermediary.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:51) [client-intermediary.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468) [fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.14.21.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.14.21.jar:?]

commented

Thanks for opening the issue and providing the solution! This has been updated in Collective version 6.59. Appreciate it.

https://www.curseforge.com/minecraft/mc-mods/collective/files