mojira.dev
MC-260537

Tree growth can replace leaves that have the 'persistent' block state set to true

If you place spruce leaves where a spruce tree would grow new leaves, those existing leaves will have their persistence state set to false and will decay along with the generated leaf blocks if decay conditions are met (logs removed).

To reproduce

  1. Place some leaves in a column

  2. /gamerule randomTickSpeed 300

  3. Place a sapling next to the leaf column

  4. Wait for the sapling to grow into a tree

  5. Break the tree's logs

Observed behaviour

The previously placed leaves disappear.

Expected behaviour

The previously placed leaves stay as is.

Attachments

Comments 5

Can you tell me the problem more clearly?

When a tree grows it generates leaves, but won't replace existing blocks. If one of the blocks that would be replaced is a player placed leaf, and therefore has `persistence=true` set (e.g. won't decay), that block will have its persistence flag set to false. It can then decay if the tree logs are removed. As a player placed block it should not be replaced, and therefore not decay when the adjacent generated leaves decay.

Is this resetting the previously placed leaves states, or replacing the leaves themselves?

"#minecraft:leaves", is included in the "replaceable_by_leaves.json" tag which is used when growing a tree to determine whether or not the leaves of the tree can replace certain blocks.

{
  "values": [
    "#minecraft:leaves",
    "minecraft:grass",
    "minecraft:fern",
    "minecraft:dead_bush",
    "minecraft:vine",
    "minecraft:glow_lichen",
    "minecraft:sunflower",
    "minecraft:lilac",
    "minecraft:rose_bush",
    "minecraft:peony",
    "minecraft:tall_grass",
    "minecraft:large_fern",
    "minecraft:hanging_roots",
    "minecraft:pitcher_plant",
    "minecraft:water",
    "minecraft:seagrass",
    "minecraft:tall_seagrass",
    "minecraft:warped_roots",
    "minecraft:nether_sprouts",
    "minecraft:crimson_roots"
  ]
}

This also affects 1.20.1

orcasauce

Stefan

Confirmed

Platform

Important

Block states

1.19.3, 1.19.4 Pre-release 1, 1.20.1

24w37a

Retrieved