Class LiquidBlockRenderer
java.lang.Object
net.minecraft.client.renderer.block.LiquidBlockRenderer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TextureAtlasSprite[]private static final floatprivate final TextureAtlasSprite[]private TextureAtlasSprite -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddWeightedHeight(float[] output, float height) private floatcalculateAverageHeight(BlockAndTintGetter level, Fluid fluid, float currentHeight, float height1, float height2, BlockPos pos) private floatgetHeight(BlockAndTintGetter level, Fluid fluid, BlockPos pos) private floatgetHeight(BlockAndTintGetter level, Fluid fluid, BlockPos pos, BlockState blockState, FluidState fluidState) private intgetLightColor(BlockAndTintGetter level, BlockPos pos) private static booleanisFaceOccludedByNeighbor(BlockGetter level, BlockPos pos, Direction side, float height, BlockState blockState) private static booleanisFaceOccludedBySelf(BlockGetter level, BlockPos pos, BlockState state, Direction face) private static booleanisFaceOccludedByState(BlockGetter level, Direction face, float height, BlockPos pos, BlockState state) private static booleanisNeighborSameFluid(FluidState firstState, FluidState secondState) private static booleanisNeighborStateHidingOverlay(FluidState selfState, BlockState otherState, Direction neighborFace) protected voidstatic booleanshouldRenderFace(BlockAndTintGetter level, BlockPos pos, FluidState fluidState, BlockState selfState, Direction direction, BlockState otherState) static booleanshouldRenderFace(BlockAndTintGetter level, BlockPos pos, FluidState fluidState, BlockState blockState, Direction side, FluidState neighborFluid) Deprecated.Neo: use overload that accepts BlockStatevoidtesselate(BlockAndTintGetter level, BlockPos pos, VertexConsumer buffer, BlockState blockState, FluidState fluidState) private voidvertex(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 voidvertex(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
-