do not use deprecated Block.canRenderInLayer()

This commit is contained in:
octarine-noise
2016-04-19 21:11:09 +02:00
parent f37cb273f1
commit 66ed1c098f

View File

@@ -76,9 +76,8 @@ fun renderWorldBlock(dispatcher: BlockRendererDispatcher,
layer: BlockRenderLayer
): Boolean {
val isCutout = layer == CUTOUT_MIPPED || layer == CUTOUT
val needsCutout = state.block.canRenderInLayer(CUTOUT_MIPPED) || state.block.canRenderInLayer(CUTOUT)
val canRender = (isCutout && needsCutout) || state.block.canRenderInLayer(layer)
val needsCutout = state.block.canRenderInLayer(state, CUTOUT_MIPPED) || state.block.canRenderInLayer(state, CUTOUT)
val canRender = (isCutout && needsCutout) || state.block.canRenderInLayer(state, layer)
blockContext.let { ctx ->
ctx.set(blockAccess, pos)