Tech Reborn

Tech Reborn

30M Downloads

Game crash trying to display water buckets

CodeeToasty opened this issue ยท 2 comments

commented

The game crashes when trying to display my water bucket.
The crash happens with ColWater (a mod of mine).

Step to reproduce:

  • install TechReborn, ColWater and fabricAPI
  • run minecraft
  • search for dyeable water bucket in creative

Environment (please complete the following information with the version):

  • Minecraft: 1.16.5
  • Mod Loader: fabric 0.11.3

Error Log:
https://pastebin.com/BmKQ4QY4

Additional Context:
I'm developing colWater and it works fine on its own, i'm clueless about what i could've done wrong to make it crash with techreborn (pretty new to minecraft modding).
Even if i'm pretty sure it's my mod i posted here since its techreborn that throws the error, maybe i can get an hint on what to do from someone more skilled :)

edited since i discovered that RoughlyEnoughItems has nothing to do with this crash

commented

This seems like a bug with TR and your mod.

TR expects all fluids to be registered with Fabric's FluidRenderHandler API to get the fluid color and sprites.

It is crashing on this line here: https://github.com/TechReborn/TechReborn/blob/1.16/src/main/java/techreborn/client/render/BaseDynamicFluidBakedModel.java#L81 as FluidRenderHandlerRegistry.INSTANCE.get(fluid) has returned null for your fluid.

The fix is 2 fold:

  • TR should check that the fluid is registered with this API, and log a nice warning message if not.
  • Your mod should impliment the fabric api. Take a look at the rendering section of the wiki page: https://fabricmc.net/wiki/tutorial:fluids or the documentaion on said api here:

https://github.com/FabricMC/fabric/blob/1.17/fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/api/client/render/fluid/v1/FluidRenderHandlerRegistry.java

and here

https://github.com/FabricMC/fabric/blob/74330c9e995597fd0b7f9ae089f1fb3173672fa4/fabric-rendering-fluids-v1/src/main/java/net/fabricmc/fabric/api/client/render/fluid/v1/FluidRenderHandler.java#L29

commented

Thank you so much for the reply, as soon as i posted the issue i realized i forgot the renderer for one of my fluids!
already fixed and i works perfectly, thank you!