-
Method Summary
default boolean
Checks whether a chunk should be read.
default boolean
default void
Make changes to the block here
- e.g., block.setId(...)
- Note: Performance is
critical here
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.
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
-
-
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
-
-
applyBlock
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
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
-