Interface Volume
- All Known Subinterfaces:
ArchetypeVolume
,ArchetypeVolumeCreator
,BiomeVolume
,BiomeVolume.Immutable
,BiomeVolume.Modifiable<M>
,BiomeVolume.Mutable
,BiomeVolume.Streamable<B>
,BiomeVolume.Unmodifiable<U>
,BlockChunk
,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>
,EntityChunk
,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 TypeMethodDescriptiondefault boolean
Returns true ifcontains(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
Returns true if the supplied co-ordinate is valid within this volume.boolean
isAreaAvailable
(int x, int y, int z) Returns true ifcontains(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
size()
-
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
- Returns:
- The size of the volume.
-
contains
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 checky
- The Y coordinate to checkz
- The Z coordinate to check- Returns:
- Whether or not the position is within this volume
-
available
Returns true ifcontains(Vector3i)
is true and the backing data is actually loaded - e.g. for aServerWorld
, this will only return true if theWorldChunk
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 ifcontains(int, int, int)
is true and the backing data is actually loaded - e.g. for aServerWorld
, this will only return true if theWorldChunk
that contains this co-ordinate is fully loaded.- Parameters:
x
- The X coordinate to checky
- The Y coordinate to checkz
- The Z coordinate to check- Returns:
- Whether or not the position is within this volume and the location is loaded.
-