All pistons were placed standin on top of the lamp. I allways aimed for the block behind the piston.
If they placing functioned like logs placing does, they all wouuld be facing the lamp and not upwards.
Linked issues
relates to 2
Attachments
Comments 13
@Tails but this is the problem here. I stood in the exact same spot. And they should be facing all the same, don't you think?
This indeed seems to have a small offset bug into it. Seems like it calculates the angle ("facing") based on the block corners, ignoring the exact position of the player. Lets see if I can find the relevant source code. (btw. affects 1.4.7, too)
Fix
BlockPistonBase.determineOrientation()
//if (MathHelper.abs((float)par4EntityPlayer.posX - (float)par1) < 2.0F
// && MathHelper.abs((float)par4EntityPlayer.posZ - (float)par3) < 2.0F)
if (MathHelper.abs((float) player.posX - ((float) x + 0.5F)) < 2.0F
&& MathHelper.abs((float) player.posZ - ((float) z + 0.5F)) < 2.0F) {
...
The piston block's position was taken at its north-west corner, while player's position was its non-rounded value. This caused half-a-block shift (i.e. error) in the angle calculation.
The fix above simply adds 0.5 to both horizontal coordinates, thus calculating the angle based on the bottom center of the piston block.
This is like the crappy old behavior of placing logs. They maybe just didn’t fix placing for pistons, too.
Pistons are placed always facing you.