mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-13 11:41:52 +01:00
Add Point#section
This commit is contained in:
parent
c5728a2df1
commit
48b262fee7
@ -3,6 +3,7 @@ package net.minestom.server.coordinate;
|
||||
import net.minestom.server.instance.block.BlockFace;
|
||||
import net.minestom.server.utils.MathUtils;
|
||||
import net.minestom.server.utils.chunk.ChunkUtils;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@ -75,6 +76,12 @@ public sealed interface Point permits Vec, Pos {
|
||||
return ChunkUtils.getChunkCoordinate(x());
|
||||
}
|
||||
|
||||
@Contract(pure = true)
|
||||
@ApiStatus.Experimental
|
||||
default int section() {
|
||||
return ChunkUtils.getChunkCoordinate(y());
|
||||
}
|
||||
|
||||
@Contract(pure = true)
|
||||
default int chunkZ() {
|
||||
return ChunkUtils.getChunkCoordinate(z());
|
||||
|
Loading…
Reference in New Issue
Block a user