Fruit trees now consider the light level instead of time of day when trying to grow. Fixes #237

This commit is contained in:
Sollace 2024-01-17 19:18:56 +00:00
parent f3ab86ed74
commit 54381cf673
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -70,7 +70,7 @@ public class FruitBearingBlock extends LeavesBlock implements TintedBlock, Bucka
return; return;
} }
if (world.isDay()) { if (world.getBaseLightLevel(pos, 0) > 8) {
BlockSoundGroup group = getSoundGroup(state); BlockSoundGroup group = getSoundGroup(state);
int steps = FertilizableUtil.getGrowthSteps(world, pos, state, random); int steps = FertilizableUtil.getGrowthSteps(world, pos, state, random);
while (steps-- > 0) { while (steps-- > 0) {