mirror of
https://github.com/Auxilor/Reforges.git
synced 2026-01-04 15:41:40 +00:00
Updated crit and damage multipliers to work on any form of attack
This commit is contained in:
@@ -15,10 +15,10 @@ public class EffectCritMultiplier extends Effect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
public void onAnyDamage(@NotNull final LivingEntity attacker,
|
||||||
@NotNull final LivingEntity victim,
|
@NotNull final LivingEntity victim,
|
||||||
@NotNull final EntityDamageByEntityEvent event,
|
@NotNull final EntityDamageByEntityEvent event,
|
||||||
@NotNull final JSONConfig config) {
|
@NotNull final JSONConfig config) {
|
||||||
if (attacker.getVelocity().getY() > 0) {
|
if (attacker.getVelocity().getY() > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ public class EffectDamageMultiplier extends Effect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
public void onAnyDamage(@NotNull final LivingEntity attacker,
|
||||||
@NotNull final LivingEntity victim,
|
@NotNull final LivingEntity victim,
|
||||||
@NotNull final EntityDamageByEntityEvent event,
|
@NotNull final EntityDamageByEntityEvent event,
|
||||||
@NotNull final JSONConfig config) {
|
@NotNull final JSONConfig config) {
|
||||||
event.setDamage(event.getDamage() * config.getDouble("multiplier"));
|
event.setDamage(event.getDamage() * config.getDouble("multiplier"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user