Class LiquidBlockRenderer
java.lang.Object
net.minecraft.client.renderer.block.LiquidBlockRenderer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TextureAtlasSprite[]
private static final float
private final TextureAtlasSprite[]
private TextureAtlasSprite
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addWeightedHeight
(float[] output, float height) private float
calculateAverageHeight
(BlockAndTintGetter level, Fluid fluid, float currentHeight, float height1, float height2, BlockPos pos) private float
getHeight
(BlockAndTintGetter level, Fluid fluid, BlockPos pos) private float
getHeight
(BlockAndTintGetter level, Fluid fluid, BlockPos pos, BlockState blockState, FluidState fluidState) private int
getLightColor
(BlockAndTintGetter level, BlockPos pos) private static boolean
isFaceOccludedByNeighbor
(BlockGetter level, BlockPos pos, Direction side, float height, BlockState blockState) private static boolean
isFaceOccludedBySelf
(BlockGetter level, BlockPos pos, BlockState state, Direction face) private static boolean
isFaceOccludedByState
(BlockGetter level, Direction face, float height, BlockPos pos, BlockState state) private static boolean
isNeighborSameFluid
(FluidState firstState, FluidState secondState) private static boolean
isNeighborStateHidingOverlay
(FluidState selfState, BlockState otherState, Direction neighborFace) protected void
static boolean
shouldRenderFace
(BlockAndTintGetter level, BlockPos pos, FluidState fluidState, BlockState selfState, Direction direction, BlockState otherState) static boolean
shouldRenderFace
(BlockAndTintGetter level, BlockPos pos, FluidState fluidState, BlockState blockState, Direction side, FluidState neighborFluid) Deprecated.Neo: use overload that accepts BlockStatevoid
tesselate
(BlockAndTintGetter level, BlockPos pos, VertexConsumer buffer, BlockState blockState, FluidState fluidState) private void
vertex
(VertexConsumer p_110985_, float p_110989_, float p_110990_, float p_110991_, float p_110992_, float p_110993_, float p_350595_, float alpha, float p_350459_, float p_350437_, int p_110994_) private void
vertex
(VertexConsumer buffer, float x, float y, float z, float red, float green, float blue, float u, float v, int packedLight)
-
Field Details
-
MAX_FLUID_HEIGHT
private static final float MAX_FLUID_HEIGHT- See Also:
-
lavaIcons
-
waterIcons
-
waterOverlay
-
-
Constructor Details
-
LiquidBlockRenderer
public LiquidBlockRenderer()
-
-
Method Details
-
setupSprites
protected void setupSprites() -
isNeighborSameFluid
-
isNeighborStateHidingOverlay
private static boolean isNeighborStateHidingOverlay(FluidState selfState, BlockState otherState, Direction neighborFace) -
isFaceOccludedByState
private static boolean isFaceOccludedByState(BlockGetter level, Direction face, float height, BlockPos pos, BlockState state) -
isFaceOccludedByNeighbor
private static boolean isFaceOccludedByNeighbor(BlockGetter level, BlockPos pos, Direction side, float height, BlockState blockState) -
isFaceOccludedBySelf
private static boolean isFaceOccludedBySelf(BlockGetter level, BlockPos pos, BlockState state, Direction face) -
shouldRenderFace
public static boolean shouldRenderFace(BlockAndTintGetter level, BlockPos pos, FluidState fluidState, BlockState blockState, Direction side, FluidState neighborFluid) Deprecated.Neo: use overload that accepts BlockState -
shouldRenderFace
public static boolean shouldRenderFace(BlockAndTintGetter level, BlockPos pos, FluidState fluidState, BlockState selfState, Direction direction, BlockState otherState) -
tesselate
public void tesselate(BlockAndTintGetter level, BlockPos pos, VertexConsumer buffer, BlockState blockState, FluidState fluidState) -
calculateAverageHeight
private float calculateAverageHeight(BlockAndTintGetter level, Fluid fluid, float currentHeight, float height1, float height2, BlockPos pos) -
addWeightedHeight
private void addWeightedHeight(float[] output, float height) -
getHeight
-
vertex
private void vertex(VertexConsumer p_110985_, float p_110989_, float p_110990_, float p_110991_, float p_110992_, float p_110993_, float p_350595_, float alpha, float p_350459_, float p_350437_, int p_110994_) -
getHeight
private float getHeight(BlockAndTintGetter level, Fluid fluid, BlockPos pos, BlockState blockState, FluidState fluidState) -
vertex
private void vertex(VertexConsumer buffer, float x, float y, float z, float red, float green, float blue, float u, float v, int packedLight) -
getLightColor
-