Class MultiRegionExtent

All Implemented Interfaces:
IBatchProcessor, Extent, InputExtent, OutputExtent, Serializable

public class MultiRegionExtent extends FaweRegionExtent
See Also:
  • Constructor Details

    • MultiRegionExtent

      public MultiRegionExtent(Extent extent, FaweLimit limit, @Nullable Region[] allowed, @Nullable Region[] disallowed)
      Create a new instance. Has both allowed and disallowed regions. Assumes that disallowed regions are encompassed by allowed regions.
      Parameters:
      extent - the extent
      limit - the limit to be used
      allowed - the allowed regions or null for global editing
      disallowed - the disallowed regions or null for no disallowed regions
  • Method Details

    • contains

      public boolean contains(int x, int y, int z)
      Description copied from interface: Extent
      Returns true if the extent contains the given position
      Specified by:
      contains in interface Extent
      Specified by:
      contains in class FaweRegionExtent
      Parameters:
      x - position x
      y - position y
      z - position z
      Returns:
      if position is contained
    • contains

      public boolean contains(int x, int z)
      Specified by:
      contains in class FaweRegionExtent
    • getRegions

      public Collection<Region> getRegions()
      Get all allowed regions
      Specified by:
      getRegions in class FaweRegionExtent
    • processGet

      public boolean processGet(int chunkX, int chunkZ)
    • processSet

      public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set)
      Description copied from interface: IBatchProcessor
      Process a chunk that has been set.
    • postProcessSet

      public Future<?> postProcessSet(IChunk chunk, IChunkGet get, IChunkSet set)
      Description copied from interface: IBatchProcessor
      Post-process a chunk that has been edited. Set should NOT be modified here, changes will NOT be flushed to the world, but MAY be flushed to history. Defaults to nothing as most Processors will not use it. Post-processors that are not technically blocking should override this method to allow post-processors to become blocking if required.
    • postProcess

      public void postProcess(IChunk chunk, IChunkGet get, IChunkSet set)
      Description copied from interface: IBatchProcessor
      Post-process a chunk that has been edited. Set should NOT be modified here, changes will NOT be flushed to the world, but MAY be flushed to history. Defaults to nothing as most Processors will not use it. If the post-processor will run tasks asynchronously/not be blocking, use IBatchProcessor.postProcessSet(IChunk, IChunkGet, IChunkSet) to return a Future.