Added a tool that allows a player to place and remove blocks at a distance.

This commit is contained in:
Wizjany
2011-09-18 21:49:45 -04:00
parent 1a6bc6f42c
commit 67a7969cd1
7 changed files with 353 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ import com.sk89q.worldedit.util.TargetBlock;
*
* @author sk89q
*/
public abstract class LocalPlayer {
public abstract class LocalPlayer {
/**
* Server.
*/
@@ -319,7 +319,11 @@ public abstract class LocalPlayer {
TargetBlock tb = new TargetBlock(this, range, 0.2);
return (useLastBlock ? tb.getAnyTargetBlock() : tb.getTargetBlock());
}
public WorldVectorFace getBlockTraceFace(int range, boolean useLastBlock) {
TargetBlock tb = new TargetBlock(this, range, 0.2);
return (useLastBlock ? tb.getAnyTargetBlockFace() : tb.getTargetBlockFace());
}
/**
* Get the point of the block being looked at. May return null.
*