use of link.infra.indium.renderer.RenderMaterialImpl.Value in project Indium by comp500.
the class TerrainFallbackConsumer method accept.
@Override
public void accept(BakedModel model) {
final Supplier<Random> random = blockInfo.randomSupplier;
final Value defaultMaterial = blockInfo.defaultAo && model.useAmbientOcclusion() ? MATERIAL_SHADED : MATERIAL_FLAT;
final BlockState blockState = blockInfo.blockState;
for (int i = 0; i < 6; i++) {
final Direction face = ModelHelper.faceFromIndex(i);
final List<BakedQuad> quads = model.getQuads(blockState, face, random.get());
final int count = quads.size();
if (count != 0) {
for (int j = 0; j < count; j++) {
final BakedQuad q = quads.get(j);
renderQuad(q, face, defaultMaterial);
}
}
}
final List<BakedQuad> quads = model.getQuads(blockState, null, random.get());
final int count = quads.size();
if (count != 0) {
for (int j = 0; j < count; j++) {
final BakedQuad q = quads.get(j);
renderQuad(q, null, defaultMaterial);
}
}
}
Aggregations