The Bug:
Rooted dirt can't replace sandstone and isn't part of the #minecraft:azalea_root_replaceable block tag.
Despite azalea trees being able to generate in deserts, the rooted dirt from the trees can't replace sandstone underneath the sand.
Here is an example:
Version: 1.19.3
Seed: -4182603768208343432
Coordinates: /execute in minecraft:overworld run tp @s -355.54 61.00 436.04 297.26 25.79
Steps to Reproduce:
Generate a world with the seed provided above and teleport to the given coordinates.
Look closely at the azalea roots and dig down to see if they replace nearby sandstone.
Take note as to whether or not rooted dirt can replace sandstone.
Observed Behavior:
Rooted dirt can't replace sandstone.
Expected Behavior:
Rooted dirt would be able to replace sandstone.
Linked issues
is duplicated by 1
Attachments
Comments 7
Here's a code analysis along with a potential fix regarding this issue. The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
As an additional note, I was told here in the Mojira Discord that this ticket cannot be updated to include red sandstone unless an example is found due to it generating differently than regular sandstone. While I do understand this, since Blocks.RED_SAND
is a part of the #minecraft:azalea_root_replaceable
tag, and it's confirmed that Blocks.SANDSTONE
should be as well (judging by how MC-242011 has an assigned "Mojang Priority"), it only makes sense that Blocks.RED_SANDSTONE
should also be included with this tag.
Code Analysis:
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
. Since Blocks.SANDSTONE
and Blocks.RED_SANDSTONE
aren't included within the AZALEA_ROOT_REPLACEABLE
block tag or any of the tags that AZALEA_ROOT_REPLACEABLE
copies the properties of, this results in azalea roots not being able to replace both sandstone and red sandstone.
Potential Fix:
Simply adding Blocks.SANDSTONE
and Blocks.RED_SANDSTONE
within this block tag should resolve this problem. The correct line of code within its class should look something like the following:
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).add(Blocks.SANDSTONE).add(Blocks.RED_SANDSTONE);
...
Can confirm in 1.18.1. This also appears to affect red sandstone and is probably worth mentioning.