Interface Volume

    • Method Detail

      • min

        Vector3i min()
        The minimum valid position in this volume.
        Returns:
        The minimum valid position
      • max

        Vector3i max()
        The maximum valid position in this volume.
        Returns:
        The maximum valid position
      • size

        default Vector3i size()
        The size of this region, defined as the difference between max() and min(), plus Vector3i.ONE.
        Returns:
        The size of the volume.
      • contains

        default boolean contains​(Vector3i position)
        Returns true if the supplied co-ordinate is valid within this volume. This is defined as {min() <= (x, y, z) >= max()
        Parameters:
        position - The position to check
        Returns:
        Whether or not the position is within this volume
      • contains

        boolean contains​(int x,
                         int y,
                         int z)
        Returns true if the supplied co-ordinate is valid within this volume. This is defined as {min() <= (x, y, z) >= max()
        Parameters:
        x - The X coordinate to check
        y - The Y coordinate to check
        z - The Z coordinate to check
        Returns:
        Whether or not the position is within this volume
      • available

        default boolean available​(Vector3i position)
        Returns true if contains(Vector3i) is true and the backing data is actually loaded - e.g. for a ServerWorld, this will only return true if the WorldChunk that contains this co-ordinate is fully loaded.
        Parameters:
        position - The position to check
        Returns:
        Whether or not the position is within this volume and the location is loaded.
      • isAreaAvailable

        boolean isAreaAvailable​(int x,
                                int y,
                                int z)
        Returns true if contains(int, int, int) is true and the backing data is actually loaded - e.g. for a ServerWorld, this will only return true if the WorldChunk that contains this co-ordinate is fully loaded.
        Parameters:
        x - The X coordinate to check
        y - The Y coordinate to check
        z - The Z coordinate to check
        Returns:
        Whether or not the position is within this volume and the location is loaded.