mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
parent
3ea845cfd9
commit
522b085499
@ -9,6 +9,7 @@ Key:
|
||||
|
||||
Version 1.5.02-dev
|
||||
+ Added option to config.yml for Chimaera Wings to stop using bed spawn points
|
||||
= Fixed bug where no Mining XP was granted when Flux Mining was successful
|
||||
! Changed Flux Mining mechanics. In order to use the ability, you need to infuse a pickaxe with furnace powers first.
|
||||
|
||||
Version 1.5.01
|
||||
|
@ -17,7 +17,7 @@ public class Mining {
|
||||
*
|
||||
* @param blockState The {@link BlockState} to check ability activation for
|
||||
*/
|
||||
protected static int getBlockXp(BlockState blockState) {
|
||||
public static int getBlockXp(BlockState blockState) {
|
||||
Material blockType = blockState.getType();
|
||||
int xp = ExperienceConfig.getInstance().getXp(SkillType.MINING, blockType != Material.GLOWING_REDSTONE_ORE ? blockType : Material.REDSTONE_ORE);
|
||||
|
||||
|
@ -22,6 +22,7 @@ import com.gmail.nossr50.datatypes.skills.XPGainReason;
|
||||
import com.gmail.nossr50.events.skills.secondaryabilities.SecondaryAbilityWeightedActivationCheckEvent;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillManager;
|
||||
import com.gmail.nossr50.skills.mining.Mining;
|
||||
import com.gmail.nossr50.skills.smelting.Smelting.Tier;
|
||||
import com.gmail.nossr50.util.BlockUtils;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
@ -73,6 +74,9 @@ public class SmeltingManager extends SkillManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We need to distribute Mining XP here, because the block break event gets cancelled
|
||||
applyXpGain(Mining.getBlockXp(blockState), XPGainReason.PVE);
|
||||
|
||||
SkillUtils.handleDurabilityChange(getPlayer().getItemInHand(), Config.getInstance().getAbilityToolDamage());
|
||||
|
||||
Misc.dropItems(blockState.getLocation(), item, isSecondSmeltSuccessful() ? 2 : 1);
|
||||
|
Loading…
Reference in New Issue
Block a user