mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 21:05:06 +00:00
added some doc comments
This commit is contained in:
1 parent
81033e5a9c
commit
0d2011b2ba
2 files changed
+42
-1
No files matched your search
@@ -216,6 +216,10 @@ public class ScriptWorld implements IWorld {
|
||||
return world.canBlockSeeTheSky(x, y, z);
|
||||
}
|
||||
|
||||
public boolean canSeeSky(IPos pos) {
|
||||
return canSeeSky(pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name The name of the player to be returned
|
||||
* @return The Player with name. Null is returned when the player isnt found
|
||||
|
||||
@@ -60,6 +60,12 @@ public interface IWorld {
|
||||
*/
|
||||
public void setBlock(int x, int y, int z, Block block);
|
||||
|
||||
/**
|
||||
* @param x World position x
|
||||
* @param y World position y
|
||||
* @param z World position z
|
||||
* @param block The block to be set
|
||||
*/
|
||||
public void setBlock(int x, int y, int z, IBlock block);
|
||||
|
||||
/**
|
||||
@@ -69,13 +75,44 @@ public interface IWorld {
|
||||
*/
|
||||
public void removeBlock(int x, int y, int z);
|
||||
|
||||
/**
|
||||
* starting at the start position, draw a line in the lookVector direction until a block is detected
|
||||
* @param startPos
|
||||
* @param lookVector should be a normalized direction vector
|
||||
* @param maxDistance
|
||||
* @return the first detected block but null if maxDistance is reached
|
||||
*/
|
||||
public IBlock rayCastBlock(double[] startPos, double[] lookVector, int maxDistance);
|
||||
|
||||
/**
|
||||
* starting at the start position, draw a line in the lookVector direction until a block is detected
|
||||
* @param startPos
|
||||
* @param lookVector will normalize x, y, z to get a direction vector
|
||||
* @param maxDistance
|
||||
* @return the first detected block but null if maxDistance is reached
|
||||
*/
|
||||
public IBlock rayCastBlock(IPos startPos, IPos lookVector, int maxDistance);
|
||||
|
||||
public IPos getNearestAir(IPos pos, int maxHeight);
|
||||
/**
|
||||
* @param startPos
|
||||
* @param maxHeight
|
||||
* @return the position of the closest block of air to startPos
|
||||
*/
|
||||
public IPos getNearestAir(IPos startPos, int maxHeight);
|
||||
|
||||
/**
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @return can the block at this position see the sky or are there no blocks above this one
|
||||
*/
|
||||
public boolean canSeeSky(int x, int y, int z);
|
||||
|
||||
/**
|
||||
* @param pos
|
||||
* @return can the block at this position see the sky or are there no blocks above this one
|
||||
*/
|
||||
public boolean canSeeSky(IPos pos);
|
||||
|
||||
/**
|
||||
* @param name The name of the player to be returned
|
||||
|
||||
Reference in new issue
Block a user