diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
5 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt index b6f096371..239f250a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ConfigUtils.kt @@ -85,7 +85,7 @@ object ConfigUtils { ) } - private fun KMutableProperty0<*>.tryJumpToEditor(editor: MoulConfigEditor<*>): Boolean { + private fun KMutableProperty0<*>.tryJumpToEditor(editor: MoulConfigEditor<*>): Boolean { val option = tryFindEditor(editor) ?: return false editor.search("") if (!editor.goToOption(option)) return false diff --git a/src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt b/src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt index 74345053c..c4de45cbc 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/HolographicEntities.kt @@ -41,7 +41,6 @@ import net.minecraft.entity.passive.EntityVillager import net.minecraft.entity.passive.EntityWolf import org.lwjgl.opengl.GL11 - /** * Utility for creating fake entities without an associated world in order to avoid contaminating the world state. */ @@ -137,7 +136,6 @@ object HolographicEntities { val pig = HolographicBase(EntityPig(null)) val giant = HolographicBase(EntityGiantZombie(null)) - private fun interpolateRotation(last: Float, next: Float, progress: Float): Float { var direction: Float = next - last while (direction < -180.0f) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt index a03795f59..55be8cd3e 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzVec.kt @@ -18,7 +18,6 @@ import kotlin.math.round import kotlin.math.sin import kotlin.math.sqrt - data class LorenzVec( val x: Double, val y: Double, diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt index e2df5349f..d266e80ce 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NumberUtil.kt @@ -248,12 +248,11 @@ object NumberUtil { } } - // Sometimes we just take an L, never find it and forget to write it down val Int.million get() = this * 1_000_000.0 private val Int.billion get() = this * 1_000_000_000.0 val Double.million get() = (this * 1_000_000.0).toLong() - + /** @return clamped to [0.0, 1.0]**/ fun Number.fractionOf(maxValue: Number) = maxValue.toDouble().takeIf { it != 0.0 }?.let { max -> this.toDouble() / max diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt index 3e8472d63..0c8b2b694 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt @@ -51,7 +51,11 @@ object RenderUtils { } } - enum class VerticalAlignment { TOP, CENTER, BOTTOM } + enum class VerticalAlignment { + TOP, + CENTER, + BOTTOM, + } private val beaconBeam = ResourceLocation("textures/entity/beacon_beam.png") |