diff --git a/src/main/kotlin/mods/betterfoliage/client/Hooks.kt b/src/main/kotlin/mods/betterfoliage/client/Hooks.kt index 7c2e9a8..46ffe6e 100644 --- a/src/main/kotlin/mods/betterfoliage/client/Hooks.kt +++ b/src/main/kotlin/mods/betterfoliage/client/Hooks.kt @@ -77,7 +77,7 @@ fun renderWorldBlock(dispatcher: BlockRendererDispatcher, ): Boolean { // build context val blockCtx = CachedBlockCtx(reader, pos) - val renderCtx = RenderCtx(dispatcher, buffer, layer, random) + val renderCtx = RenderCtx(dispatcher, buffer, layer, random, modelData) lightingCtx.reset(blockCtx) val combinedCtx = CombinedContext(blockCtx, renderCtx, lightingCtx) diff --git a/src/main/kotlin/mods/octarinecore/client/render/BlockContext.kt b/src/main/kotlin/mods/octarinecore/client/render/BlockContext.kt index 4299e35..ab4eb97 100644 --- a/src/main/kotlin/mods/octarinecore/client/render/BlockContext.kt +++ b/src/main/kotlin/mods/octarinecore/client/render/BlockContext.kt @@ -13,6 +13,7 @@ import net.minecraft.world.IBlockReader import net.minecraft.world.IEnviromentBlockReader import net.minecraft.world.World import net.minecraft.world.biome.Biome +import net.minecraftforge.client.model.data.IModelData import java.util.* /** @@ -64,8 +65,9 @@ data class RenderCtx( val dispatcher: BlockRendererDispatcher, val renderBuffer: BufferBuilder, val layer: BlockRenderLayer, - val random: Random + val random: Random, + val modelData: IModelData ) { - fun render(worldBlock: BlockCtx) = dispatcher.renderBlock(worldBlock.state, worldBlock.pos, worldBlock.world, renderBuffer, random, null) + fun render(worldBlock: BlockCtx) = dispatcher.renderBlock(worldBlock.state, worldBlock.pos, worldBlock.world, renderBuffer, random, modelData) }