Interface IDelegateFilter

All Superinterfaces:
Filter
All Known Implementing Classes:
DelegateFilter, LinkedFilter, MaskFilter

public interface IDelegateFilter extends Filter
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    appliesChunk(int chunkX, int chunkZ)
    Checks whether a chunk should be read.
    default boolean
    appliesLayer(IChunk chunk, int layer)
     
    default void
    Make changes to the block here
    - e.g., block.setId(...)
    - Note: Performance is critical here
    default <V extends IChunk>
    V
    applyChunk(V chunk, Region region)
    Do something with the IChunk
    - Return null if you don't want to filter blocks
    - Return the chunk if you do want to filter blocks
    default void
    Do something with the IChunk after block filtering.
    default Filter
    Fork this for use by another thread - Typically filters are simple and don't need to create another copy to be thread safe here
     
    default void
     
     
  • Method Details

    • getParent

      Filter getParent()
    • appliesChunk

      default boolean appliesChunk(int chunkX, int chunkZ)
      Description copied from interface: Filter
      Checks whether a chunk should be read.
      Specified by:
      appliesChunk in interface Filter
      Parameters:
      chunkX - the x coordinate in the chunk
      chunkZ - the z coordinate in the chunk
    • applyChunk

      default <V extends IChunk> V applyChunk(V chunk, @Nullable Region region)
      Description copied from interface: Filter
      Do something with the IChunk
      - Return null if you don't want to filter blocks
      - Return the chunk if you do want to filter blocks
      Specified by:
      applyChunk in interface Filter
    • appliesLayer

      default boolean appliesLayer(IChunk chunk, int layer)
      Specified by:
      appliesLayer in interface Filter
    • applyBlock

      default void applyBlock(FilterBlock block)
      Description copied from interface: Filter
      Make changes to the block here
      - e.g., block.setId(...)
      - Note: Performance is critical here
      Specified by:
      applyBlock in interface Filter
    • finishChunk

      default void finishChunk(IChunk chunk)
      Description copied from interface: Filter
      Do something with the IChunk after block filtering.
      Specified by:
      finishChunk in interface Filter
    • join

      default void join()
      Specified by:
      join in interface Filter
    • fork

      default Filter fork()
      Description copied from interface: Filter
      Fork this for use by another thread - Typically filters are simple and don't need to create another copy to be thread safe here
      Specified by:
      fork in interface Filter
      Returns:
      this
    • newInstance

      Filter newInstance(Filter other)