From d578b7322a12ecf8786c5612d148fcc929b411bf Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 7 Jul 2020 08:50:11 -0700 Subject: [PATCH] Smelting makes use of bonus drops for Second Smelt now Co-authored-by: t00thpick1 --- Changelog.txt | 2 ++ .../nossr50/skills/smelting/SmeltingManager.java | 3 ++- src/main/resources/config.yml | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 4389f8225..e15731aa4 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -14,6 +14,8 @@ Version 2.1.133 Added Sub-Skill named Crossbows Limit Break to Crossbows Permission node descriptions had mentions of ability changed to sub-skill and other minor corrections + Smelting now has a Bonus Drops section in config.yml + Smelting now only doubles smelting results for items which have bonus drop entries in the config (These permissions are all included in the mcmmo.defaults node) New permission node 'mcmmo.commands.tridents' diff --git a/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java b/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java index e36df9787..185fb0e26 100644 --- a/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.skills.smelting; +import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.experience.XPGainReason; import com.gmail.nossr50.datatypes.experience.XPGainSource; import com.gmail.nossr50.datatypes.player.McMMOPlayer; @@ -111,7 +112,7 @@ public class SmeltingManager extends SkillManager { public ItemStack smeltProcessing(ItemStack smelting, ItemStack result) { applyXpGain(Smelting.getResourceXp(smelting), XPGainReason.PVE, XPGainSource.PASSIVE); - if (isSecondSmeltSuccessful()) { + if (Config.getInstance().getDoubleDropsEnabled(PrimarySkillType.SMELTING, result.getType()) && isSecondSmeltSuccessful()) { ItemStack newResult = result.clone(); newResult.setAmount(result.getAmount() + 1); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 2b0f021f6..a53c5f94b 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -549,6 +549,17 @@ Bonus_Drops: Jungle_Log: true Spruce_Wood: true Spruce_Log: true + Smelting: + Iron_Ingot: true + Gold_Ingot: true + Emerald: true + Diamond: true + Lapis_Lazuli: true + Coal: true + Nether_Quartz: true + Quartz: true + Redstone: true + # # Settings for commands