MaxNeedsSnacks / roadrunner

A general-purpose performance mod and fork of the popular "Lithium" mod made for the Forge mod loader.
GNU Lesser General Public License v3.0
24 stars 5 forks source link

Small mixin error in 1.16.5 #60

Closed Speiger closed 2 years ago

Speiger commented 2 years ago

When installing roadrunner on a server this error shows up. Its only a log no crash but it should maybe be addressed.

[16:01:29] [main/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/renderer/texture/TextureAtlasSprite for invalid dist DEDICATED_SERVER [16:01:29] [main/FATAL] [ne.mi.fm.lo.RuntimeDistCleaner/DISTXFORM]: Attempted to load class net/minecraft/client/renderer/texture/TextureAtlasSprite for invalid dist DEDICATED_SERVER

Only issue i found so far with roadrunner. Loving the mod FYI.

CamIsHereRN commented 2 years ago

Same thing happens for a server that I'm on too. No crash log, but server doesn't start up.

image

The file that I am looking at is a debug.log file, so there's a bit more after that.

image image

There is more, but it's pretty much almost all Dynamic Trees, or compat with other mods such as Quark and Oh the Biomes You'll Go.

CamIsHereRN commented 2 years ago

The Server isn't running Vanilla, so there might be some differences. The server does not start up.

Speiger commented 2 years ago

Yeah mine isn't crashing. But the solution is fairly simple, just move said mixin to the client only section

MaxNeedsSnacks commented 2 years ago

just move said mixin to the client only section

The thing is, this mixin isn't related to any client-side code, if you look at the Logger, it's related to AI PathNodes.

The "issue" here is that we need to check whether a specific method from IForgeBlock has been overridden in a given subclass, which doesn't seem to be possible without looking at all of the declared methods (even getDeclaredMethod loads all of them before trying to find the one you're looking for), and that causes lookups of certain client-only classes through methods that involve, say, rendering code.

Forge does strip client-only code at runtime using ASM, however from what I can tell it only does so to methods explicitly annotated with @​OnlyIn, and doesn't remove the overrides of such methods (though that said I haven't really focused on this issue for a couple of months so my information may be off here). As using @​OnlyIn within mods is something Forge explicitly does not want you to do, we can't really fault the modders here either, and have chosen to just accept this as "broken" and not override any behaviour if we do encounter this sort of error.

Also, we explicitly catch these errors so that crash is definitely not related to RR, or at least, not related at all to the "error" messages you sent