mirror of
https://github.com/Auxilor/Reforges.git
synced 2026-01-03 22:26:33 +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
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
@NotNull final EntityDamageByEntityEvent event,
|
||||
@NotNull final JSONConfig config) {
|
||||
public void onAnyDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
@NotNull final EntityDamageByEntityEvent event,
|
||||
@NotNull final JSONConfig config) {
|
||||
if (attacker.getVelocity().getY() > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ public class EffectDamageMultiplier extends Effect {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMeleeAttack(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
@NotNull final EntityDamageByEntityEvent event,
|
||||
@NotNull final JSONConfig config) {
|
||||
public void onAnyDamage(@NotNull final LivingEntity attacker,
|
||||
@NotNull final LivingEntity victim,
|
||||
@NotNull final EntityDamageByEntityEvent event,
|
||||
@NotNull final JSONConfig config) {
|
||||
event.setDamage(event.getDamage() * config.getDouble("multiplier"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user