add xpPerBeneficialEffect config option
This commit is contained in:
@@ -4,6 +4,7 @@ This changelog covers all recorded changes after `1.0.0`, grouped by release ver
|
|||||||
|
|
||||||
## 3.1.1
|
## 3.1.1
|
||||||
|
|
||||||
|
- Added an `xpPerBeneficialEffect` config option for Ascend XP awarded when a beneficial effect is applied.
|
||||||
- Refined the Stats screen with charcoal and iron surfaces, consistent neutral attribute cards, and a shared muted accent instead of screen-only attribute colors.
|
- Refined the Stats screen with charcoal and iron surfaces, consistent neutral attribute cards, and a shared muted accent instead of screen-only attribute colors.
|
||||||
- Reserved gold for level and XP progression and green for available points, with an aligned progression header and a separate XP bar and label.
|
- Reserved gold for level and XP progression and green for available points, with an aligned progression header and a separate XP bar and label.
|
||||||
- Added distinct 12-pixel attribute icons and stronger name/description contrast while retaining the two-column layout, native Minecraft buttons, and darkened world backdrop.
|
- Added distinct 12-pixel attribute icons and stronger name/description contrast while retaining the two-column layout, native Minecraft buttons, and darkened world backdrop.
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ public final class AscendAdvancements {
|
|||||||
if (AscendConfig.COMMON.xpPerDamageTaken.get() != 2) changed++;
|
if (AscendConfig.COMMON.xpPerDamageTaken.get() != 2) changed++;
|
||||||
if (AscendConfig.COMMON.xpPerMovement.get() != 1) changed++;
|
if (AscendConfig.COMMON.xpPerMovement.get() != 1) changed++;
|
||||||
if (AscendConfig.COMMON.xpPerPotion.get() != 3) changed++;
|
if (AscendConfig.COMMON.xpPerPotion.get() != 3) changed++;
|
||||||
|
if (AscendConfig.COMMON.xpPerBeneficialEffect.get() != 2) changed++;
|
||||||
if (AscendConfig.COMMON.pointsPerLevel.get() != 15) changed++;
|
if (AscendConfig.COMMON.pointsPerLevel.get() != 15) changed++;
|
||||||
if (AscendConfig.COMMON.maxAscendLevel.get() != 20) changed++;
|
if (AscendConfig.COMMON.maxAscendLevel.get() != 20) changed++;
|
||||||
if (AscendConfig.COMMON.maxAttributePoints.get() != 100) changed++;
|
if (AscendConfig.COMMON.maxAttributePoints.get() != 100) changed++;
|
||||||
@@ -85,6 +86,7 @@ public final class AscendAdvancements {
|
|||||||
if (AscendConfig.COMMON.xpPerDamageTaken.get() >= 250) extremeSources++;
|
if (AscendConfig.COMMON.xpPerDamageTaken.get() >= 250) extremeSources++;
|
||||||
if (AscendConfig.COMMON.xpPerMovement.get() >= 250) extremeSources++;
|
if (AscendConfig.COMMON.xpPerMovement.get() >= 250) extremeSources++;
|
||||||
if (AscendConfig.COMMON.xpPerPotion.get() >= 250) extremeSources++;
|
if (AscendConfig.COMMON.xpPerPotion.get() >= 250) extremeSources++;
|
||||||
|
if (AscendConfig.COMMON.xpPerBeneficialEffect.get() >= 250) extremeSources++;
|
||||||
return extremeSources >= 4;
|
return extremeSources >= 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import org.apache.commons.lang3.tuple.Pair;
|
|||||||
public class AscendConfig {
|
public class AscendConfig {
|
||||||
public static class Common {
|
public static class Common {
|
||||||
public final ForgeConfigSpec.IntValue xpPerMobKill, xpPerBlockBreak, xpPerCraft, xpPerSmelt,
|
public final ForgeConfigSpec.IntValue xpPerMobKill, xpPerBlockBreak, xpPerCraft, xpPerSmelt,
|
||||||
xpPerTrade, xpPerDamageTaken, xpPerMovement, xpPerPotion, pointsPerLevel,
|
xpPerTrade, xpPerDamageTaken, xpPerMovement, xpPerPotion, xpPerBeneficialEffect, pointsPerLevel,
|
||||||
maxAscendLevel, maxAttributePoints;
|
maxAscendLevel, maxAttributePoints;
|
||||||
public final ForgeConfigSpec.DoubleValue xpMultiplier, attributeScalingMultiplier;
|
public final ForgeConfigSpec.DoubleValue xpMultiplier, attributeScalingMultiplier;
|
||||||
public final ForgeConfigSpec.IntValue softCap1, softCap2, softCap3, softCap4;
|
public final ForgeConfigSpec.IntValue softCap1, softCap2, softCap3, softCap4;
|
||||||
@@ -27,6 +27,7 @@ public class AscendConfig {
|
|||||||
xpPerDamageTaken = intValue(builder, "xpPerDamageTaken", "Ascend XP gained from dangerous survival conditions.", 2, 0, 1000);
|
xpPerDamageTaken = intValue(builder, "xpPerDamageTaken", "Ascend XP gained from dangerous survival conditions.", 2, 0, 1000);
|
||||||
xpPerMovement = intValue(builder, "xpPerMovement", "Ascend XP gained for movement activities.", 1, 0, 1000);
|
xpPerMovement = intValue(builder, "xpPerMovement", "Ascend XP gained for movement activities.", 1, 0, 1000);
|
||||||
xpPerPotion = intValue(builder, "xpPerPotion", "Ascend XP gained for potion use.", 3, 0, 1000);
|
xpPerPotion = intValue(builder, "xpPerPotion", "Ascend XP gained for potion use.", 3, 0, 1000);
|
||||||
|
xpPerBeneficialEffect = intValue(builder, "xpPerBeneficialEffect", "Ascend XP gained when a beneficial effect is applied.", 2, 0, 1000);
|
||||||
pointsPerLevel = intValue(builder, "pointsPerLevel", "Attribute points gained per Ascend level.", 15, 1, 1000);
|
pointsPerLevel = intValue(builder, "pointsPerLevel", "Attribute points gained per Ascend level.", 15, 1, 1000);
|
||||||
maxAscendLevel = intValue(builder, "maxAscendLevel", "Maximum Ascend level.", 20, 1, 100);
|
maxAscendLevel = intValue(builder, "maxAscendLevel", "Maximum Ascend level.", 20, 1, 100);
|
||||||
maxAttributePoints = intValue(builder, "maxAttributePoints", "Maximum investment in one attribute.", 100, 1, 1000);
|
maxAttributePoints = intValue(builder, "maxAttributePoints", "Maximum investment in one attribute.", 100, 1, 1000);
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ public class ActivityEvents {
|
|||||||
if (player.level().isClientSide) return;
|
if (player.level().isClientSide) return;
|
||||||
if (event.getEffectInstance().getEffect().getCategory() == net.minecraft.world.effect.MobEffectCategory.BENEFICIAL) {
|
if (event.getEffectInstance().getEffect().getCategory() == net.minecraft.world.effect.MobEffectCategory.BENEFICIAL) {
|
||||||
player.getCapability(PlayerStatsProvider.PLAYER_STATS).ifPresent(stats -> {
|
player.getCapability(PlayerStatsProvider.PLAYER_STATS).ifPresent(stats -> {
|
||||||
stats.addAscendXP(2);
|
stats.addAscendXP((int) (AscendConfig.COMMON.xpPerBeneficialEffect.get() * AscendConfig.COMMON.xpMultiplier.get()));
|
||||||
PlayerStatsProvider.sync(player);
|
PlayerStatsProvider.sync(player);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user