mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 22:14:05 +09:00
always sorting arraylist; more wire stuffs
This commit is contained in:
@@ -11,7 +11,7 @@ import net.torvald.terrarum.gameworld.fmod
|
||||
*/
|
||||
object LandUtil {
|
||||
fun getBlockAddr(world: GameWorld, x: Int, y: Int): BlockAddress =
|
||||
// coercing and fmod-ing follows ROUNDWORLD rule
|
||||
// coercing and fmod-ing follows ROUNDWORLD rule. See: GameWorld.coerceXY()
|
||||
(world.width * y.coerceIn(0, world.height - 1)).toLong() + x.fmod(world.width)
|
||||
|
||||
fun resolveBlockAddr(world: GameWorld, t: BlockAddress): Pair<Int, Int> =
|
||||
|
||||
Reference in New Issue
Block a user