You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spigot-chunkmaster/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/ChunkCoordinates.kt

14 lines
384 B
Kotlin

package net.trivernis.chunkmaster.lib.generation
import org.bukkit.Location
import org.bukkit.World
class ChunkCoordinates(val x: Int, val z: Int) {
fun getCenterLocation(world: World): Location {
return Location(world, ((x * 16) + 8).toDouble(), 1.0, ((z * 16) + 8).toDouble())
}
override fun toString(): String {
return "($x, $z)"
}
}