Add config change multiplier critical damage value

This commit is contained in:
DoctaEnkoda
2025-01-11 18:58:05 -08:00
committed by granny
parent 27f09e53e0
commit ef8520ee3f
3 changed files with 11 additions and 39 deletions

View File

@@ -32,6 +32,15 @@
this.cooldowns.tick();
this.updatePlayerPose();
if (this.currentImpulseContextResetGraceTime > 0) {
@@ -1264,7 +_,7 @@
flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits
if (flag2) {
damageSource = damageSource.critical(true); // Paper start - critical damage API
- f *= 1.5F;
+ f *= this.level().purpurConfig.playerCriticalDamageMultiplier; // Purpur - Add config change multiplier critical damage value
}
float f2 = f + f1;
@@ -1877,7 +_,23 @@
@Override

View File

@@ -359,6 +359,7 @@ public class PurpurWorldConfig {
public boolean creativeOnePunch = false;
public boolean playerSleepNearMonsters = false;
public boolean playersSkipNight = true;
public double playerCriticalDamageMultiplier = 1.5D;
private void playerSettings() {
if (PurpurConfig.version < 19) {
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
@@ -378,6 +379,7 @@ public class PurpurWorldConfig {
creativeOnePunch = getBoolean("gameplay-mechanics.player.one-punch-in-creative", creativeOnePunch);
playerSleepNearMonsters = getBoolean("gameplay-mechanics.player.sleep-ignore-nearby-mobs", playerSleepNearMonsters);
playersSkipNight = getBoolean("gameplay-mechanics.player.can-skip-night", playersSkipNight);
playerCriticalDamageMultiplier = getDouble("gameplay-mechanics.player.critical-damage-multiplier", playerCriticalDamageMultiplier);
}
public boolean silkTouchEnabled = false;