Wudji / XPlus-AutoFish

An update of MrTroot's Autofish mod to 1.19.4+ with various new features & bugfixs.
https://modrinth.com/mod/x+-autofish
GNU General Public License v3.0
16 stars 6 forks source link

Mod causes Network Protocol Error if server prohibits /tell #11

Closed reithegoat closed 6 months ago

reithegoat commented 6 months ago

When joining a server that does not let you use the /tell command, the mod causes the client the forcibly disconnect due to a "Network Protocol Error.


[20:43:42] [Render thread/ERROR]: Failed to handle packet class_7439[content=translation{key='multiplayer.player.joined', args=[literal{Rei_the_Goat}[style={clickEvent=ClickEvent{action=SUGGEST_COMMAND, value='/tell Rei_the_Goat '},hoverEvent=class_8826[action=<action show_entity>, value=net.minecraft.class_2568$class_5248@e6f431b3],insertion=Rei_the_Goat}]]}[style={color=yellow}], overlay=false]
java.lang.NullPointerException: Cannot invoke "net.minecraft.class_746.method_6079()" because "this.client.field_1724" is null
    at troy.autofish.Autofish.getHeldItem(Autofish.java:268) ~[xplus-autofish-1.0.1-fabric-1.20.5.jar:?]
    at troy.autofish.Autofish.isHoldingFishingRod(Autofish.java:256) ~[xplus-autofish-1.0.1-fabric-1.20.5.jar:?]
    at troy.autofish.Autofish.handleChat(Autofish.java:118) ~[xplus-autofish-1.0.1-fabric-1.20.5.jar:?]
    at troy.autofish.FabricModAutofish.handleChat(FabricModAutofish.java:63) ~[xplus-autofish-1.0.1-fabric-1.20.5.jar:?]
    at net.minecraft.class_634.handler$zzb000$autofish$onChatMessage(class_634.java:3510) ~[client-intermediary.jar:?]
    at net.minecraft.class_634.method_43596(class_634.java) ~[client-intermediary.jar:?]
    at net.minecraft.class_7439.method_43631(class_7439.java:25) ~[client-intermediary.jar:?]
    at net.minecraft.class_7439.method_11054(class_7439.java:11) ~[client-intermediary.jar:?]
    at net.minecraft.class_2600.method_11072(class_2600.java:25) ~[client-intermediary.jar:?]
    at net.minecraft.class_1255.method_18859(class_1255.java:162) [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:136) [client-intermediary.jar:?]
    at net.minecraft.class_1255.method_5383(class_1255.java:121) [client-intermediary.jar:?]
    at net.minecraft.class_310.method_1523(class_310.java:1275) [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) [client-intermediary.jar:?]
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) [fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.15.11.jar:?]
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
    at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
    at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:243) [NewLaunch.jar:?]
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:278) [NewLaunch.jar:?]
    at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
    at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
[20:43:42] [Render thread/WARN]: Client disconnected with reason: Network Protocol Error
Wudji commented 6 months ago

It should be fixed in https://github.com/Wudji/XPlus-AutoFish/actions/runs/9096690252/artifacts/1505280120 . Would you please test this version to see if it functions properly?

reithegoat commented 6 months ago

Can confirm that it works.