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 Type
    Method
    Description
    int
    Return number of positions stored in tracker.
    org.joml.Vector3i
    getPosition(int index)
    Return a previously stored block position.
    boolean
    isTracked(int x, int y, int z)
    Test if a block position is stored in tracker.
    boolean
    track(int x, int y, int z)
    Record a block position in tracker.
    void
    trackNew(int x, int y, int z)
    Record a new block position in tracker.
    void
    untrack(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 and getCount()
      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 coordinate
      y - Y coordinate
      z - 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 coordinate
      y - Y coordinate
      z - Z coordinate
    • isTracked

      boolean isTracked(int x, int y, int z)
      Test if a block position is stored in tracker.
      Parameters:
      x - X coordinate
      y - Y coordinate
      z - 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 coordinate
      y - Y coordinate
      z - Z coordinate