Sinytra Connector

Sinytra Connector

12M Downloads

[1.21.1] Crash on dedicated server caused by classloading of client-only class when fabric mod registers a custom fluid.

Builderb0y opened this issue ยท 3 comments

commented

FluidHandlerCompat.initFabricFluidTypes() calls into ForgifiedFabricAPI's FluidRenderHandlerRegistry, whose implementation loads WaterRenderHandler, which has a field of type TextureAtlasSprite[]. Since TextureAtlasSprite is a client-only class, this crashes on dedicated servers. This issue was reported to me here with this stack trace.

If it's relevant, my fluid registration code can be found here.

commented

Same here on 1.21.1

We are currently on the Modfest event, coding a simple Mod on Fabric to use on NeoForge.
Our mod, FBombs, makes use of a basic fluid. This specifically seemed to let dedicated server environments not boot anymore since its trying to access client only sided code.

FBombs (Fabric 1.21.1):

fluid class | fluid registration class

In Fabric launches and renders fluid just fine, even on dedicated server environments

Server's latest log:

latest.log

Installed are:

  • connector-2.0.0-beta.3+1.21.1-full
  • fbombs-1.2.0+1.21
  • forgified-fabric-api-0.104.0+2.0.18+1.21.1
commented

Also if im reading the logs right, it has the same issue with...

  • net/minecraft/client/gui/screens/Screen
  • net/minecraft/client/RecipeBookCategories
  • net/minecraft/client/renderer/ItemBlockRenderTypes

... where it's attempting to load those classes on the dedicated Server environment. For us, the error of not being able to boot the server environment, only appeared starting with the new implementation of the basic fluid, tho.

commented

Fixed in 2.0.0-beta.4+1.21.1