thecatcore / Fabric---Discord-Link

MIT License
75 stars 31 forks source link

[BUG] Text cannot be cast to TranslatableText #85

Closed PhoenixVX closed 4 years ago

PhoenixVX commented 4 years ago

Hello! I was recently helping a person out on the Fabricord support channel and i noticed a weird ClassCastException that crashed their server. When the intermediary is translated, it ends up to be an error with Text being casted to TranslatableText in the method handleTexts in the file MinecraftToDiscordHandler. Here's the error log:

---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.

Time: 7/11/20 4:58 PM
Description: Exception in server tick loop

java.lang.ClassCastException: net.minecraft.class_2585 cannot be cast to net.minecraft.class_2588
    at fr.arthurbambou.fdlink.discordstuff.todiscord.MinecraftToDiscordHandler.handleTexts(MinecraftToDiscordHandler.java:188)
    at fr.arthurbambou.fdlink.discordstuff.DiscordBot.sendMessage(DiscordBot.java:165)
    at net.minecraft.server.MinecraftServer.handler$zoi000$sendMessage(MinecraftServer.java:4698)
    at net.minecraft.server.MinecraftServer.method_9203(MinecraftServer.java:987)
    at net.minecraft.class_2168.method_9213(class_2168.java:237)
    at net.minecraft.class_2170.method_9249(class_2170.java:265)
    at net.minecraft.class_3176.method_13941(class_3176.java:334)
    at net.minecraft.class_3176.method_3813(class_3176.java:307)
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:813)
    at net.minecraft.server.MinecraftServer.handler$zio000$modifiedRunLoop(MinecraftServer.java:3796)
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:653)
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:256)
    at java.lang.Thread.run(Thread.java:748)

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
    Minecraft Version: 1.16.1
    Minecraft Version ID: 1.16.1
    Operating System: Linux (amd64) version 5.4.0-28-generic
    Java Version: 1.8.0_252, Private Build
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Private Build
    Memory: 4221595616 bytes (4026 MB) / 9737076736 bytes (9286 MB) up to 11453595648 bytes (10923 MB)
    CPUs: 16
    JVM Flags: 1 total; -Xmx12G
    Fabric Mods: 
        carpet: Carpet Mod in Fabric 1.4.0
        carpet-extra: Carpet Extra 1.4.0
        com_fasterxml_jackson_core_jackson-annotations: jackson-annotations 2.9.0
        com_fasterxml_jackson_core_jackson-core: jackson-core 2.9.3
        com_fasterxml_jackson_core_jackson-databind: jackson-databind 2.9.3
        com_neovisionaries_nv-websocket-client: nv-websocket-client 2.6
        com_squareup_okhttp3_logging-interceptor: logging-interceptor 3.9.1
        com_squareup_okhttp3_okhttp: okhttp 3.9.1
        com_squareup_okio_okio: okio 1.13.0
        com_vdurmont_emoji-java: emoji-java 5.1.1
        fabric: Fabric API 0.13.1+build.370-1.16
        fabric-api-base: Fabric API Base 0.1.3+12a8474c7c
        fabric-biomes-v1: Fabric Biomes (v1) 0.2.7+059ea8667c
        fabric-command-api-v1: Fabric Command API (v1) 1.0.8+5ce533987c
        fabric-commands-v0: Fabric Commands (v0) 0.2.0+52d308367c
        fabric-containers-v0: Fabric Containers (v0) 0.1.8+045df74f7c
        fabric-content-registries-v0: Fabric Content Registries (v0) 0.1.9+059ea8667c
        fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.2+b7f9825d7c
        fabric-dimensions-v1: fabric-dimensions-v1 1.0.0+a71b30537c
        fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.3.3+7066030f7c
        fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.1.3+0d474ec47c
        fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.0+438f96367c
        fabric-loot-tables-v1: Fabric Loot Tables (v1) 0.1.10+059ea8667c
        fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.2+b764ce997c
        fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.5+b50ffc7b7c
        fabric-networking-v0: Fabric Networking (v0) 0.1.10+e00ecb5f7c
        fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.5.5+e00ecb5f7c
        fabric-object-builders-v0: Fabric Object Builders (v0) 0.6.0+da175ad67c
        fabric-particles-v1: fabric-particles-v1 0.2.1+0a6f2a707c
        fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.3.8+7dba2d6c7c
        fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.3+b7f9825d7c
        fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.2.5+059ea8667c
        fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.0.1+f362c86e7c
        fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 0.2.5+5a6e8f4c7c
        fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.1.4+5794386e7c
        fabricloader: Fabric Loader 0.8.8+build.202
        fdlink: Fabric <-> Discord Link 0.4.1
        lithium: Lithium 0.5.0-rc1
        minecraft: Minecraft 1.16.1
        org_apache_logging_log4j_log4j-api: log4j-api 2.11.0
        org_javacord_javacord-api: javacord-api 3.0.6
        org_javacord_javacord-core: javacord-core 3.0.6
        org_json_json: json 20170516
        phosphor: Phosphor 0.6.0+build.7
        sampler: Sampler 1.92
        trampoline: Trampoline 1.0.0
    Player Count: 15 / 100; [EntityPlayerMPFake['Goldfarm'/220, l='ServerLevel[world]', x=20550.50, y=202.00, z=67430.50], EntityPlayerMPFake['WitchFarm'/1178, l='ServerLevel[world]', x=40547.50, y=183.00, z=758517.50], class_3222['Awesomistika'/297378, l='ServerLevel[world]', x=34913.95, y=68.00, z=132560.09], class_3222['FoxyExtrovert'/176548, l='ServerLevel[world]', x=152061.33, y=66.50, z=461724.04], class_3222['AnonymouSylveon'/379625, l='ServerLevel[world]', x=17296.69, y=39.00, z=1117881.74], class_3222['DolphieMelon'/400291, l='ServerLevel[world]', x=25.87, y=65.00, z=0.53], class_3222['keysinja'/421273, l='ServerLevel[world]', x=17209.48, y=64.00, z=1117907.81], class_3222['DasMeAyy'/407440, l='ServerLevel[world]', x=262895.88, y=74.00, z=374041.28], class_3222['TheManInARedCoat'/428190, l='ServerLevel[world]', x=6081.75, y=58.00, z=36888.02], class_3222['FoxyIntrovert'/45054, l='ServerLevel[world]', x=152118.13, y=74.00, z=461755.70], class_3222['ChristianDogDude'/437658, l='ServerLevel[world]', x=120044.70, y=47.00, z=49339.30], class_3222['Morkk95'/444567, l='ServerLevel[world]', x=14.76, y=65.00, z=-0.35], class_3222['B1ACKJACK3T'/176592, l='ServerLevel[world]', x=-63182.81, y=36.00, z=110703.91], class_3222['KidKongN'/457922, l='ServerLevel[world]', x=-12781.81, y=50.00, z=74583.48], class_3222['AlexAit'/460736, l='ServerLevel[world]', x=17.50, y=65.00, z=0.58]]
    Data Packs: vanilla, file/multiplayer sleep v1.0.1.zip (incompatible), file/player head drops v1.0.0.zip (incompatible), file/silence mobs v1.0.0.zip (incompatible), file/treecapitator-1.16 (incompatible), fabric/fabric-tool-attribute-api-v1, file/armour statues v2.6.2.zip, file/dragon drops v1.2.0.zip (incompatible), file/more mob heads v2.4.1.zip (incompatible), file/more_useful_husks (incompatible), file/anti ghast grief v1.0.0.zip (incompatible), file/anti enderman grief v1.0.0.zip (incompatible), file/templex, file/platypack_1.6.zip
    Is Modded: Definitely; Server brand changed to 'fabric'
    Type: Dedicated Server (map_server.txt)
I'm sorry if this is incorrect or if this is already an issue.
PhoenixVX commented 4 years ago

Sorry about this, i just noticed #77 was the exact same error and version. Closing this issue and telling the person.