Class FluidRendering
java.lang.Object
net.fabricmc.fabric.api.client.render.fluid.v1.FluidRendering
A class containing some utilities for rendering fluids.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
render
(FluidRenderHandler handler, BlockRenderView world, BlockPos pos, VertexConsumer vertexConsumer, BlockState blockState, FluidState fluidState, FluidRendering.DefaultRenderer defaultRenderer) Renders a fluid using the given handler, default renderer, and context.
-
Method Details
-
render
public static void render(FluidRenderHandler handler, BlockRenderView world, BlockPos pos, VertexConsumer vertexConsumer, BlockState blockState, FluidState fluidState, FluidRendering.DefaultRenderer defaultRenderer) Renders a fluid using the given handler, default renderer, and context. Internally, this just invokesFluidRenderHandler.renderFluid(net.minecraft.util.math.BlockPos, net.minecraft.world.BlockRenderView, net.minecraft.client.render.VertexConsumer, net.minecraft.block.BlockState, net.minecraft.fluid.FluidState)
, but the passed default renderer is invoked instead of the vanilla renderer whenever the handler requests default geometry to be rendered.- Parameters:
handler
- the render handler to invokeFluidRenderHandler.renderFluid(net.minecraft.util.math.BlockPos, net.minecraft.world.BlockRenderView, net.minecraft.client.render.VertexConsumer, net.minecraft.block.BlockState, net.minecraft.fluid.FluidState)
onworld
- the worldpos
- the posvertexConsumer
- the vertex consumerblockState
- the block statefluidState
- the fluid statedefaultRenderer
- the renderer to use whenever the handler requests default geometry
-