Ensure grass rendering respects air block checks and update project Java home in gradle properties.

This commit is contained in:
2026-04-09 03:09:28 +02:00
parent 47c134049c
commit 64146a0f98
2 changed files with 7 additions and 1 deletions

View File

@@ -102,6 +102,10 @@ class RenderGrass : AbstractBlockRenderingHandler(BetterFoliageMod.MOD_ID) {
}
if (!Config.shortGrass.grassEnabled) return true
val stateAbove = ctx.blockState(up1)
if (!stateAbove.block.isAir(stateAbove, ctx.world!!, ctx.pos.up())) return true
if (isSnowed && !Config.shortGrass.snowEnabled) return true
if (ctx.blockState(up1).isOpaqueCube) return true
if (Config.shortGrass.population < 64 && noise[ctx.pos] >= Config.shortGrass.population) return true