mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-08-18 11:26:06 +00:00
Wire up Verdant Bounty triple drop passive for Herbalism
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user