Interface BlockEntityVolume
- All Superinterfaces:
BlockVolume
,Volume
- All Known Subinterfaces:
BlockEntityVolume.Modifiable<M>
,BlockEntityVolume.Mutable
,BlockEntityVolume.Streamable<T>
,BlockEntityVolume.Unmodifiable<U>
,Chunk<P>
,ClientWorld
,EnvironmentalVolume
,GenerationChunk
,GenerationRegion
,PrimitiveGameVolume
,Region<R>
,ServerWorld
,World<W,
,L> WorldChunk
,WorldLike<P>
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
static interface
Nested classes/interfaces inherited from interface org.spongepowered.api.world.volume.block.BlockVolume
BlockVolume.Immutable
-
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends BlockEntity>
Return a collection of block entities contained within this volume, possibly only returning block entities only in loaded areas.default Collection<? extends BlockEntity>
blockEntities
(Predicate<? super BlockEntity> filter) Return a collection of block entities contained within this volume, possibly only returning block entities only in loaded areas.Optional<? extends BlockEntity>
blockEntity
(int x, int y, int z) Gets the block entity at the given position, if it exists.default Optional<? extends BlockEntity>
blockEntity
(Vector3i position) Gets the block entity at the given position, if it exists.Methods inherited from interface org.spongepowered.api.world.volume.block.BlockVolume
block, block, fluid, fluid, highestPositionAt, highestYAt, highestYAt
-
Method Details
-
blockEntities
Collection<? extends BlockEntity> blockEntities()Return a collection of block entities contained within this volume, possibly only returning block entities only in loaded areas.For world implementations, only some parts of the world is usually loaded, so this method will only return block entities within those loaded parts.
- Returns:
- A collection of entities
-
blockEntities
Return a collection of block entities contained within this volume, possibly only returning block entities only in loaded areas. The returned block entities are filtered by the givenPredicate
before being returned.For world implementations, only some parts of the world is usually loaded, so this method will only return block entities within those loaded parts.
- Parameters:
filter
- The filter to apply to the returned entities- Returns:
- A collection of filtered entities
-
blockEntity
Gets the block entity at the given position, if it exists.- Parameters:
position
- The position- Returns:
- The block entity, or
Optional.empty()
-
blockEntity
Gets the block entity at the given position, if it exists.- Parameters:
x
- The X positiony
- The Y positionz
- The Z position- Returns:
- The block entity, or
Optional.empty()
-