mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-10 01:24:44 +02:00
Change from using Block to BlockState in many locations
Convert Herbalism ability to use BlockState instead of Block. Move all block checks back to BlockChecks. Don't need this if we're using BlockState Convert Excavation to BlockState. We don't need to return booleans here because we never edit the block state.Switch ModCheck.getCustomBlock to use BlockState More work on the conversion to BlockState More conversion to BlockState Better way to handle mining drops, I believe. Remove useless imports. A test of making the diff look nicer BlockChecks diff cleanup Herbalism diff cleanup Gotta update the block states here. Moar blockstate. Little more blockState stuff. Even more blockstate.
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package com.gmail.nossr50.skills.smelting;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.inventory.FurnaceBurnEvent;
|
||||
import org.bukkit.event.inventory.FurnaceExtractEvent;
|
||||
import org.bukkit.event.inventory.FurnaceSmeltEvent;
|
||||
@ -60,19 +59,6 @@ public class SmeltingManager extends SkillManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void fluxMining(BlockBreakEvent event) {
|
||||
if (skillLevel < Smelting.fluxMiningUnlockLevel) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Smelting.fluxMiningChance > Misc.getRandom().nextInt(activationChance)) {
|
||||
FluxMiningEventHandler eventHandler = new FluxMiningEventHandler(this, event);
|
||||
eventHandler.processDrops();
|
||||
eventHandler.eventCancellationAndProcessing();
|
||||
eventHandler.sendAbilityMessage();
|
||||
}
|
||||
}
|
||||
|
||||
public void vanillaXPBoost(FurnaceExtractEvent event) {
|
||||
if (skillLevel < Smelting.vanillaXPBoostRank1Level || !Permissions.vanillaXpBoost(mcMMOPlayer.getPlayer(), skill)) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user