Game crash trying to display water buckets
CodeeToasty opened this issue ยท 2 comments
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
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:
and here