From 3b7defb105f37b0ce3f4439fdb2fadfae1c2208c Mon Sep 17 00:00:00 2001 From: Penal Buffalo Date: Sat, 22 Oct 2022 23:31:07 -0500 Subject: [PATCH] v3.8.1 b718 * fix mob multiplier merge behavior --- pom.xml | 2 +- .../me/lokka30/levelledmobs/rules/RulesParsingManager.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 60a44f519..3d5b9acc2 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.lokka30 LevelledMobs - 3.8.1 b717 + 3.8.1 b718 jar LevelledMobs The Ultimate RPG Mob Levelling Plugin diff --git a/src/main/java/me/lokka30/levelledmobs/rules/RulesParsingManager.java b/src/main/java/me/lokka30/levelledmobs/rules/RulesParsingManager.java index a4d79feec..e7c26de78 100644 --- a/src/main/java/me/lokka30/levelledmobs/rules/RulesParsingManager.java +++ b/src/main/java/me/lokka30/levelledmobs/rules/RulesParsingManager.java @@ -1377,7 +1377,10 @@ private void parseFineTuning(final @Nullable ConfigurationSection cs) { return defaults; } - final FineTuningAttributes attribs = new FineTuningAttributes(); + final boolean doMerge = ymlHelper.getBoolean(cs, "merge", true); + + final FineTuningAttributes attribs = parsingInfo.allMobMultipliers != null && doMerge ? + parsingInfo.allMobMultipliers : new FineTuningAttributes(); attribs.maxHealth = ymlHelper.getDouble2(cs, "max-health", attribs.maxHealth); attribs.movementSpeed = ymlHelper.getDouble2(cs, "movement-speed", attribs.movementSpeed);