Not Enough Animations

Not Enough Animations

50M Downloads

Client-sideness is not explictitly stated

ejm554 opened this issue ยท 2 comments

commented

Problem

Hi there. I revamped my modpack, which uses Not Enough Animations, and I hadn't noticed that it only works as client-side mod until my server refused to startup and I started researching the issue. Conversations, such as #63 explained why, but I was surprised that the "client-sideness" is not explicitly stated on the CurseForge Description page, nor the README on this repo. I was even a little mislead when I read that this mod is "fully vanilla/3rd party server compatible."

Suggestion

I suggest that you make an explicit statement on the above pages that Not Enough Animations is not a server-side mod and/or is only designed to run on a client.

FYI

Here's a copy of the relevant lines of my log, which I'm including here in case someone performs a search for some of the same error messages.

[15:07:42] [modloading-worker-0/ERROR] [ne.mi.fm.ja.FMLModContainer/LOADING]: Failed to create mod instance. ModID: notenoughanimations, class dev.tr7zw.notenoughanimations.NEAnimationsModForge
java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER

<snip>

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: main
Stacktrace:
at net.minecraftforge.fml.loading.RuntimeDistCleaner.processClassWithFlags(RuntimeDistCleaner.java:57) ~[fmlloader-1.18.2-40.1.70.jar%2317!/:1.0] {}
-- MOD notenoughanimations --
Details:
Mod File: /home/********/mods/notenoughanimations-forge-1.6.0-mc1.18.2.jar
Failure message: NotEnoughAnimations Mod (notenoughanimations) has failed to load correctly
java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER
Mod Version: 1.6.0
Mod Issue URL: https://github.com/tr7zw/NotEnoughAnimations/issues
Exception message: java.lang.RuntimeException: Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER
commented

that the "client-sideness" is not explicitly stated on the CurseForge Description page

grafik
grafik

It's the one mod where it's not explicitly stated(on curse, modrinth has that built-in), but from experience, people don't read that anyway. Under each of my mods I have Support via Discord or Github! The comments are not there to report bugs/crashes/get help., yet people ask questions or even post entire crash logs into the comments. On my other mods like EntityCulling I have it stated, but people still just copy paste the mods folder into the server and get crashes(tr7zw/EntityCulling#63).
The root issue is that people still use Forge. Forge removed "Client-sideness" from the mod definition, saying "all mods have to be able to launch on clients and servers without crashes", but then don't provide a way to do that without structuring the entire mod around that. I develop for Fabric, the Forge versions are a byproduct. Fabric has no issue with this, so this is just another design flaw of Forge, that people that insist on still using Forge have to live with.
I do try to catch the mod loading on servers (https://github.com/tr7zw/NotEnoughAnimations/blob/1.18/NEAForge/src/main/java/dev/tr7zw/notenoughanimations/NEAnimationsModForge.java#L15), but because I didn't structure the code base in a way that expects the class to load on a server, it still crashes.

commented

Did add the workaround.