-Added getLookPos, which uses the rayCastPos function in IWorld.

IWorld:
-Added getEntitiesNear function with 3 double or one IPos parameter, and a range parameter for checking what entities are near a position.
-Added rayCastPos, for cases where rayCastBlock returns null.
This commit is contained in:
c0508383 committed 2022-07-06 17:51:26 -05:00
1 parent 84958cfd02
commit 6a852d9578
4 files changed
+80 -4

No files matched your search

@@ -100,6 +100,10 @@ public interface IWorld {
IEntity[] getLoadedEntities();
IEntity[] getEntitiesNear(double x, double y, double z, double range);
IEntity[] getEntitiesNear(IPos position, double range);
/**
* Sets the block's tile entity at the given position.
*/
@@ -174,6 +178,10 @@ public interface IWorld {
*/
public IBlock rayCastBlock(IPos startPos, IPos lookVector, int maxDistance);
public IPos rayCastPos(double[] startPos, double[] lookVector, int maxDistance);
public IPos rayCastPos(IPos startPos, IPos lookVector, int maxDistance);
/**
* @param startPos
* @param maxHeight