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:
NuclearW
2013-02-22 11:23:46 -05:00
parent 513a9212e4
commit d052d7a3ce
24 changed files with 994 additions and 1037 deletions

View File

@ -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;