mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
tweak and fix salvage result chance
This commit is contained in:
parent
ab6dbe306d
commit
4e21f1a200
@ -1,4 +1,5 @@
|
|||||||
Version 2.1.115
|
Version 2.1.115
|
||||||
|
Fixed a bug where Salvage always gave the best results
|
||||||
Fixed an issue with arrows causing exceptions with players not yet having data loaded
|
Fixed an issue with arrows causing exceptions with players not yet having data loaded
|
||||||
Spectral arrows are now tracked by mcMMO
|
Spectral arrows are now tracked by mcMMO
|
||||||
Use minimum level of salvageable properly
|
Use minimum level of salvageable properly
|
||||||
|
@ -437,8 +437,7 @@ public class HerbalismManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private HashSet<Block> getBrokenChorusBlocks(BlockState originalBreak) {
|
private HashSet<Block> getBrokenChorusBlocks(BlockState originalBreak) {
|
||||||
HashSet<Block> traversedBlocks = grabChorusTreeBrokenBlocksRecursive(originalBreak.getBlock(), new HashSet<>());
|
return grabChorusTreeBrokenBlocksRecursive(originalBreak.getBlock(), new HashSet<>());
|
||||||
return traversedBlocks;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private HashSet<Block> grabChorusTreeBrokenBlocksRecursive(Block currentBlock, HashSet<Block> traversed) {
|
private HashSet<Block> grabChorusTreeBrokenBlocksRecursive(Block currentBlock, HashSet<Block> traversed) {
|
||||||
|
@ -118,8 +118,8 @@ public class SalvageManager extends SkillManager {
|
|||||||
for(int x = 0; x < potentialSalvageYield-1; x++) {
|
for(int x = 0; x < potentialSalvageYield-1; x++) {
|
||||||
|
|
||||||
if(RandomChanceUtil.rollDice(chanceOfSuccess, 100)) {
|
if(RandomChanceUtil.rollDice(chanceOfSuccess, 100)) {
|
||||||
chanceOfSuccess-=2;
|
chanceOfSuccess-=3;
|
||||||
Math.max(chanceOfSuccess, 95);
|
chanceOfSuccess = Math.max(chanceOfSuccess, 90);
|
||||||
|
|
||||||
lotteryResults+=1;
|
lotteryResults+=1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user