Interface CustomFluidRenderer


public interface CustomFluidRenderer
  • Method Details

    • renderFluid

      boolean renderFluid(FluidRenderer fluidRenderer, FluidState fluidState, BlockAndTintGetter getter, BlockPos pos, FluidRenderer.Output output, BlockState blockState)

      Called to allow rendering custom quads for a fluid during chunk meshing. You may replace the fluid rendering entirely, or return false to allow vanilla's fluid rendering to also run.

      Note: this method will be called once for every fluid block during chunk meshing, so any logic here needs to be performant.

      Parameters:
      fluidRenderer - the vanilla fluid renderer
      fluidState - the state of the fluid
      getter - the getter the fluid can be obtained from
      pos - the position of the fluid
      output - the FluidRenderer.Output to get vertex consumers from
      blockState - the blockstate at the position of the fluid
      Returns:
      true if vanilla fluid rendering should be skipped