diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e42542..056e3aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ This changelog covers all recorded changes after `1.0.0`, grouped by release ver ## 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. - 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. diff --git a/src/main/java/net/fretux/ascend/advancement/AscendAdvancements.java b/src/main/java/net/fretux/ascend/advancement/AscendAdvancements.java index fdbdf51..4f7263c 100644 --- a/src/main/java/net/fretux/ascend/advancement/AscendAdvancements.java +++ b/src/main/java/net/fretux/ascend/advancement/AscendAdvancements.java @@ -66,6 +66,7 @@ public final class AscendAdvancements { if (AscendConfig.COMMON.xpPerDamageTaken.get() != 2) changed++; if (AscendConfig.COMMON.xpPerMovement.get() != 1) 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.maxAscendLevel.get() != 20) 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.xpPerMovement.get() >= 250) extremeSources++; if (AscendConfig.COMMON.xpPerPotion.get() >= 250) extremeSources++; + if (AscendConfig.COMMON.xpPerBeneficialEffect.get() >= 250) extremeSources++; return extremeSources >= 4; } diff --git a/src/main/java/net/fretux/ascend/config/AscendConfig.java b/src/main/java/net/fretux/ascend/config/AscendConfig.java index 445697d..bdc4eee 100644 --- a/src/main/java/net/fretux/ascend/config/AscendConfig.java +++ b/src/main/java/net/fretux/ascend/config/AscendConfig.java @@ -6,7 +6,7 @@ import org.apache.commons.lang3.tuple.Pair; public class AscendConfig { public static class Common { public final ForgeConfigSpec.IntValue xpPerMobKill, xpPerBlockBreak, xpPerCraft, xpPerSmelt, - xpPerTrade, xpPerDamageTaken, xpPerMovement, xpPerPotion, pointsPerLevel, + xpPerTrade, xpPerDamageTaken, xpPerMovement, xpPerPotion, xpPerBeneficialEffect, pointsPerLevel, maxAscendLevel, maxAttributePoints; public final ForgeConfigSpec.DoubleValue xpMultiplier, attributeScalingMultiplier; 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); 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); + 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); maxAscendLevel = intValue(builder, "maxAscendLevel", "Maximum Ascend level.", 20, 1, 100); maxAttributePoints = intValue(builder, "maxAttributePoints", "Maximum investment in one attribute.", 100, 1, 1000); diff --git a/src/main/java/net/fretux/ascend/event/ActivityEvents.java b/src/main/java/net/fretux/ascend/event/ActivityEvents.java index a448972..79d8c4b 100644 --- a/src/main/java/net/fretux/ascend/event/ActivityEvents.java +++ b/src/main/java/net/fretux/ascend/event/ActivityEvents.java @@ -222,7 +222,7 @@ public class ActivityEvents { if (player.level().isClientSide) return; if (event.getEffectInstance().getEffect().getCategory() == net.minecraft.world.effect.MobEffectCategory.BENEFICIAL) { player.getCapability(PlayerStatsProvider.PLAYER_STATS).ifPresent(stats -> { - stats.addAscendXP(2); + stats.addAscendXP((int) (AscendConfig.COMMON.xpPerBeneficialEffect.get() * AscendConfig.COMMON.xpMultiplier.get())); PlayerStatsProvider.sync(player); }); }