The Bug
Powder Snow is apart of the #goat_spawnable_tag despite goats sinking and freezing to death when on/in powder snow. This means that there is a chance that a goat could spawn in powder snow and potentially die due to MC-226501
Reproduce
Place some powder snow
Press F3
Look at the block tags that powder snow are apart of
Observed Result
Powder snow was apart of #goat_spawnable_on
Expected Result
Powder snow wouldn't be apart of #goat_spawnable_on
Attachments
Comments 2
I can confirm this behavior in 1.18.1.
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. 🙂
Code Analysis:
net.minecraft.data.tags.BlockTagsProvider.java
...
this.tag(BlockTags.GOATS_SPAWNABLE_ON).add(Blocks.STONE, Blocks.SNOW, Blocks.POWDER_SNOW, Blocks.SNOW_BLOCK, Blocks.PACKED_ICE, Blocks.GRAVEL);
...If we look at the above class, we can see that powder snow is included within the GOATS_SPAWNABLE_ON block tag, meaning that goats can spawn on top of these blocks.
Potential Fix:
Simply removing Blocks.POWDER_SNOW from 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
...
this.tag(BlockTags.GOATS_SPAWNABLE_ON).add(Blocks.STONE, Blocks.SNOW, Blocks.SNOW_BLOCK, Blocks.PACKED_ICE, Blocks.GRAVEL);
...
I am able to confirm this behavior. Also, this affects 1.18 Pre-release 1.