Skip to content

Commit

Permalink
Fix issue Mithion#1217
Browse files Browse the repository at this point in the history
  • Loading branch information
DoomFruit committed Sep 13, 2015
1 parent 8524acb commit 41c95ac
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/java/am2/spell/components/Dig.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,10 @@ public boolean applyEffectBlock(ItemStack stack, World world, int blockx, int bl
if (event.isCanceled()){
return false;
}
ItemStack oldStack = null;
if (caster instanceof EntityPlayer){
block.harvestBlock(world, DummyEntityPlayer.fromEntityLiving(caster), blockx, blocky, blockz, meta);
}else{
block.harvestBlock(world, DummyEntityPlayer.fromEntityLiving(caster), blockx, blocky, blockz, meta);
}
world.setBlockToAir(blockx, blocky, blockz);
block.onBlockHarvested(world, blockx, blocky, blockz, meta, DummyEntityPlayer.fromEntityLiving(caster));
block.removedByPlayer(world, DummyEntityPlayer.fromEntityLiving(caster), blockx, blocky, blockz, true);
block.onBlockDestroyedByPlayer(world, blockx, blocky, blockz, meta);
block.harvestBlock(world, DummyEntityPlayer.fromEntityLiving(caster), blockx, blocky, blockz, meta);

}

Expand Down

0 comments on commit 41c95ac

Please sign in to comment.