Added range command for brushes. Thanks Nichts
This commit is contained in:
@@ -302,6 +302,19 @@ public abstract class LocalPlayer {
|
||||
pos.getY() - 1, pos.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the point of the block being looked at. May return null.
|
||||
* Will return the farthest away air block if useLastBlock is true and no other block is found.
|
||||
*
|
||||
* @param range
|
||||
* @param useLastBlock
|
||||
* @return point
|
||||
*/
|
||||
public WorldVector getBlockTrace(int range, boolean useLastBlock) {
|
||||
TargetBlock tb = new TargetBlock(this, range, 0.2);
|
||||
return (useLastBlock ? tb.getAnyTargetBlock() : tb.getTargetBlock());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the point of the block being looked at. May return null.
|
||||
*
|
||||
@@ -309,8 +322,7 @@ public abstract class LocalPlayer {
|
||||
* @return point
|
||||
*/
|
||||
public WorldVector getBlockTrace(int range) {
|
||||
TargetBlock tb = new TargetBlock(this, range, 0.2);
|
||||
return tb.getTargetBlock();
|
||||
return getBlockTrace(range, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user