Smelting makes use of bonus drops for Second Smelt now

Co-authored-by: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
nossr50 2020-07-07 08:50:11 -07:00
parent 86ee5944bc
commit d578b7322a
3 changed files with 15 additions and 1 deletions

View File

@ -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'

View File

@ -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);

View File

@ -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