Interface FluidRendering.DefaultRenderer
- Enclosing class:
FluidRendering
public static interface FluidRendering.DefaultRenderer
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
render
(FluidRenderHandler handler, BlockRenderView world, BlockPos pos, VertexConsumer vertexConsumer, BlockState blockState, FluidState fluidState) Render the default geometry when it is requested byFluidRenderHandler.renderFluid(net.minecraft.util.math.BlockPos, net.minecraft.world.BlockRenderView, net.minecraft.client.render.VertexConsumer, net.minecraft.block.BlockState, net.minecraft.fluid.FluidState)
.
-
Method Details
-
render
default void render(FluidRenderHandler handler, BlockRenderView world, BlockPos pos, VertexConsumer vertexConsumer, BlockState blockState, FluidState fluidState) Render the default geometry when it is requested byFluidRenderHandler.renderFluid(net.minecraft.util.math.BlockPos, net.minecraft.world.BlockRenderView, net.minecraft.client.render.VertexConsumer, net.minecraft.block.BlockState, net.minecraft.fluid.FluidState)
. The default implementation invokes the vanilla renderer. CallingFluidRenderer.render(net.minecraft.world.BlockRenderView, net.minecraft.util.math.BlockPos, net.minecraft.client.render.VertexConsumer, net.minecraft.block.BlockState, net.minecraft.fluid.FluidState)
directly is not supported but usingDefaultRenderer.super.render
is supported. Note that the parameter values passed to this call are provided by the render handler, meaning they are not necessarily the same as those provided to the initial rendering call. As per the documentation ofFluidRenderHandler.renderFluid(net.minecraft.util.math.BlockPos, net.minecraft.world.BlockRenderView, net.minecraft.client.render.VertexConsumer, net.minecraft.block.BlockState, net.minecraft.fluid.FluidState)
, a new handler should not be retrieved and only the passed one should be used.- Parameters:
handler
- the handler thatFluidRenderHandler.renderFluid(net.minecraft.util.math.BlockPos, net.minecraft.world.BlockRenderView, net.minecraft.client.render.VertexConsumer, net.minecraft.block.BlockState, net.minecraft.fluid.FluidState)
was invoked onworld
- the worldpos
- the posvertexConsumer
- the vertex consumerblockState
- the block statefluidState
- the fluid state
-