code: @Override
  	public int getMetaFromState(Block block, IBlockState state)
  	{
  		if (getProperty() == HORIZONTAL)
  			return getDirection(state).getHorizontalIndex();
  		else
  			return getDirection(state).getIndex();
  	}
docs: Gets the metadata from the {@link IBlockState}.
  
  @param block the block
  @param state the state
  @return the meta from state