MovingObjectPosition rayTrace(World world, EntityLivingBase entity, boolean adjacent) {
   float f1 = entity.rotationPitch;
   float f2 = entity.rotationYaw;
   double y = entity.posY + entity.getEyeHeight() - entity.yOffset;
   Vec3 vec3 = Vec3.createVectorHelper(entity.posX, y, entity.posZ);
   float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI);
   float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI);
   float f5 = -MathHelper.cos(-f1 * 0.017453292F);
   float f6 = MathHelper.sin(-f1 * 0.017453292F);
   float f7 = f4 * f5;
   float f8 = f3 * f5;
   double d3 = 5.0D;
   if (entity instanceof EntityPlayerMP) {
     d3 = ((EntityPlayerMP) entity).theItemInWorldManager.getBlockReachDistance();
   }
   Vec3 vec31 = vec3.addVector(f7 * d3, f6 * d3, f8 * d3);
   MovingObjectPosition ret = world.func_147447_a(vec3, vec31, adjacent, !adjacent, false);
   if (ret != null && adjacent) {
     ForgeDirection side = ForgeDirection.getOrientation(ret.sideHit);
     ret.blockX += side.offsetX;
     ret.blockY += side.offsetY;
     ret.blockZ += side.offsetZ;
   }
   return ret;
 }