Mojira Archive
MC-160613

Berry bushes don't grow if there is a block above them

The bug

Sweet berry bushes / sweet berries do not grow if they have a (solid?) block above them.

To reproduce

  1. Plant a sweet berry bush
  2. Place a solid block above
  3. Run /gamerule randomTickSpeed 10000 or just wait a while
    The bush will not grow

Code analysis

[Mod] Chandler - The following is based on 1.17 Release Candidate 1 yarn mappings.
This is caused by the following statement of net.minecraft.block.SweetBerryBushBlock in which the light level of the position directly above the block is checked. This is why only solid blocks stop the growth, as transparent blocks allow light through

net.minecraft.block.SweetBerryBushBlock
if (i < 3 && random.nextInt(5) == 0 && world.getBaseLightLevel(pos.up(), 0) >= 9) {
            world.setBlockState(pos, (BlockState)state.with(AGE, i + 1), Block.NOTIFY_LISTENERS);
        }

Unresolved

[Mod] violine1101

2019-09-06, 01:49 PM

2024-12-28, 12:40 PM

10

2

Confirmed

Low

Gameplay

Block states

sweet_berry_bush

1.14.4 - 1.21.41.14.4, 19w36a, 1.15.1, 1.15.2, 1.16 Pre-release 5, 1.16, 1.16.2, 1.16.3, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 21w08b, 1.17 Release Candidate 2, 1.17, 1.17.1, 1.18.1, 1.18.2, 1.19, 1.19.2, 1.19.3, 23w05a, 1.19.4, 23w18a, 1.20.1, 1.21.4

-