Wire up Verdant Bounty triple drop passive for Herbalism

This commit is contained in:
nossr50
2026-05-11 18:48:38 -07:00
parent 807b3e2999
commit eaf8bffb63
2 changed files with 12 additions and 3 deletions

View File

@ -10,6 +10,7 @@ Version 2.2.052
Fixed bug where Smelting Vanilla XP multiplier was not using Skills.Smelting.VanillaXPMultiplier values from advanced.yml
Fixed Fishing skill only working with main-hand fishing rod when fishing
Fixed bug where Block Cracker (Unarmed/Berserk) had no effect on deepslate_bricks, deepslate_tiles, polished_blackstone_bricks, and nether_bricks
Fixed Verdant Bounty (Herbalism) never triggering triple drops — the subskill was defined and displayed but was never checked during block break processing
Fixed bug where mob custom names could be permanently corrupted after healthbar display (see notes)
Fixed bug where vanilla mobs (null custom name) had their name incorrectly restored as an empty string instead of null after healthbar display
Fixed bug where hitting a mob multiple times during the healthbar display window caused the name to restore too early (see notes)

View File

@ -444,15 +444,23 @@ public class HerbalismManager extends SkillManager {
return false;
}
public boolean canUseVerdantBounty() {
return Permissions.canUseSubSkill(getPlayer(), SubSkillType.HERBALISM_VERDANT_BOUNTY);
}
/**
* Mark a block for bonus drops.
* <p>
* Triple drops are awarded when Green Terra is active, or when the Verdant Bounty RNG check
* succeeds. Otherwise, double drops are awarded.
*
* @param block the block to mark
*/
public void markForBonusDrops(Block block) {
//Add metadata to mark this block for double or triple drops
boolean awardTriple = mmoPlayer.getAbilityMode(SuperAbilityType.GREEN_TERRA);
BlockUtils.markDropsAsBonus(block, awardTriple);
final boolean triple = mmoPlayer.getAbilityMode(SuperAbilityType.GREEN_TERRA)
|| (canUseVerdantBounty() && ProbabilityUtil.isSkillRNGSuccessful(
SubSkillType.HERBALISM_VERDANT_BOUNTY, mmoPlayer));
BlockUtils.markDropsAsBonus(block, triple);
}
/**