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
is duplicated by 1
Attachments
Comments 12
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!
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.
Please provide seed and coordinates.