2
0
Эх сурвалжийг харах

Smelting makes use of bonus drops for Second Smelt now

Co-authored-by: t00thpick1 <t00thpick1dirko@gmail.com>
nossr50 5 жил өмнө
parent
commit
d578b7322a

+ 2 - 0
Changelog.txt

@@ -14,6 +14,8 @@ Version 2.1.133
     Added Sub-Skill named Crossbows Limit Break to Crossbows
     Added Sub-Skill named Crossbows Limit Break to Crossbows
 
 
     Permission node descriptions had mentions of ability changed to sub-skill and other minor corrections
     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)
     (These permissions are all included in the mcmmo.defaults node)
     New permission node 'mcmmo.commands.tridents'
     New permission node 'mcmmo.commands.tridents'

+ 2 - 1
src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java

@@ -1,5 +1,6 @@
 package com.gmail.nossr50.skills.smelting;
 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.XPGainReason;
 import com.gmail.nossr50.datatypes.experience.XPGainSource;
 import com.gmail.nossr50.datatypes.experience.XPGainSource;
 import com.gmail.nossr50.datatypes.player.McMMOPlayer;
 import com.gmail.nossr50.datatypes.player.McMMOPlayer;
@@ -111,7 +112,7 @@ public class SmeltingManager extends SkillManager {
     public ItemStack smeltProcessing(ItemStack smelting, ItemStack result) {
     public ItemStack smeltProcessing(ItemStack smelting, ItemStack result) {
         applyXpGain(Smelting.getResourceXp(smelting), XPGainReason.PVE, XPGainSource.PASSIVE);
         applyXpGain(Smelting.getResourceXp(smelting), XPGainReason.PVE, XPGainSource.PASSIVE);
 
 
-        if (isSecondSmeltSuccessful()) {
+        if (Config.getInstance().getDoubleDropsEnabled(PrimarySkillType.SMELTING, result.getType()) && isSecondSmeltSuccessful()) {
             ItemStack newResult = result.clone();
             ItemStack newResult = result.clone();
 
 
             newResult.setAmount(result.getAmount() + 1);
             newResult.setAmount(result.getAmount() + 1);

+ 11 - 0
src/main/resources/config.yml

@@ -549,6 +549,17 @@ Bonus_Drops:
         Jungle_Log: true
         Jungle_Log: true
         Spruce_Wood: true
         Spruce_Wood: true
         Spruce_Log: 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
 #  Settings for commands