Interface Volume

All Known Subinterfaces:
ArchetypeVolume, ArchetypeVolumeCreator, BiomeVolume, BiomeVolume.Immutable, BiomeVolume.Modifiable<M>, BiomeVolume.Mutable, BiomeVolume.Streamable<B>, BiomeVolume.Unmodifiable<U>, BlockEntityArchetypeVolume, BlockEntityArchetypeVolume.Immutable, BlockEntityArchetypeVolume.Modifiable<M>, BlockEntityArchetypeVolume.Mutable, BlockEntityArchetypeVolume.Streamable<B>, BlockEntityArchetypeVolume.Unmodifiable<U>, BlockEntityVolume, BlockEntityVolume.Modifiable<M>, BlockEntityVolume.Mutable, BlockEntityVolume.Streamable<T>, BlockEntityVolume.Unmodifiable<U>, BlockVolume, BlockVolume.Immutable, BlockVolume.Modifiable<M>, BlockVolume.Mutable, BlockVolume.Streamable<B>, BlockVolume.Unmodifiable<U>, Chunk<P>, ChunkVolume, ClientWorld, EntityArchetypeVolume, EntityArchetypeVolume.Immutable, EntityArchetypeVolume.Modifiable<M>, EntityArchetypeVolume.Mutable, EntityArchetypeVolume.Streamable<B>, EntityArchetypeVolume.Unmodifiable<U>, EntityVolume, EntityVolume.Immutable, EntityVolume.Modifiable<M>, EntityVolume.Mutable, EntityVolume.Streamable<E>, EntityVolume.Unmodifiable<U>, EnvironmentalVolume, GenerationChunk, GenerationRegion, ImmutableVolume, InteractableVolume, MutableVolume, PhysicsAwareMutableBlockVolume<P>, PrimitiveGameVolume, Region<R>, Schematic, ServerWorld, TrackedVolume, UnmodifiableVolume, UnrealizedBiomeVolume<B>, UnrealizedBiomeVolume.Immutable, UnrealizedBiomeVolume.Modifiable<B,​MB>, UnrealizedBiomeVolume.Mutable, UnrealizedBiomeVolume.Streamable<B,​BU>, UnrealizedBiomeVolume.Unmodifiable<U,​BU>, UpdatableVolume, Virtualized<T,​R>, Virtualized.Immutable, Virtualized.Mutable<T,​M,​MU>, Virtualized.Streamable<T,​B,​S>, Virtualized.Unmodifiable<T,​U,​RU>, WeatherAwareVolume, World<W,​L>, WorldChunk, WorldLike<P>

public interface Volume
A volume is a bounded cuboid that is a view to some collection of objects with position. Such a cuboid is always aligned along the cartesian axes in 3D space with the bounds specified in block-position space.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    available​(Vector3i position)
    Returns true if contains(Vector3i) is true and the backing data is actually loaded - e.g.
    boolean
    contains​(int x, int y, int z)
    Returns true if the supplied co-ordinate is valid within this volume.
    default boolean
    contains​(Vector3i position)
    Returns true if the supplied co-ordinate is valid within this volume.
    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.
    max()
    The maximum valid position in this volume.
    min()
    The minimum valid position in this volume.
    default Vector3i
    The size of this region, defined as the difference between max() and min(), plus Vector3i.ONE.
  • Method Details

    • 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.