rewrite model and texture detection

expose in mod configuration
This commit is contained in:
octarine-noise
2016-08-09 16:53:29 +02:00
parent 1bd353577f
commit 488078b50f
37 changed files with 526 additions and 236 deletions

View File

@@ -13,8 +13,8 @@ import net.minecraft.util.BlockRenderLayer
class RenderConnectedGrass : AbstractBlockRenderingHandler(BetterFoliageMod.MOD_ID) {
override fun isEligible(ctx: BlockContext) =
Config.enabled && Config.connectedGrass.enabled &&
Config.blocks.dirt.matchesID(ctx.block) &&
Config.blocks.grass.matchesID(ctx.block(up1)) &&
Config.blocks.dirt.matchesClass(ctx.block) &&
Config.blocks.grassClasses.matchesClass(ctx.block(up1)) &&
(Config.connectedGrass.snowEnabled || !ctx.blockState(up2).isSnow)
override fun render(ctx: BlockContext, dispatcher: BlockRendererDispatcher, renderer: VertexBuffer, layer: BlockRenderLayer): Boolean {