From 9e811d32f30b4b48bc462097e33b5fb324f519fc Mon Sep 17 00:00:00 2001 From: chronosacaria Date: Wed, 14 Feb 2024 13:48:13 -0500 Subject: [PATCH] Fixed Default Config Value Mistakes, Notes, Version Bump - Fixed the following enchantments to properly show up in RandomSelection and the Enchanting Table - Shockwave - Smiting - Soul Devourer - Soul Siphon - Stunning - Swirling - Tempo Theft - Thundering - Weakening - Fixed the following enchantments to show up in the Enchanting Table - Void Shot - Void Strike - Wild Rage - Added notes to explain the values in the config - Clarified the formula for Enigma Resonator in the notes --- gradle.properties | 2 +- .../mcdw/configs/McdwEnchantmentsConfig.java | 75 +++++++++++++------ 2 files changed, 54 insertions(+), 23 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5aace66d..6924f831 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.14.21 # Mod Properties - mod_version=9.0.0 + mod_version=9.0.1 maven_group=chronosacaria archives_base_name=mcdw diff --git a/src/main/java/chronosacaria/mcdw/configs/McdwEnchantmentsConfig.java b/src/main/java/chronosacaria/mcdw/configs/McdwEnchantmentsConfig.java index 55220657..20e10ea8 100644 --- a/src/main/java/chronosacaria/mcdw/configs/McdwEnchantmentsConfig.java +++ b/src/main/java/chronosacaria/mcdw/configs/McdwEnchantmentsConfig.java @@ -12,12 +12,43 @@ public class McdwEnchantmentsConfig implements ConfigData { @Comment(""" + A slider value for damage modifying enchantments: Ambush, Critical Hit, Void Strike, Pain Cycle, Enigma Resonator, Dynamo, Shadow Form, Enigma Shot, Growing, Void Shot, Overcharge, Committed and Hunter's Promise. """) public float directDamageEnchantmentMultiplier = 1.0f; + @Comment(""" + + Some notes to make sense of the config, below: + + offset: This is a value that is unique to certain enchantments. What it does will be + explained in the "comment" section that is related to the enchantment. + + isEnabled: Whether the enchantment is on or off. If set to "false", the enchantment + will not be possible to obtain in any way. + + isAvailableForEnchantedBookOffer: Whether the enchantment can be sold by villagers. + If set to "false", this means that Librarian villagers will not sell this + enchantment. + + isAvailableForRandomSelection: Whether the enchantment can be found as random loot or + obtained through the Enchanting Table. If set to "false", this means that the + enchantment will not be available via the Enchanting Table nor will it + generate as loot that is found in the world. + + maxLevel: This is an integer (whole number) value that tells the game what the max + level the enchantment can be. The value for most enchantments in Minecraft + range from 1 to 5. Most MCDX enchantments are up to level 3 and whilst it + is possible to set this value above 3, it can have some unexpected results. + + procChance: Some enchantments trigger on a chance. Whilst this number is not a percentage + the higher the number, the more likely the enchantment is to trigger. + Therefore, if the procChance is set to 20, it is more likely to trigger than + if the procChance is set to 10. It is best to experiment with these values + if you plan to change them to see what works best for you. + """) public final LinkedHashMap ENCHANTMENT_CONFIG = new LinkedHashMap<>(); public McdwEnchantmentsConfig(){ @@ -185,7 +216,7 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.ENIGMA_RESONATOR, new EnchantmentIDConfigHelper( List.of("Effect Offset: Damage Divisor,", - "Formula: Math.max((Math.log(numSouls * level + 20) / offset) - 1, 0)", + "Formula: max((log_e(numSouls * level + 20) / offset) - 1, 0)", "Offset Note: higher offset = less damage,", "Default: 3.25f" ), @@ -456,8 +487,8 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.SHOCKWAVE, new EnchantmentIDConfigHelper( true, - false, - false, + true, + true, 3, 10 ) @@ -466,8 +497,8 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.SMITING, new EnchantmentIDConfigHelper( true, - false, - false, + true, + true, 3, null ) @@ -481,8 +512,8 @@ public McdwEnchantmentsConfig(){ "Default: 3.0f" ), true, - false, - false, + true, + true, 3, null, 3.0f @@ -492,8 +523,8 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.SOUL_SIPHON, new EnchantmentIDConfigHelper( true, - false, - false, + true, + true, 3, 10 ) @@ -502,8 +533,8 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.STUNNING, new EnchantmentIDConfigHelper( true, - false, - false, + true, + true, 3, 20 ) @@ -512,8 +543,8 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.SWIRLING, new EnchantmentIDConfigHelper( true, - false, - false, + true, + true, 3, 10 ) @@ -522,8 +553,8 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.TEMPO_THEFT, new EnchantmentIDConfigHelper( true, - false, - false, + true, + true, 3, null ) @@ -532,8 +563,8 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.THUNDERING, new EnchantmentIDConfigHelper( true, - false, - false, + true, + true, 3, 20 ) @@ -543,7 +574,7 @@ public McdwEnchantmentsConfig(){ new EnchantmentIDConfigHelper( true, false, - false, + true, 3, 25 ) @@ -553,7 +584,7 @@ public McdwEnchantmentsConfig(){ new EnchantmentIDConfigHelper( true, false, - false, + true, 3, 15 ) @@ -562,8 +593,8 @@ public McdwEnchantmentsConfig(){ EnchantmentsID.WEAKENING, new EnchantmentIDConfigHelper( true, - false, - false, + true, + true, 3, 30 ) @@ -573,7 +604,7 @@ public McdwEnchantmentsConfig(){ new EnchantmentIDConfigHelper( true, false, - false, + true, 3, 10 )