File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
bukkit/src/main/kotlin/io/github/rothes/esu/bukkit/util Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,16 @@ import kotlinx.coroutines.CompletableDeferred
66import kotlinx.coroutines.withTimeout
77import org.bukkit.Location
88import org.bukkit.World
9+ import kotlin.math.floor
910import kotlin.time.Duration.Companion.seconds
1011
1112object WorldUtils {
1213
1314 suspend fun findSafeSpot (column : Location ): Location ? {
1415 val deferred = CompletableDeferred <Location ?>()
1516 val location = column.clone()
16- location.x + = 0.5
17- location.z + = 0.5
17+ location.x + = floor(location.x) + 0.5
18+ location.z + = floor(location.z) + 0.5
1819 Scheduler .schedule(location) {
1920 val world = requireNotNull(location.world) { " Location world is null" }
2021 val y = if (world.environment == World .Environment .NETHER ) {
You can’t perform that action at this time.
0 commit comments