Skip to content

Commit

Permalink
wait oops no i didnt, now i did
Browse files Browse the repository at this point in the history
  • Loading branch information
CammiePone committed Jan 18, 2024
1 parent 333d1bf commit 0e5ae44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public void effect(@Nullable LivingEntity caster, @Nullable Entity sourceEntity,
double amount = -effects.stream().filter(ArcanusSpellComponents.PULL::is).count() * ArcanusConfig.MovementEffects.PullEffectProperties.basePullAmount * potency;

if(sourceEntity != null) {
if(sourceEntity.equals(caster))
entity.addVelocity(entity.getPos().subtract(sourceEntity.getPos()).normalize().multiply(amount));
else
if(entity.equals(caster))
entity.addVelocity(sourceEntity.getRotationVector().multiply(amount));
else
entity.addVelocity(entity.getPos().subtract(sourceEntity.getPos()).normalize().multiply(amount));

entity.velocityModified = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ public void effect(@Nullable LivingEntity caster, @Nullable Entity sourceEntity,
double amount = effects.stream().filter(ArcanusSpellComponents.PUSH::is).count() * ArcanusConfig.MovementEffects.PushEffectProperties.basePushAmount * potency;

if(sourceEntity != null) {
if(sourceEntity.equals(caster))
entity.addVelocity(sourceEntity.getPos().subtract(entity.getPos()).normalize().multiply(amount));
else
if(entity.equals(caster))
entity.addVelocity(sourceEntity.getRotationVector().multiply(amount));
else
entity.addVelocity(sourceEntity.getPos().subtract(entity.getPos()).normalize().multiply(amount));

entity.velocityModified = true;
}
}
Expand Down

0 comments on commit 0e5ae44

Please sign in to comment.