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[] pOutput, float pHeight) private floatcalculateAverageHeight(BlockAndTintGetter pLevel, Fluid pFluid, float pCurrentHeight, float pHeight1, float pHeight2, BlockPos pPos) private floatgetHeight(BlockAndTintGetter pLevel, Fluid pFluid, BlockPos pPos) private floatgetHeight(BlockAndTintGetter pLevel, Fluid pFluid, BlockPos pPos, BlockState pBlockState, FluidState pFluidState) private intgetLightColor(BlockAndTintGetter pLevel, BlockPos pPos) private static booleanisFaceOccludedByNeighbor(BlockGetter pLevel, BlockPos pPos, Direction pSide, float pHeight, BlockState pBlockState) private static booleanisFaceOccludedBySelf(BlockGetter pLevel, BlockPos pPos, BlockState pState, Direction pFace) private static booleanisFaceOccludedByState(BlockGetter pLevel, Direction pFace, float pHeight, BlockPos pPos, BlockState pState) private static booleanisNeighborSameFluid(FluidState pFirstState, FluidState pSecondState) 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 pLevel, BlockPos pPos, FluidState pFluidState, BlockState pBlockState, Direction pSide, FluidState pNeighborFluid) Deprecated.Neo: use overload that accepts BlockStatevoidtesselate(BlockAndTintGetter pLevel, BlockPos pPos, VertexConsumer pBuffer, BlockState pBlockState, FluidState pFluidState) 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 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
-