public static boolean hitBox( Location paramLocation, org.bukkit.entity.Entity paramEntity, double paramDouble) { if (UtilMath.offset(paramLocation, paramEntity.getLocation().add(0.0D, 0.4D, 0.0D)) < 0.6D * paramDouble) { return true; } if ((paramEntity instanceof Player)) { Player localPlayer = (Player) paramEntity; if (UtilMath.offset(paramLocation, localPlayer.getEyeLocation()) < 0.4D * paramDouble) { return true; } if (UtilMath.offset2d(paramLocation, localPlayer.getLocation()) < 0.6D * paramDouble) { if ((paramLocation.getY() > localPlayer.getLocation().getY()) && (paramLocation.getY() < localPlayer.getEyeLocation().getY())) { return true; } } } else if ((paramEntity instanceof Giant)) { if ((paramLocation.getY() > paramEntity.getLocation().getY()) && (paramLocation.getY() < paramEntity.getLocation().getY() + 12.0D) && (UtilMath.offset2d(paramLocation, paramEntity.getLocation()) < 4.0D)) { return true; } } else if ((paramLocation.getY() > paramEntity.getLocation().getY()) && (paramLocation.getY() < paramEntity.getLocation().getY() + 2.0D) && (UtilMath.offset2d(paramLocation, paramEntity.getLocation()) < 0.5D * paramDouble)) { return true; } return false; }