diff --git a/gradle.properties b/gradle.properties index fb4bacb..2ddb777 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loom_version=1.7-SNAPSHOT minecraft_version=1.20.1 fabric_kotlin_version=1.11.0+kotlin.2.0.0 fabric_api_version=0.92.2+1.20.1 -mod_version=2.0.0+1.20.1-beta.12 +mod_version=2.0.0+1.20.1-beta.13 loader=fabric # Mappings diff --git a/src/main/kotlin/com/bibireden/data_attributes/api/attribute/AttributeFormat.kt b/src/main/kotlin/com/bibireden/data_attributes/api/attribute/AttributeFormat.kt index c899348..5890256 100644 --- a/src/main/kotlin/com/bibireden/data_attributes/api/attribute/AttributeFormat.kt +++ b/src/main/kotlin/com/bibireden/data_attributes/api/attribute/AttributeFormat.kt @@ -3,8 +3,8 @@ package com.bibireden.data_attributes.api.attribute import io.wispforest.endec.Endec enum class AttributeFormat(val function: (min: Double, max: Double, value: Double) -> String) { - Percentage ({min, max, value -> "%.2f".format((value-min)/((max-min)/100))+"%" }), - Whole({_, _, value -> "$value"} ); + Percentage ({min, max, value -> "%.2f".format((value - min) / ((max - min) / 100)) + "%" }), + Whole({_, _, value -> "%.2f".format(value) } ); companion object { val ENDEC: Endec = Endec.STRING.xmap(AttributeFormat::of) { it.name }