net.minestom.server.utils.chunk.ChunkSupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of minestom-snapshots Show documentation
Show all versions of minestom-snapshots Show documentation
1.20.4 Lightweight Minecraft server
package net.minestom.server.utils.chunk;
import net.minestom.server.instance.Chunk;
import net.minestom.server.instance.Instance;
import org.jetbrains.annotations.NotNull;
/**
* Used to customize which type of {@link Chunk} an implementation should use.
*/
@FunctionalInterface
public interface ChunkSupplier {
/**
* Creates a {@link Chunk} object.
*
* @param instance the linked instance
* @param chunkX the chunk X
* @param chunkZ the chunk Z
* @return a newly {@link Chunk} object, cannot be null
*/
@NotNull Chunk createChunk(@NotNull Instance instance, int chunkX, int chunkZ);
}