@Environment(value=CLIENT) public class BlockModelRenderer extends Object
Modifier and Type | Class and 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 |
Modifier and Type | Field and Description |
---|---|
private static ThreadLocal<BlockModelRenderer.BrightnessCache> |
brightnessCache |
private BlockColors |
colorMap |
Constructor and Description |
---|
BlockModelRenderer(BlockColors colorMap) |
Modifier and Type | Method and Description |
---|---|
static void |
disableBrightnessCache() |
static void |
enableBrightnessCache() |
private void |
getQuadDimensions(BlockRenderView world,
BlockState state,
BlockPos pos,
int[] vertexData,
Direction face,
float[] box,
BitSet flags) |
boolean |
render(BlockRenderView world,
BakedModel model,
BlockState state,
BlockPos pos,
MatrixStack matrix,
VertexConsumer vertexConsumer,
boolean cull,
Random random,
long seed,
int overlay) |
void |
render(MatrixStack.Entry entry,
VertexConsumer vertexConsumer,
BlockState blockState,
BakedModel bakedModel,
float float2,
float float3,
float float4,
int int2,
int int3) |
boolean |
renderFlat(BlockRenderView world,
BakedModel model,
BlockState state,
BlockPos pos,
MatrixStack buffer,
VertexConsumer vertexConsumer,
boolean cull,
Random random,
long long2,
int int2) |
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 static void |
renderQuad(MatrixStack.Entry entry,
VertexConsumer vertexConsumer,
float float2,
float float3,
float float4,
List<BakedQuad> list,
int int2,
int int3) |
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) |
private static final ThreadLocal<BlockModelRenderer.BrightnessCache> brightnessCache
private final BlockColors colorMap
public BlockModelRenderer(BlockColors colorMap)
public boolean render(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack matrix, VertexConsumer vertexConsumer, boolean cull, Random random, long seed, int overlay)
public boolean renderSmooth(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack buffer, VertexConsumer vertexConsumer, boolean cull, Random random, long seed, int overlay)
public boolean renderFlat(BlockRenderView world, BakedModel model, BlockState state, BlockPos pos, MatrixStack buffer, VertexConsumer vertexConsumer, boolean cull, Random random, long long2, int int2)
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)
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 getQuadDimensions(BlockRenderView world, BlockState state, BlockPos pos, int[] vertexData, Direction face, @Nullable float[] box, BitSet flags)
private void renderQuadsFlat(BlockRenderView world, BlockState state, BlockPos pos, int light, int overlay, boolean useWorldLight, MatrixStack matrices, VertexConsumer vertexConsumer, List<BakedQuad> quads, BitSet flags)
public void render(MatrixStack.Entry entry, VertexConsumer vertexConsumer, @Nullable BlockState blockState, BakedModel bakedModel, float float2, float float3, float float4, int int2, int int3)
private static void renderQuad(MatrixStack.Entry entry, VertexConsumer vertexConsumer, float float2, float float3, float float4, List<BakedQuad> list, int int2, int int3)
public static void enableBrightnessCache()
public static void disableBrightnessCache()