mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Revert blast mining nerf
This commit is contained in:
parent
74f8c2901d
commit
c5ce7bd23b
@ -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
|
||||
|
@ -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,17 +181,18 @@ 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
|
||||
|
||||
if (!mcMMO.getPlaceStore().isTrue(blockState)) {
|
||||
for (int i = 1; i < dropMultiplier; i++) {
|
||||
if(RandomUtils.nextInt(100) >= 75)
|
||||
Mining.handleSilkTouchDrops(blockState); // Bonus drops - should drop the block & not the items
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Replace the event blocklist with the newYield list
|
||||
event.setYield(0F);
|
||||
|
Loading…
Reference in New Issue
Block a user