mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Green Thumb (Plants) now fires a SubSkillBlockEvent
This commit is contained in:
parent
1c1abe9a2a
commit
369b34406e
@ -5,9 +5,11 @@ Version 2.1.174
|
||||
Updated fr locale (thanks Elikill58)
|
||||
(API) Added SubSkillBlockEvent for some SubSkill events that have a block (eg: Green Thumb Block events)
|
||||
(API) Green Thumb (Block) now fires a SubSkillBlockEvent which is cancellable
|
||||
(API) Green Thumb (Plant) now fires SubSkillBlockEvent which is cancellable
|
||||
(API) Shroom Thumb now fires a SubSkillBlockEvent which is cancellable
|
||||
|
||||
NOTE: A lot of sub-skills without random chance elements are missing events, this will be cleaned up in the near future. If you need something specific added sooner than that, post a GitHub issue for it and I'll patch it in.
|
||||
I'm likely to separate Green Thumb into two distinct skills in an upcoming patch
|
||||
|
||||
Version 2.1.173
|
||||
The experience orbs dropped by Knock on Wood rank 2 during Tree Feller are now much less frequent but provide more XP
|
||||
|
@ -754,11 +754,16 @@ public class HerbalismManager extends SkillManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(EventUtils.callSubSkillBlockEvent(player, SubSkillType.HERBALISM_GREEN_THUMB, blockState.getBlock()).isCancelled()) {
|
||||
return false;
|
||||
} else {
|
||||
playerInventory.removeItem(seedStack);
|
||||
player.updateInventory(); // Needed until replacement available
|
||||
//Play sound
|
||||
SoundManager.sendSound(player, player.getLocation(), SoundType.ITEM_CONSUMED);
|
||||
return true;
|
||||
}
|
||||
|
||||
// new HerbalismBlockUpdaterTask(blockState).runTaskLater(mcMMO.p, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user