Contents
Interface IBlockTracker
- All Known Implementing Classes:
BlockTracker, CollisionTracker
public interface IBlockTracker
Track, untrack and query (unique) block positions.
- Since:
- 2020-07-18
-
Method Summary
Modifier and TypeMethodDescriptionintgetCount()Return number of positions stored in tracker.org.joml.Vector3igetPosition(int index) Return a previously stored block position.booleanisTracked(int x, int y, int z) Test if a block position is stored in tracker.booleantrack(int x, int y, int z) Record a block position in tracker.voidtrackNew(int x, int y, int z) Record a new block position in tracker.voiduntrack(int x, int y, int z) Remove a block position from tracker if it was stored before.
-
Method Details
-
getPosition
org.joml.Vector3i getPosition(int index) Return a previously stored block position.- Parameters:
index- Index of position to retrieve (between 0 andgetCount()- Returns:
- Block position.
-
getCount
int getCount()Return number of positions stored in tracker.- Returns:
- Number of position stored.
-
track
boolean track(int x, int y, int z) Record a block position in tracker.- Parameters:
x- X coordinatey- Y coordinatez- Z coordinate- Returns:
- True if this position was stored before else false.
-
trackNew
void trackNew(int x, int y, int z) Record a new block position in tracker.There is no check done if the position was previously stored in the tracker. Storing position multiple times will corrupt functionality!
- Parameters:
x- X coordinatey- Y coordinatez- Z coordinate
-
isTracked
boolean isTracked(int x, int y, int z) Test if a block position is stored in tracker.- Parameters:
x- X coordinatey- Y coordinatez- Z coordinate- Returns:
- True if this position was stored before else false.
-
untrack
void untrack(int x, int y, int z) Remove a block position from tracker if it was stored before.- Parameters:
x- X coordinatey- Y coordinatez- Z coordinate
-