mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
Tree Feller non-wood drop rate reduced by 90%
This commit is contained in:
parent
377bf1be4d
commit
f051edd03d
@ -323,11 +323,15 @@ public class WoodcuttingManager extends SkillManager {
|
|||||||
//Bonus Drops / Harvest lumber checks
|
//Bonus Drops / Harvest lumber checks
|
||||||
processBonusDropCheck(blockState);
|
processBonusDropCheck(blockState);
|
||||||
} else if (BlockUtils.isNonWoodPartOfTree(blockState)) {
|
} else if (BlockUtils.isNonWoodPartOfTree(blockState)) {
|
||||||
|
// 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);
|
||||||
|
}
|
||||||
|
|
||||||
//Drop displaced non-woodcutting XP blocks
|
//Drop displaced non-woodcutting XP blocks
|
||||||
if(RankUtils.hasUnlockedSubskill(player, SubSkillType.WOODCUTTING_KNOCK_ON_WOOD)) {
|
if(RankUtils.hasUnlockedSubskill(player, SubSkillType.WOODCUTTING_KNOCK_ON_WOOD)) {
|
||||||
if(RankUtils.hasReachedRank(2, player, SubSkillType.WOODCUTTING_KNOCK_ON_WOOD)) {
|
if(RankUtils.hasReachedRank(2, player, SubSkillType.WOODCUTTING_KNOCK_ON_WOOD)) {
|
||||||
if(mcMMO.p.getAdvancedConfig().isKnockOnWoodXPOrbEnabled()) {
|
if(mcMMO.p.getAdvancedConfig().isKnockOnWoodXPOrbEnabled()) {
|
||||||
//TODO: Test the results of this RNG, should be 10%
|
|
||||||
if(ProbabilityUtil.isStaticSkillRNGSuccessful(PrimarySkillType.WOODCUTTING, player, 10)) {
|
if(ProbabilityUtil.isStaticSkillRNGSuccessful(PrimarySkillType.WOODCUTTING, player, 10)) {
|
||||||
int randOrbCount = Math.max(1, Misc.getRandom().nextInt(100));
|
int randOrbCount = Math.max(1, Misc.getRandom().nextInt(100));
|
||||||
Misc.spawnExperienceOrb(blockState.getLocation(), randOrbCount);
|
Misc.spawnExperienceOrb(blockState.getLocation(), randOrbCount);
|
||||||
@ -335,11 +339,6 @@ public class WoodcuttingManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blockState.setType(Material.AIR);
|
blockState.setType(Material.AIR);
|
||||||
|
Loading…
Reference in New Issue
Block a user