diff --git a/electrical/src/main/scala/resonantinduction/electrical/laser/gun/ItemMiningLaser.java b/electrical/src/main/scala/resonantinduction/electrical/laser/gun/ItemMiningLaser.java index e0b78447..9ace997d 100644 --- a/electrical/src/main/scala/resonantinduction/electrical/laser/gun/ItemMiningLaser.java +++ b/electrical/src/main/scala/resonantinduction/electrical/laser/gun/ItemMiningLaser.java @@ -162,7 +162,7 @@ public class ItemMiningLaser extends ItemElectric { //TODO get the actual hit side from the angle of the ray trace LaserEvent.onLaserHitBlock(player.worldObj, player, new Vector3(hit), ForgeDirection.UP); - player.worldObj.destroyBlockInWorldPartially(0, hit.blockX, hit.blockY, hit.blockZ, time); + player.worldObj.destroyBlockInWorldPartially(player.entityId, hit.blockX, hit.blockY, hit.blockZ, time); } } } @@ -201,7 +201,12 @@ public class ItemMiningLaser extends ItemElectric { if (miningMap.containsKey(player)) { - miningMap.remove(player); + Pair vec = miningMap.get(player); + if(vec != null && vec.left() != null) + { + player.worldObj.destroyBlockInWorldPartially(player.entityId, vec.left().intX(), vec.left().intY(), vec.left().intZ(), -1); + } + miningMap.remove(player); } }