thecatcore / Fabric---Discord-Link

MIT License
75 stars 31 forks source link

server crash on getting advancement #100

Closed Azahliil closed 4 years ago

Azahliil commented 4 years ago

Since updating to 1.16.2 and FDLink 0.6.0 our server crashes anytime someone gets an advancement, if the gamerule announceAdvancements is true.

The console output when it happens:

Server thread/INFO 10:46:08
Azahliil has made the advancement [Diamonds!]
Server thread/ERROR 10:46:08
Encountered an unexpected exception
Console 10:46:08
net.minecraft.class_148: Ticking entity
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:872) ~[intermediary-server.jar:?]
at net.minecraft.class_3176.method_3813(class_3176.java:303) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:808) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.handler$zdb000$modifiedRunLoop(MinecraftServer.java:3297) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:648) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:254) ~[intermediary-server.jar:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.ClassCastException: class net.minecraft.class_2588 cannot be cast to class net.minecraft.class_2585 (net.minecraft.class_2588 and net.minecraft.class_2585 are in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @54422e18)
at fr.arthurbambou.fdlink.discordstuff.todiscord.MinecraftToDiscordHandler.lambda$new$4(MinecraftToDiscordHandler.java:123) ~[e0aad90e-3d8d-44d3-9b59-5922b109a62b.jar:?]
at fr.arthurbambou.fdlink.discordstuff.todiscord.MinecraftToDiscordHandler$TextHandler.handle(MinecraftToDiscordHandler.java:303) ~[e0aad90e-3d8d-44d3-9b59-5922b109a62b.jar:?]
at fr.arthurbambou.fdlink.discordstuff.todiscord.MinecraftToDiscordHandler.handleTexts(MinecraftToDiscordHandler.java:266) ~[e0aad90e-3d8d-44d3-9b59-5922b109a62b.jar:?]
at fr.arthurbambou.fdlink.discordstuff.DiscordBot.sendMessage(DiscordBot.java:201) ~[e0aad90e-3d8d-44d3-9b59-5922b109a62b.jar:?]
at net.minecraft.server.MinecraftServer.handler$zbi000$sendMessage(MinecraftServer.java:2199) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_9203(MinecraftServer.java:982) ~[intermediary-server.jar:?]
at net.minecraft.class_3324.method_14616(class_3324.java:810) ~[intermediary-server.jar:?]
at net.minecraft.class_2985.method_12878(class_2985.java:209) ~[intermediary-server.jar:?]
at net.minecraft.class_179$class_180.method_796(class_179.java:35) ~[intermediary-server.jar:?]
at net.minecraft.class_4558.method_22510(class_4558.java:72) ~[intermediary-server.jar:?]
at net.minecraft.class_2066.method_24362(class_2066.java:54) ~[intermediary-server.jar:?]
at net.minecraft.class_2066.method_8950(class_2066.java:50) ~[intermediary-server.jar:?]
at net.minecraft.class_3222.method_7635(class_3222.java:1007) ~[intermediary-server.jar:?]
at net.minecraft.class_1703.method_7623(class_1703.java:133) ~[intermediary-server.jar:?]
at net.minecraft.class_3222.method_5773(class_3222.java:379) ~[intermediary-server.jar:?]
at net.minecraft.class_3218.method_18762(class_3218.java:616) ~[intermediary-server.jar:?]
at net.minecraft.class_1937.method_18472(class_1937.java:561) ~[intermediary-server.jar:?]
at net.minecraft.class_3218.method_18765(class_3218.java:406) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:868) ~[intermediary-server.jar:?]
... 6 more
Server thread/ERROR 10:46:08
This crash report has been saved to: /home/amp/.ampdata/instances/Server/Minecraft/./crash-reports/crash-2020-08-15_10.46.08-server.txt
Server thread/INFO 10:46:08
Stopping server
Saving players

And heres the crash report: https://pastebin.com/ufg841cx

Thanks in advance for your time :3

MightyKnight commented 4 years ago

Something definitely changed between versions. This issue is basically the same as #98, but the other way around. So in 1.16.1 we need to cast to LiteralText, but in 1.16.2 to TranslatableText, otherwise crash.

I wonder if just casting to general Text is a proper solution?

thecatcore commented 4 years ago

I'm working looking it rn.

thecatcore commented 4 years ago

Use this version: https://www.curseforge.com/minecraft/mc-mods/fabric-discord-link/files/3033061

Azahliil commented 4 years ago

Thank you so much yet again!

The support you guys give is just amazing, which makes using this awesome mod even more awesome! <3