@Environment(value=CLIENT) public class FluidRenderer extends Object
Modifier and Type | Field and Description |
---|---|
private Sprite[] |
lavaSprites |
private Sprite |
waterOverlaySprite |
private Sprite[] |
waterSprites |
Constructor and Description |
---|
FluidRenderer() |
Modifier and Type | Method and Description |
---|---|
private int |
getLight(BlockRenderView world,
BlockPos pos) |
private float |
getNorthWestCornerFluidHeight(BlockView world,
BlockPos pos,
Fluid fluid) |
private static boolean |
isSameFluid(BlockView world,
BlockPos pos,
Direction side,
FluidState state) |
private static boolean |
isSideCovered(BlockView world,
BlockPos pos,
Direction direction,
float maxDeviation) |
protected void |
onResourceReload() |
boolean |
render(BlockRenderView world,
BlockPos pos,
VertexConsumer vertexConsumer,
FluidState state) |
private void |
vertex(VertexConsumer vertexConsumer,
double x,
double y,
double z,
float red,
float green,
float blue,
float u,
float v,
int light) |
private final Sprite[] lavaSprites
private final Sprite[] waterSprites
private Sprite waterOverlaySprite
protected void onResourceReload()
private static boolean isSameFluid(BlockView world, BlockPos pos, Direction side, FluidState state)
private static boolean isSideCovered(BlockView world, BlockPos pos, Direction direction, float maxDeviation)
public boolean render(BlockRenderView world, BlockPos pos, VertexConsumer vertexConsumer, FluidState state)
private void vertex(VertexConsumer vertexConsumer, double x, double y, double z, float red, float green, float blue, float u, float v, int light)
private int getLight(BlockRenderView world, BlockPos pos)