mojira.dev
MC-63820

Empty flower pot in witch put

The bug

Flower pots generate empty in witch huts.

How to reproduce

Example seeds and coordinates:

Seed: 13605
Coordinates: /tp -412 70 -347
Seed: 1455370769
Coordinates: /tp -139 66 -442

Code analysis

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

Linked issues

Attachments

Comments 12

Please provide seed and coordinates.

UGH, I deleted the world; I will try to find another.

Okay, I have found another Witch Hut (of course when I WANT to find one, it becomes difficult). As said before, the mushroom is on the floor and not in the pot.
*Seed: 13605
*Coordinates: -412 70 -347
I apologize for not including this information the first time around.

*EDIT: DO THIS ON LARGE BIOMES; FORGOT!

thanks for reopening it

2 more comments

Still occurs in latest 1.9 snapshots, 15w42a.

Confirmed for

  • 15w47c

  • 1.9-pre4

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.

The reason why this happens is that the public boolean addComponentParts(World worldIn, Random p_74875_2_, StructureBoundingBox p_74875_3_) method of the net.minecraft.world.gen.structure.ComponentScatteredFeaturePieces.SwampHut class tries to set the mushroom by using the block state property. This method is outdated because there are already more than 16 plants that can be displayed. The old system used the legacy_data property. When the flower pot is placed it calls the public TileEntity createNewTileEntity(World worldIn, int meta) method. The problem here is that this method cannot create the different yellow flower variations and additionally the meta parameter is only based on the legacy_data property of the block state. As the generation part uses the new content property, it uses the default value 0 which means the flower pot is empty.

This can be fixed by modifying the public boolean addComponentParts(World worldIn, Random p_74875_2_, StructureBoundingBox p_74875_3_) method, but considering the fact that the structure block was added it might not be worth changing this but instead importing it as structure.

This appears to be resolved in 17w47b 🙂

It was actually fixed in 17w47a.

Niknokinater

(Unassigned)

Confirmed

Minecraft 14w30c, Minecraft 14w32d, Minecraft 1.8-pre1, Minecraft 1.8-pre2, Minecraft 1.8-pre3, ..., Minecraft 1.11, Minecraft 1.11.2, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2

Minecraft 17w47a

Retrieved