Interface CustomFluidRenderer
public interface CustomFluidRenderer
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrenderFluid(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.
-
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 rendererfluidState- the state of the fluidgetter- the getter the fluid can be obtained frompos- the position of the fluidoutput- theFluidRenderer.Outputto get vertex consumers fromblockState- the blockstate at the position of the fluid- Returns:
- true if vanilla fluid rendering should be skipped
-