do not use deprecated Block.canRenderInLayer()
This commit is contained in:
@@ -76,9 +76,8 @@ fun renderWorldBlock(dispatcher: BlockRendererDispatcher,
|
|||||||
layer: BlockRenderLayer
|
layer: BlockRenderLayer
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val isCutout = layer == CUTOUT_MIPPED || layer == CUTOUT
|
val isCutout = layer == CUTOUT_MIPPED || layer == CUTOUT
|
||||||
val needsCutout = state.block.canRenderInLayer(CUTOUT_MIPPED) || state.block.canRenderInLayer(CUTOUT)
|
val needsCutout = state.block.canRenderInLayer(state, CUTOUT_MIPPED) || state.block.canRenderInLayer(state, CUTOUT)
|
||||||
val canRender = (isCutout && needsCutout) || state.block.canRenderInLayer(layer)
|
val canRender = (isCutout && needsCutout) || state.block.canRenderInLayer(state, layer)
|
||||||
|
|
||||||
|
|
||||||
blockContext.let { ctx ->
|
blockContext.let { ctx ->
|
||||||
ctx.set(blockAccess, pos)
|
ctx.set(blockAccess, pos)
|
||||||
|
|||||||
Reference in New Issue
Block a user