Akward Stronghold torch placement
Noticed this while exploring the library in a stronghold. The Torch placement on the chandelier is strange and not connected to the chandelier. This bug is related to MC-2512 but not the same.
Linked Issues
Created Issue:
Akward Stronghold torch placement
Noticed this while exploring the library in a stronghold. The Torch placement on the chandelier is strange and not connected to the chandelier. This bug is related to
MC-2512but not the same.
relates to
relates to
Reading the code for the placing of torches in structures, it would seem that the code relies on some automatic algorithm to decide which way to attach the torch. The placement code itself does not specify it. Apparently, it doesn't work any more (or works worse than before).
Note, it didn't work well earlier, either. For example, in mineshafts the torches could be randomly placed on any of the neighbor surfaces if there was more than one. That is, it made a guess about the surface and got it wrong.
The need for automatic guessing of the orientation comes from the fact that the structure "blueprints" are defined in only one orientation, while the structure can be placed in multiple different orientations. This needs rotation of coordinates. Easy to do for blocks that are symmetric and do not need to be rotated themselves. The non-symmetric ones were left to be handled by automatic guessing...
The correct solution would be to add different placement method for those blocks that need orientation and which can not solve the correct orientation by itself. (For example, glass and fences, as they are, can always figure out how they should represents themselves, but e.g. torches, stairs, ladders can not always guess the right surface to attach to or the right orientation). A method that allows specifying the orientation like the player does; you're watching from here, and pointing to there, click. Such additional data can be rotated in the structure placement routines themselves just as easily as the block's coordinates themselves.
This solution might fix some apparently other bugs, too, like the stronghold library torches being fancily (MC-7010) or desert temple corner tower stairs being wrong, etc.
(EDIT: found a method that is supposed to rotate such blocks (i.e. adjust their metadata), but seems it is not used for torch placement. However, the method is of bad design anyway; the inner functionality of various blocks (the interpretation of metadata of torches, ladders, etc.) gets spread from their own classes into StructureComponent-class; the rotation code should be in their respective classes, which the generic rotation method would delegate the tasks to.)

Please provide seed and coordinates.
Can you still reproduce in 13w06a? The fix to
MC-2512may have fixed this.