allow custom renderers to draw on multiple layers

fix extra leaves & fast graphics xray bug
This commit is contained in:
octarine-noise
2017-07-05 11:34:07 +02:00
parent a9fba1a18e
commit 38b35c910b
15 changed files with 45 additions and 29 deletions

View File

@@ -45,6 +45,9 @@ class RenderLilypad : AbstractBlockRenderingHandler(BetterFoliageMod.MOD_ID) {
Config.blocks.lilypad.matchesClass(ctx.block)
override fun render(ctx: BlockContext, dispatcher: BlockRendererDispatcher, renderer: VertexBuffer, layer: BlockRenderLayer): Boolean {
// render the whole block on the cutout layer
if (!layer.isCutout) return false
renderWorldBlockBase(ctx, dispatcher, renderer, null)
modelRenderer.updateShading(Int3.zero, allFaces)