Tech Reborn

Tech Reborn

30M Downloads

"FluidRenderHandlerRegistry.INSTANCE.get is explicitly @Nullable but TechReborn is not checking for null"

SubordinalBlue opened this issue · 2 comments

commented

Title comes from Balm dev, in response to issue first filed there: TwelveIterationMods/Balm#94

Describe the bug
In AoF7, render crash upon REI listing TR cell containing balm-fabric:milk.

Steps to Reproduce
Steps to reproduce the behavior:

  • Run latest AoF7 (2.5.0)
  • Open REI to, or search for, TR cells—specifically the one containing balm-fabric:milk.

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

  • MC 1.20.1
  • Fabric 0.16

Logs
Log is included in issue on Balm linked at top of this report.

commented

issue seen on 1.20.1 with Balm and Cooking For Blockheads (CfB enables milk fluid which does not have a Fluid Render Handler registered with FAPI).
Likely still an issue in 1.21 as it throws a NPE via Objects.requireNonNull on a @Nullable method return

FluidRenderHandler fluidRenderHandler = Objects.requireNonNull(FluidRenderHandlerRegistry.INSTANCE.get(fluid));

Instead, it might be worth it to use FluidVariantRenderHandler.getColor and getSprites

commented

(little note here since this was last week)
Balm fixes their end by registering a render handler, though this seems to still crash