<commit_before>package org.runestar.client.game.api

import org.runestar.client.game.api.live.Projections
import java.awt.Point

data class Position(
        val x: Int,
        val subX: Int,
        val y: Int,
        val subY: Int,
        val height: Int,
        val plane: Int
) {
    internal constructor(localX: Int, localY: Int, height: Int, plane: Int) :
            this(localX shr 7, localX and MAX_SUB, localY shr 7, localY and MAX_SUB, height, plane)

    internal val localX get() = (x shl 7) or subX

    internal val localY get() = (y shl 7) or subY

    val sceneTile get() = SceneTile(x, y, plane)

    val isLoaded get() = sceneTile.isLoaded

    internal fun plusLocal(localX: Int = 0, localY: Int = 0, height: Int = 0): Position {
        return Position(localX + this.localX, localY + this.localY, height + this.height, plane)
    }

    operator fun plus(position: Position) =
            Position(position.localX + localX, position.localY + localY, position.height + height, position.plane + plane)

    fun toScreen(projection: Projection = Projections.viewport): Point? {
        check(isLoaded) { this }
        return projection.toScreen(this)
    }

    companion object {
        const val MAX_SUB = 127
        const val MID_SUB = 64
        const val MIN_SUB = 0
    }
}<commit_msg>Add JvmOverloads annotation<commit_after>package org.runestar.client.game.api

import org.runestar.client.game.api.live.Projections
import java.awt.Point

data class Position(
        val x: Int,
        val subX: Int,
        val y: Int,
        val subY: Int,
        val height: Int,
        val plane: Int
) {
    internal constructor(localX: Int, localY: Int, height: Int, plane: Int) :
            this(localX shr 7, localX and MAX_SUB, localY shr 7, localY and MAX_SUB, height, plane)

    internal val localX get() = (x shl 7) or subX

    internal val localY get() = (y shl 7) or subY

    val sceneTile get() = SceneTile(x, y, plane)

    val isLoaded get() = sceneTile.isLoaded

    internal fun plusLocal(localX: Int = 0, localY: Int = 0, height: Int = 0): Position {
        return Position(localX + this.localX, localY + this.localY, height + this.height, plane)
    }

    operator fun plus(position: Position) =
            Position(position.localX + localX, position.localY + localY, position.height + height, position.plane + plane)

    @JvmOverloads
    fun toScreen(projection: Projection = Projections.viewport): Point? {
        check(isLoaded) { this }
        return projection.toScreen(this)
    }

    companion object {
        const val MAX_SUB = 127
        const val MID_SUB = 64
        const val MIN_SUB = 0
    }
}
{'fraction_non_alphanumeric': 0.09797297297297297, 'fraction_numerical': 0.00975975975975976, 'mean_word_length': 2.630790190735695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6719619', 'n_tokens_mistral': 870, 'n_tokens_neox': 825, 'n_words': 269}