mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 20:45:28 +02:00
Tree Feller non-wood drop rate reduced by 90%
This commit is contained in:
@@ -34,6 +34,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
//TODO: Seems to not be using the item drop event for bonus drops, may want to change that.. or may not be able to be changed?
|
||||
public class WoodcuttingManager extends SkillManager {
|
||||
@@ -323,10 +324,7 @@ public class WoodcuttingManager extends SkillManager {
|
||||
processBonusDropCheck(blockState);
|
||||
} else if (BlockUtils.isNonWoodPartOfTree(blockState)) {
|
||||
//Drop displaced non-woodcutting XP blocks
|
||||
|
||||
if(RankUtils.hasUnlockedSubskill(player, SubSkillType.WOODCUTTING_KNOCK_ON_WOOD)) {
|
||||
Misc.spawnItemsFromCollection(getPlayer(), Misc.getBlockCenter(blockState), block.getDrops(itemStack), ItemSpawnReason.TREE_FELLER_DISPLACED_BLOCK);
|
||||
|
||||
if(RankUtils.hasReachedRank(2, player, SubSkillType.WOODCUTTING_KNOCK_ON_WOOD)) {
|
||||
if(mcMMO.p.getAdvancedConfig().isKnockOnWoodXPOrbEnabled()) {
|
||||
//TODO: Test the results of this RNG, should be 10%
|
||||
@@ -336,8 +334,10 @@ public class WoodcuttingManager extends SkillManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// 90% of the time do not drop leaf blocks
|
||||
if (ThreadLocalRandom.current().nextInt(100) > 90) {
|
||||
Misc.spawnItemsFromCollection(getPlayer(), Misc.getBlockCenter(blockState), block.getDrops(itemStack), ItemSpawnReason.TREE_FELLER_DISPLACED_BLOCK, 1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user