BlockPattern WitherBoss (and others) can be built incorrectly
The bug
The BlockPattern class is incorrectly matching blocks that aren't including the block being placed by the player.
Proof
In the screenshots provided, if you replace the red wool block with a wither skull the wither will be detected and spawned, even though the pattern matched was not comprised of the block the player placed.
Possible fix
Instead of using a block iterator iterating over all blocks in a cube (of size 3 for the wither as it is the max(width,height,depth) the BlockPattern class should be iterating over the inverted offsets of the BlockPattern. (e.g. translateOffset(position, face1, face2, -i, -j, -k))
(an optimization is to skip Predicates.alwaysTrue() and or unplaceable blocks).
There is a second bug that I am having troubles replicating, but involves modded minecraft where as the above is reproducible in vanilla. The second issue is involved with asymmetrical block patterns.
2014-11-10, 05:32 PM
2022-06-05, 12:05 AM
2021-08-27, 10:06 AM
14
10
Minecraft 1.8 - 1.17.1
Minecraft 1.8, Minecraft 1.8.6, Minecraft 15w31a, Minecraft 1.9.3 Pre-Release 3, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 16w44a, Minecraft 1.11.2, Minecraft 17w13b, Minecraft 1.12.2, Minecraft 17w45b, Minecraft 18w07a, Minecraft 18w11a, Minecraft 18w20c, Minecraft 18w22c, Minecraft 1.13-pre2, Minecraft 1.13-pre5, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1, 1.16.2, 1.17.1
-