mojira.dev
MC-312833

Growing trees next to logs that aren't part of them causes their leaves to decay

The Bug:

Growing trees next to logs that aren't part of them causes their leaves to decay.

Leaves don't decay while they are within six blocks of a log. However, leaves of a newly grown tree that only touch other logs, such as a log wall or the trunk of another tree, still decay, therefore introducing an inconsistency. This issue did not occur in 26.3 or 26.4 Snapshot 4.

Steps to Reproduce:

  1. Create a superflat world.

  2. Place down a wall of oak logs and a birch sapling next to it by using the commands provided below.

    /fill 1 -60 -2 1 -55 2 minecraft:oak_log
    /setblock 0 -60 0 minecraft:birch_sapling
  3. Obtain some bone meal and use it on the sapling until it grows into a tree.

  4. Stand on the other side of the log wall so you’re looking at the birch leaves that generated through the oak log wall.

  5. Set the random_tick_speed game rule to 1000 by using the command provided below.

    /gamerule random_tick_speed 1000
  6. Observe if some birch leaves decay.

Observed Behavior:

Leaves can decay.

Expected Behavior:

Leaves would not decay, just like how they didn’t in 26.4 Snapshot 4.

Attachments

Comments 2

Snapshot 5 changed logic in TreeFeature#updateLeaves

the new loop skips neighbors with a lower distance. the oak wall never becomes another starting point for the leaves on the other side, so those leaves stay at distance 7 and decay.

Avoma

(Unassigned)

Unconfirmed

Block states, World generation

26.4 Snapshot 5

Retrieved