mojira.dev
MC-243190

Rooted dirt can replace cave vines

The Bug

Rooted Dirt can replace cave vines causing cave vines to not look fully grown. This is caused by cave_vines & cave_vines_plant being a part of #azalea_root_replaceable.

Reproduce

Seed: 9098444692520878126
Coordinates: /execute in minecraft:overworld run tp @s -1989.86 25.01 1957.93 177.15 39.90

Observed Result

The rooted dirt replaced the cave vines

Expected Result

Rooted dirt wouldn't replace cave vines

Code analysis

Code analysis by @unknown can be found in this comment.

Attachments

Comments 1

I can confirm this behavior in 1.18.1.

Here's a code analysis of this issue. The following is based on a decompiled version of Minecraft 1.18 using MCP-Reborn. Please note that I'm quite tentative about this analysis, although I'm persuaded to believe that this is likely the cause of the problem. 🙂

Code Analysis (tentative):

net.minecraft.data.tags.BlockTagsProvider.java

public class BlockTagsProvider extends TagsProvider<Block> {
   ...
   protected void addTags() {
      ...
      this.tag(BlockTags.CAVE_VINES).add(Blocks.CAVE_VINES_PLANT).add(Blocks.CAVE_VINES);
      this.tag(BlockTags.MOSS_REPLACEABLE).addTag(BlockTags.BASE_STONE_OVERWORLD).addTag(BlockTags.CAVE_VINES).addTag(BlockTags.DIRT);
      this.tag(BlockTags.LUSH_GROUND_REPLACEABLE).addTag(BlockTags.MOSS_REPLACEABLE).add(Blocks.CLAY).add(Blocks.GRAVEL).add(Blocks.SAND);
      this.tag(BlockTags.AZALEA_ROOT_REPLACEABLE).addTag(BlockTags.LUSH_GROUND_REPLACEABLE).addTag(BlockTags.TERRACOTTA).add(Blocks.RED_SAND);
      ...

If we look at the above class, we can see that the LUSH_GROUND_REPLACEABLE block tag copies the block tags of MOSS_REPLACEABLE, and the AZALEA_ROOT_REPLACEABLE block tag, copy the block tags of LUSH_GROUND_REPLACEABLE. Because of this, both CAVE_VINES and CAVE_VINES_PLANT can be replaced by azalea roots.

Danielps1818

mgustavsson

Confirmed

Normal

World generation

1.18, 1.18.1

22w07a

Retrieved