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

@@ -8,4 +8,6 @@ forge_version = 14.23.5.2847
mcp_mappings = stable_39
kotlin_version = 1.3.40
forgelin_version = 1.8.4
forgelin_version = 1.8.4
org.gradle.java.home=C:\\Users\\catma\\.jdks\\corretto-1.8.0_482

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