BlueMap/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/ChunkConsumer.java
Lukas Rieger 16981f2797
Refactor World-Management and Region/Chunk-Loading (#496)
* Implement PackedIntArrayAccess

* First working render with BlueNBT

* Progress converting chunkloaders

* Core rewrite done

* WIP - Restructuring configs and world-map mapping

* WIP - Compiling and starting without exceptions :)

* Fix cave detection

* Ensure configuration backwards compatibility (resolve dimension from configured world if missing)

* Implement support for 1.16+ chunks

* Implement support for 1.15+ chunks

* Implement support for 1.13+ chunks and some fixes

* Also find worlds based on their id again in BlueMapAPI

* Improve autogenerated config names

* Implement equals for all ServerWorld implementations

* Get rid of var usage
2024-02-07 20:43:37 +01:00

31 lines
750 B
Java

package de.bluecolored.bluemap.core.world;
@FunctionalInterface
public interface ChunkConsumer {
default boolean filter(int chunkX, int chunkZ, long lastModified) {
return true;
}
void accept(int chunkX, int chunkZ, Chunk chunk);
@FunctionalInterface
interface ListOnly extends ChunkConsumer {
void accept(int chunkX, int chunkZ, long lastModified);
@Override
default boolean filter(int chunkX, int chunkZ, long lastModified) {
accept(chunkX, chunkZ, lastModified);
return false;
}
@Override
default void accept(int chunkX, int chunkZ, Chunk chunk) {
throw new IllegalStateException("Should never be called.");
}
}
}