The bug
When saving witch hut structure data the game wrongly assumes all witch huts generate at the same height. As a result, witch huts generated higher than usual will allow regular mobs to spawn inside.
How to reproduce
Observe spawning in the witch hut at 8832, 9456 on seed "Witch hut test", pointed out by @unknown in the comments.
/tp @p 8832 100 9456
See attached screenshots: One showing three layers of witch spawning floors built in a witch hut generated at its usual height, one showing three layers built at the same height (relative to the witch hut) which generated above Y=100. One spawns witches, the other spawns all kinds of mobs.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
Attachments
Comments 32
You are experiencing exactly this issue: Witch huts generated in/after 1.8.1-pre1 will only spawn witches on the intersection of the area of the actual witch hut and the same area at heights 64 through 71.
Confirmed in 1.8.1-pre2 using a world generated with Default settings. So it's not just customized worlds (but we already knew that).
confirmed for 1.8.1-pre2, haven't found one in pre 3 yet
Witches still spawn in my farm as it isn't that far from what it would be normally but still spawns other mobs on the platform.
this bug is really annoying.
The witch hut mentioned in the description of this ticket no longer generates in 1.13.2 or 1.14. Is there another seed / location where we could confirm that this issue has indeed been fixed?
My witch hut freshly generated in 1.8.1-pre2 is having a similar issue to this due to it generating higher than normal. Unlike the issue above however, the spawning box appears to have been cut down in size as it ranges from y66-y71 instead of y64-y70, meaning my farm can only have two spawning floors.
Not sure if this relates too closely to the issue above, but I'm new to the tracker and do not want to start off by posting a potentially duplicate issue. I apologise if this does not belong here.