mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 20:56:41 +00:00
Fixed /jumpto and the help for //expand and //contract.
This commit is contained in:
@ -315,6 +315,27 @@ public class WorldEditPlayer {
|
||||
return new Vector(block.getX(), block.getY(), block.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the point of the block being looked at. May return null.
|
||||
*
|
||||
* @param range
|
||||
* @return point
|
||||
*/
|
||||
public Vector getSolidBlockTrace(int range) {
|
||||
HitBlox hitBlox = new HitBlox(player, range, 0.2);
|
||||
Block block = null;
|
||||
|
||||
while (hitBlox.getNextBlock() != null
|
||||
&& BlockType.canPassThrough(hitBlox.getCurBlock().getType()));
|
||||
|
||||
block = hitBlox.getCurBlock();
|
||||
|
||||
if (block == null) {
|
||||
return null;
|
||||
}
|
||||
return new Vector(block.getX(), block.getY(), block.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the player's cardinal direction (N, W, NW, etc.).
|
||||
*
|
||||
|
Reference in New Issue
Block a user