code: public static BlockPos chunkPosition(BlockPos pos)
  	{
  		return new BlockPos(pos.getX() - (pos.getX() >> 4) * 16, pos.getY() - (pos.getY() >> 4) * 16, pos.getZ() - (pos.getZ() >> 4) * 16);
  	}
docs: Converts the {@link BlockPos} to its position relative to the chunk it's in.
  
  @param pos the pos
  @return the block pos