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[] pOutput, float pHeight) private float
calculateAverageHeight
(BlockAndTintGetter pLevel, Fluid pFluid, float pCurrentHeight, float pHeight1, float pHeight2, BlockPos pPos) private float
getHeight
(BlockAndTintGetter pLevel, Fluid pFluid, BlockPos pPos) private float
getHeight
(BlockAndTintGetter pLevel, Fluid pFluid, BlockPos pPos, BlockState pBlockState, FluidState pFluidState) private int
getLightColor
(BlockAndTintGetter pLevel, BlockPos pPos) private static boolean
isFaceOccludedByNeighbor
(BlockGetter pLevel, BlockPos pPos, Direction pSide, float pHeight, BlockState pBlockState) private static boolean
isFaceOccludedBySelf
(BlockGetter pLevel, BlockPos pPos, BlockState pState, Direction pFace) private static boolean
isFaceOccludedByState
(BlockGetter pLevel, Direction pFace, float pHeight, BlockPos pPos, BlockState pState) private static boolean
isNeighborSameFluid
(FluidState pFirstState, FluidState pSecondState) 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 pLevel, BlockPos pPos, FluidState pFluidState, BlockState pBlockState, Direction pSide, FluidState pNeighborFluid) Deprecated.Neo: use overload that accepts BlockStatevoid
tesselate
(BlockAndTintGetter pLevel, BlockPos pPos, VertexConsumer pBuffer, BlockState pBlockState, FluidState pFluidState) 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 pBuffer, float pX, float pY, float pZ, float pRed, float pGreen, float pBlue, float pU, float pV, int pPackedLight)
-
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 pLevel, Direction pFace, float pHeight, BlockPos pPos, BlockState pState) -
isFaceOccludedByNeighbor
private static boolean isFaceOccludedByNeighbor(BlockGetter pLevel, BlockPos pPos, Direction pSide, float pHeight, BlockState pBlockState) -
isFaceOccludedBySelf
private static boolean isFaceOccludedBySelf(BlockGetter pLevel, BlockPos pPos, BlockState pState, Direction pFace) -
shouldRenderFace
public static boolean shouldRenderFace(BlockAndTintGetter pLevel, BlockPos pPos, FluidState pFluidState, BlockState pBlockState, Direction pSide, FluidState pNeighborFluid) 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 pLevel, BlockPos pPos, VertexConsumer pBuffer, BlockState pBlockState, FluidState pFluidState) -
calculateAverageHeight
private float calculateAverageHeight(BlockAndTintGetter pLevel, Fluid pFluid, float pCurrentHeight, float pHeight1, float pHeight2, BlockPos pPos) -
addWeightedHeight
private void addWeightedHeight(float[] pOutput, float pHeight) -
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 pLevel, Fluid pFluid, BlockPos pPos, BlockState pBlockState, FluidState pFluidState) -
vertex
private void vertex(VertexConsumer pBuffer, float pX, float pY, float pZ, float pRed, float pGreen, float pBlue, float pU, float pV, int pPackedLight) -
getLightColor
-