Class BlockModelRenderer
java.lang.Object
net.minecraft.client.render.block.BlockModelRenderer
@Environment(CLIENT) public class BlockModelRenderer extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
BlockModelRenderer.AmbientOcclusionCalculator
(package private) static class
BlockModelRenderer.BrightnessCache
static class
BlockModelRenderer.NeighborData
static class
BlockModelRenderer.NeighborOrientation
(package private) static class
BlockModelRenderer.Translation
-
Field Summary
Fields Modifier and Type Field Description private static ThreadLocal<BlockModelRenderer.BrightnessCache>
brightnessCache
private BlockColors
colorMap
-
Constructor Summary
Constructors Constructor Description BlockModelRenderer(BlockColors colorMap)
-
Method Summary
Modifier and Type Method Description static void
disableBrightnessCache()
static void
enableBrightnessCache()
private void
getQuadDimensions(BlockRenderView world, BlockState state, BlockPos pos, int[] vertexData, Direction face, float[] box, BitSet flags)
void
render(MatrixStack.Entry entry, VertexConsumer vertexConsumer, BlockState blockState, BakedModel bakedModel, float float2, float float3, float float4, int int2, int int3)
boolean
render(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack matrix, VertexConsumer vertexConsumer, boolean cull, Random random, long seed, int overlay)
boolean
renderFlat(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack buffer, VertexConsumer vertexConsumer, boolean cull, Random random, long long2, int int2)
private static void
renderQuad(MatrixStack.Entry entry, VertexConsumer vertexConsumer, float float2, float float3, float float4, List<BakedQuad> list, int int2, int int3)
private void
renderQuad(BlockRenderView world, BlockState state, BlockPos pos, VertexConsumer vertexConsumer, MatrixStack.Entry matrixEntry, BakedQuad quad, float brightness0, float brightness1, float brightness2, float brightness3, int light0, int light1, int light2, int light3, int overlay)
private void
renderQuadsFlat(BlockRenderView world, BlockState state, BlockPos pos, int light, int overlay, boolean useWorldLight, MatrixStack matrices, VertexConsumer vertexConsumer, List<BakedQuad> quads, BitSet flags)
private void
renderQuadsSmooth(BlockRenderView world, BlockState state, BlockPos pos, MatrixStack matrix, VertexConsumer vertexConsumer, List<BakedQuad> quads, float[] box, BitSet flags, BlockModelRenderer.AmbientOcclusionCalculator ambientOcclusionCalculator, int overlay)
boolean
renderSmooth(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack buffer, VertexConsumer vertexConsumer, boolean cull, Random random, long seed, int overlay)
-
Field Details
-
brightnessCache
-
colorMap
-
-
Constructor Details
-
BlockModelRenderer
-
-
Method Details
-
render
public boolean render(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack matrix, VertexConsumer vertexConsumer, boolean cull, Random random, long seed, int overlay) -
renderSmooth
public boolean renderSmooth(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack buffer, VertexConsumer vertexConsumer, boolean cull, Random random, long seed, int overlay) -
renderFlat
public boolean renderFlat(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack buffer, VertexConsumer vertexConsumer, boolean cull, Random random, long long2, int int2) -
renderQuadsSmooth
private void renderQuadsSmooth(BlockRenderView world, BlockState state, BlockPos pos, MatrixStack matrix, VertexConsumer vertexConsumer, List<BakedQuad> quads, float[] box, BitSet flags, BlockModelRenderer.AmbientOcclusionCalculator ambientOcclusionCalculator, int overlay) -
renderQuad
private void renderQuad(BlockRenderView world, BlockState state, BlockPos pos, VertexConsumer vertexConsumer, MatrixStack.Entry matrixEntry, BakedQuad quad, float brightness0, float brightness1, float brightness2, float brightness3, int light0, int light1, int light2, int light3, int overlay) -
getQuadDimensions
private void getQuadDimensions(BlockRenderView world, BlockState state, BlockPos pos, int[] vertexData, Direction face, @Nullable float[] box, BitSet flags) -
renderQuadsFlat
private void renderQuadsFlat(BlockRenderView world, BlockState state, BlockPos pos, int light, int overlay, boolean useWorldLight, MatrixStack matrices, VertexConsumer vertexConsumer, List<BakedQuad> quads, BitSet flags) -
render
public void render(MatrixStack.Entry entry, VertexConsumer vertexConsumer, @Nullable BlockState blockState, BakedModel bakedModel, float float2, float float3, float float4, int int2, int int3) -
renderQuad
private static void renderQuad(MatrixStack.Entry entry, VertexConsumer vertexConsumer, float float2, float float3, float float4, List<BakedQuad> list, int int2, int int3) -
enableBrightnessCache
public static void enableBrightnessCache() -
disableBrightnessCache
public static void disableBrightnessCache()
-