code: public static IBlockState rotate(IBlockState state, int angle)
  	{
  		int a = -angle & 3;
  		if (a == 0)
  			return state;
  
  		PropertyDirection property = DirectionalComponent.getProperty(state.getBlock());
  		if (property == null || !state.getProperties().containsKey(property))
  			return state;
  
  		return state.withProperty(property, EnumFacingUtils.rotateFacing(state.getValue(property), a));
  	}
docs: Rotates the {@link IBlockState} by a factor of 90 degrees counter-clockwise.
  
  @param state the state
  @param angle the angle
  @return the i block state