Added particle and sound effects to the single super pickaxe.

This commit is contained in:
TomyLobo 2011-11-28 07:13:59 +01:00
parent 36fbfa409f
commit cc0e39b493
2 changed files with 4 additions and 2 deletions

View File

@ -59,7 +59,6 @@
import com.sk89q.worldedit.LocalWorld;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.Vector2D;
import com.sk89q.worldedit.WorldVector;
import com.sk89q.worldedit.blocks.*;
import com.sk89q.worldedit.EntityType;
import com.sk89q.worldedit.regions.Region;

View File

@ -37,7 +37,8 @@ public boolean actPrimary(ServerInterface server, LocalConfiguration config,
LocalPlayer player, LocalSession session, WorldVector clicked) {
LocalWorld world = clicked.getWorld();
if (world.getBlockType(clicked) == BlockID.BEDROCK
final int blockType = world.getBlockType(clicked);
if (blockType == BlockID.BEDROCK
&& !player.canDestroyBedrock()) {
return true;
}
@ -48,6 +49,8 @@ public boolean actPrimary(ServerInterface server, LocalConfiguration config,
world.setBlockType(clicked, BlockID.AIR);
world.playEffect(clicked, 2001, blockType);
return true;
}