Interface Extent

All Superinterfaces:
InputExtent, OutputExtent
All Known Subinterfaces:
Clipboard, ReorderingExtent, World
All Known Implementing Classes:
AbstractBufferingExtent, AbstractDelegateExtent, AbstractWorld, BiomeQuirkExtent, BlockArrayClipboard, BlockBagExtent, BlockChangeLimiter, BlockQuirkExtent, BlockTransformExtent, ChangeSetExtent, ChunkBatchingExtent, ChunkLoadingExtent, DataValidatorExtent, EditSession, ExtentBuffer, ForgetfulExtentBuffer, LastAccessExtentCache, MaskingExtent, MultiStageReorder, NullExtent, NullWorld, RequestExtent, SideEffectExtent, SurvivalModeExtent, TracingExtent, WatchdogTickingExtent

public interface Extent extends InputExtent, OutputExtent
A world, portion of a world, clipboard, or other object that can have blocks set or entities placed.
See Also:
  • Method Details

    • getMinimumPoint

      BlockVector3 getMinimumPoint()
      Get the minimum point in the extent.

      If the extent is unbounded, then a large (negative) value may be returned.

      Returns:
      the minimum point
    • getMaximumPoint

      BlockVector3 getMaximumPoint()
      Get the maximum point in the extent.

      If the extent is unbounded, then a large (positive) value may be returned.

      Returns:
      the maximum point
    • getEntities

      List<? extends Entity> getEntities(Region region)
      Get a list of all entities within the given region.

      If the extent is not wholly loaded (i.e. a world being simulated in the game will not have every chunk loaded), then this list may not be incomplete.

      Parameters:
      region - the region in which entities must be contained
      Returns:
      a list of entities
    • getEntities

      List<? extends Entity> getEntities()
      Get a list of all entities.

      If the extent is not wholly loaded (i.e. a world being simulated in the game will not have every chunk loaded), then this list may not be incomplete.

      Returns:
      a list of entities
    • createEntity

      @Nullable Entity createEntity(Location location, BaseEntity entity)
      Create an entity at the given location.
      Parameters:
      entity - the entity
      location - the location
      Returns:
      a reference to the created entity, or null if the entity could not be created