New methods in ChunkCoord
This commit is contained in:
parent
e9b401f43d
commit
ecc9932f5e
@ -3,6 +3,8 @@ package fr.pandacube.lib.paper.world;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public record ChunkCoord(int x, int z) {
|
||||
|
||||
public ChunkCoord(Chunk c) {
|
||||
@ -21,4 +23,16 @@ public record ChunkCoord(int x, int z) {
|
||||
public Chunk getChunk(World w) {
|
||||
return w.getChunkAt(x, z);
|
||||
}
|
||||
|
||||
public Chunk getChunk(World w, boolean generate) {
|
||||
return w.getChunkAt(x, z, generate);
|
||||
}
|
||||
|
||||
public CompletableFuture<Chunk> getChunkAsync(World w) {
|
||||
return w.getChunkAtAsync(x, z);
|
||||
}
|
||||
|
||||
public CompletableFuture<Chunk> getChunkAsync(World w, boolean generate) {
|
||||
return w.getChunkAtAsync(x, z, generate);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user