Compare commits

7 Commits

Author SHA1 Message Date
64146a0f98 Ensure grass rendering respects air block checks and update project Java home in gradle properties. 2026-04-09 03:09:28 +02:00
octarine-noise
47c134049c Merge branch 'Snownee-1.12' into kotlin-1.12
# Conflicts:
#	src/main/resources/assets/betterfoliage/crop_default.cfg
#	src/main/resources/assets/betterfoliage/leaves_blocks_default.cfg
2021-04-26 11:53:34 +02:00
thedarkcolour
b1ad58c089 Fix an NPE with music discs
Fixes an NPE I found while playing around with music discs. Changes the "soundIn" parameter in the playRecord function in IBlockUpdateListener nullable which is safe because the parameter never gets used. This fixes the NPE because somehow taking a music disc out of the jukebox passes null for the playRecord function, which causes a crash when it shouldn't.
2021-04-26 11:34:02 +02:00
Jordan Rey
85e63b9161 "Plants" mod Crop compatibility 2021-04-26 11:33:21 +02:00
Jordan Rey
59ddaa0335 "Plants" mod Log compatibility 2021-04-26 11:33:21 +02:00
Jordan Rey
ae84741622 "Plants" mod Leaves compatibility 2021-04-26 11:33:21 +02:00
Snownee
369348f6aa Add Cuisine classes to defaults 2019-01-20 20:30:03 +08:00
6 changed files with 29 additions and 4 deletions

View File

@@ -9,3 +9,5 @@ mcp_mappings = stable_39
kotlin_version = 1.3.40 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

@@ -118,7 +118,7 @@ interface IBlockUpdateListener : IWorldEventListener {
override fun notifyLightSet(pos: BlockPos) {} override fun notifyLightSet(pos: BlockPos) {}
override fun spawnParticle(particleID: Int, ignoreRange: Boolean, xCoord: Double, yCoord: Double, zCoord: Double, xSpeed: Double, ySpeed: Double, zSpeed: Double, vararg parameters: Int) {} override fun spawnParticle(particleID: Int, ignoreRange: Boolean, xCoord: Double, yCoord: Double, zCoord: Double, xSpeed: Double, ySpeed: Double, zSpeed: Double, vararg parameters: Int) {}
override fun spawnParticle(id: Int, ignoreRange: Boolean, minimiseParticleLevel: Boolean, x: Double, y: Double, z: Double, xSpeed: Double, ySpeed: Double, zSpeed: Double, vararg parameters: Int) {} override fun spawnParticle(id: Int, ignoreRange: Boolean, minimiseParticleLevel: Boolean, x: Double, y: Double, z: Double, xSpeed: Double, ySpeed: Double, zSpeed: Double, vararg parameters: Int) {}
override fun playRecord(soundIn: SoundEvent, pos: BlockPos) {} override fun playRecord(soundIn: SoundEvent?, pos: BlockPos) {}
override fun sendBlockBreakProgress(breakerId: Int, pos: BlockPos, progress: Int) {} override fun sendBlockBreakProgress(breakerId: Int, pos: BlockPos, progress: Int) {}
override fun markBlockRangeForRenderUpdate(x1: Int, y1: Int, z1: Int, x2: Int, y2: Int, z2: Int) {} override fun markBlockRangeForRenderUpdate(x1: Int, y1: Int, z1: Int, x2: Int, y2: Int, z2: Int) {}
} }

View File

@@ -102,6 +102,10 @@ class RenderGrass : AbstractBlockRenderingHandler(BetterFoliageMod.MOD_ID) {
} }
if (!Config.shortGrass.grassEnabled) return true 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 (isSnowed && !Config.shortGrass.snowEnabled) return true
if (ctx.blockState(up1).isOpaqueCube) return true if (ctx.blockState(up1).isOpaqueCube) return true
if (Config.shortGrass.population < 64 && noise[ctx.pos] >= Config.shortGrass.population) return true if (Config.shortGrass.population < 64 && noise[ctx.pos] >= Config.shortGrass.population) return true

View File

@@ -34,3 +34,10 @@ com.pam.harvestcraft.BlockPamCrop
com.pam.harvestcraft.BlockPamDesertGarden com.pam.harvestcraft.BlockPamDesertGarden
com.pam.harvestcraft.BlockPamNormalGarden com.pam.harvestcraft.BlockPamNormalGarden
com.pam.harvestcraft.BlockPamWaterGarden com.pam.harvestcraft.BlockPamWaterGarden
// Plants
shadows.plants2.block.BlockEnumCrop
// Cuisine
snownee.cuisine.blocks.BlockCuisineCrops
-snownee.cuisine.blocks.BlockDoubleCrops

View File

@@ -6,3 +6,11 @@ biomesoplenty.common.block.BlockBOPLeaves
// Aether II // Aether II
com.gildedgames.aether.common.blocks.natural.BlockAetherLeaves com.gildedgames.aether.common.blocks.natural.BlockAetherLeaves
// Plants
shadows.plants2.block.BlockEnumLeaves
shadows.plants2.block.BlockEnumNetherLeaves
// Cuisine
snownee.cuisine.blocks.BlockModLeaves
snownee.cuisine.blocks.BlockShearedLeaves

View File

@@ -33,3 +33,7 @@ techreborn.blocks.BlockRubberLog
// Better With Mods // Better With Mods
betterwithmods.blocks.BlockStump betterwithmods.blocks.BlockStump
// Plants
shadows.plants2.block.BlockEnumLog
shadows.plants2.block.BlockEnumNetherLog