Skip to content

Commit

Permalink
reduce evasion radius
Browse files Browse the repository at this point in the history
  • Loading branch information
iron431 committed Dec 10, 2024
1 parent c8c735b commit f9fa664
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ public static boolean doEffect(LivingEntity livingEntity, DamageSource damageSou
double d0 = livingEntity.getX();
double d1 = livingEntity.getY();
double d2 = livingEntity.getZ();
double maxRadius = 18d;
double maxRadius = 12d;
var level = livingEntity.level;
var random = livingEntity.getRandom();

for (int i = 0; i < 16; ++i) {
var minRadius = maxRadius / 2;
Vec3 vec = new Vec3((double) random.nextInt((int) minRadius, (int) maxRadius), 0, 0);
int degrees = random.nextInt(360);
vec = vec.yRot(degrees);
vec = vec.yRot(degrees*Mth.DEG_TO_RAD);

double x = d0 + vec.x;
double y = Mth.clamp(livingEntity.getY() + (double) (livingEntity.getRandom().nextInt((int) maxRadius) - maxRadius / 2), (double) level.getMinBuildHeight(), (double) (level.getMinBuildHeight() + ((ServerLevel) level).getLogicalHeight() - 1));
Expand Down

0 comments on commit f9fa664

Please sign in to comment.