always push shader metadata for block models

This commit is contained in:
octarine-noise
2016-08-09 09:23:55 +02:00
parent 913496473d
commit 1bd353577f
3 changed files with 120 additions and 115 deletions

View File

@@ -64,18 +64,21 @@ class RenderGrass : AbstractBlockRenderingHandler(BetterFoliageMod.MOD_ID) {
modelRenderer.updateShading(Int3.zero, allFaces)
// render full grass block
modelRenderer.render(
renderer,
fullCube,
Rotation.identity,
ctx.blockCenter,
icon = { ctx, qi, q -> grassTopTexture },
postProcess = { ctx, qi, q, vi, v ->
rotateUV(2)
if (isSnowed) { if(!ctx.aoEnabled) setGrey(1.4f) }
else if (ctx.aoEnabled) multiplyColor(blockColor)
}
)
ShadersModIntegration.renderAs(ctx.blockState(Int3.zero), renderer) {
modelRenderer.render(
renderer,
fullCube,
Rotation.identity,
ctx.blockCenter,
icon = { ctx, qi, q -> grassTopTexture },
postProcess = { ctx, qi, q, vi, v ->
rotateUV(2)
if (isSnowed) {
if (!ctx.aoEnabled) setGrey(1.4f)
} else if (ctx.aoEnabled) multiplyColor(blockColor)
}
)
}
} else {
renderWorldBlockBase(ctx, dispatcher, renderer, null)