Revert blast mining nerf

This commit is contained in:
nossr50 2020-05-05 19:19:20 -07:00
parent 74f8c2901d
commit c5ce7bd23b
2 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,6 @@
Version 2.1.128
The first rank of Iron Arm for Unarmed now only gives 1.5 bonus damage instead of 4 (other ranks are the same as before)
Blast Mining nerf reverted
Version 2.1.127

View File

@ -161,12 +161,12 @@ public class MiningManager extends SkillManager {
List<BlockState> ores = new ArrayList<BlockState>();
List<Block> notOres = new ArrayList<>();
// List<Block> notOres = new ArrayList<>();
for (Block targetBlock : event.blockList()) {
//Containers usually have 0 XP unless someone edited their config in a very strange way
if (ExperienceConfig.getInstance().getXp(PrimarySkillType.MINING, targetBlock) == 0 || targetBlock instanceof Container || mcMMO.getPlaceStore().isTrue(targetBlock)) {
notOres.add(targetBlock);
} else {
if (ExperienceConfig.getInstance().getXp(PrimarySkillType.MINING, targetBlock) != 0
&& !(targetBlock instanceof Container)
&& !mcMMO.getPlaceStore().isTrue(targetBlock)) {
ores.add(targetBlock.getState());
}
}
@ -181,14 +181,15 @@ public class MiningManager extends SkillManager {
// float debrisYield = yield - debrisReduction;
for (BlockState blockState : ores) {
if (RandomUtils.nextInt(ores.size()) >= (ores.size() / 2)) {
if (RandomUtils.nextFloat() >= (yield + getOreBonus())) {
xp += Mining.getBlockXp(blockState);
Misc.dropItem(Misc.getBlockCenter(blockState), new ItemStack(blockState.getType())); // Initial block that would have been dropped
for (int i = 1; i < dropMultiplier; i++) {
if(RandomUtils.nextInt(100) >= 75)
if (!mcMMO.getPlaceStore().isTrue(blockState)) {
for (int i = 1; i < dropMultiplier; i++) {
Mining.handleSilkTouchDrops(blockState); // Bonus drops - should drop the block & not the items
}
}
}
}