Toggle for kinetic damage

This commit is contained in:
12emin34
2025-01-12 11:51:16 -08:00
committed by granny
parent a5c728eafe
commit 6c32b7a34a
3 changed files with 10 additions and 36 deletions

View File

@@ -109,6 +109,14 @@
}
// CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
@@ -2987,6 +_,7 @@
float f = (float)(d * 10.0 - 3.0);
if (f > 0.0F) {
this.playSound(this.getFallDamageSound((int)f), 1.0F, 1.0F);
+ if (level().purpurConfig.elytraKineticDamage) // Purpur - Toggle for kinetic damage
this.hurt(this.damageSources().flyIntoWall(), f);
}
}
@@ -4396,6 +_,12 @@
? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND)
: slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType());

View File

@@ -181,11 +181,13 @@ public class PurpurWorldConfig {
public double elytraDamageMultiplyBySpeed = 0;
public int elytraDamagePerFireworkBoost = 0;
public int elytraDamagePerTridentBoost = 0;
public boolean elytraKineticDamage = true;
private void elytraSettings() {
elytraDamagePerSecond = getInt("gameplay-mechanics.elytra.damage-per-second", elytraDamagePerSecond);
elytraDamageMultiplyBySpeed = getDouble("gameplay-mechanics.elytra.damage-multiplied-by-speed", elytraDamageMultiplyBySpeed);
elytraDamagePerFireworkBoost = getInt("gameplay-mechanics.elytra.damage-per-boost.firework", elytraDamagePerFireworkBoost);
elytraDamagePerTridentBoost = getInt("gameplay-mechanics.elytra.damage-per-boost.trident", elytraDamagePerTridentBoost);
elytraKineticDamage = getBoolean("gameplay-mechanics.elytra.kinetic-damage", elytraKineticDamage);
}
public int entityLifeSpan = 0;