here is the code that worked for me...
@Override
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack item){
int yaw = ((int) player.rotationYaw)%360;
if (yaw<0) yaw+=360;
if (315<yaw || yaw<=45) world.setBlockMetadataWithNotify(x, y, z, 2, 3);
if (45<yaw && yaw<=135) world.setBlockMetadataWithNotify(x, y, z, 5, 3);
if (135<yaw && yaw<=225) world.setBlockMetadataWithNotify(x, y, z, 3, 3);
if (225<yaw && yaw<=315) world.setBlockMetadataWithNotify(x, y, z, 4, 3);
player.rotationYaw = 90;
}
the other code you see there just rotates the block depending on which direction you are facing which is unimportant in this case. What is important is the last line player.rotationYaw = 90; when run and I place the block my character is rotated to the position of 90 degrees so it is working for me.