mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-19 04:15:14 -04:00
kutil: port nextLong
* this fixes the build and some issues
This commit is contained in:
parent
8bf2daf124
commit
543b999659
@ -19,6 +19,7 @@ import de.bixilon.minosoft.data.registries.ResourceLocation
|
||||
import de.bixilon.minosoft.data.registries.entities.EntityFactory
|
||||
import de.bixilon.minosoft.data.registries.entities.EntityType
|
||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
||||
import de.bixilon.minosoft.util.KUtil.nextLong
|
||||
|
||||
class LightningBolt(connection: PlayConnection, entityType: EntityType, data: EntityData, position: Vec3d) : Entity(connection, entityType, data, position, EntityRotation(0.0f, 0.0f)) {
|
||||
val duration = random.nextLong(100, 250)
|
||||
|
@ -326,7 +326,13 @@ object KUtil {
|
||||
return UUID(random.nextLong(), random.nextLong())
|
||||
}
|
||||
|
||||
fun Random.nextInt(start: Int, end: Int): Int {
|
||||
TODO()
|
||||
@Deprecated("Kutil")
|
||||
fun Random.nextInt(min: Int, max: Int): Int {
|
||||
return nextInt((max - min) + 1) + min
|
||||
}
|
||||
|
||||
@Deprecated("Kutil")
|
||||
fun Random.nextLong(min: Long, max: Long): Long {
|
||||
return nextLong() % (max - min) + min
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user