diff options
author | inglettronald <inglettronald@gmail.com> | 2023-03-25 04:36:31 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-03-25 04:36:31 -0500 |
commit | 43d07fc791e63bba61695e0d4b766b78eb699132 (patch) | |
tree | 69111eb055f0e68fdf388046fb0812f4f3f2f004 /src/main/kotlin/dulkirmod/utils | |
parent | 71af70d22e9a55a58c36642a745e81aa91851375 (diff) | |
download | DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.gz DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.bz2 DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.zip |
Config Syntax Change and switch to oneconfig
Diffstat (limited to 'src/main/kotlin/dulkirmod/utils')
-rw-r--r-- | src/main/kotlin/dulkirmod/utils/ConfigData.kt | 24 | ||||
-rw-r--r-- | src/main/kotlin/dulkirmod/utils/TitleUtils.kt | 6 | ||||
-rw-r--r-- | src/main/kotlin/dulkirmod/utils/Utils.kt | 24 |
3 files changed, 27 insertions, 27 deletions
diff --git a/src/main/kotlin/dulkirmod/utils/ConfigData.kt b/src/main/kotlin/dulkirmod/utils/ConfigData.kt index b881248..60a4a0f 100644 --- a/src/main/kotlin/dulkirmod/utils/ConfigData.kt +++ b/src/main/kotlin/dulkirmod/utils/ConfigData.kt @@ -1,17 +1,17 @@ package dulkirmod.utils -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig data class ConfigData( - val size: Float = Config.customSize, - val scaleSwing: Boolean = Config.doesScaleSwing, - val x: Float = Config.customX, - val y: Float = Config.customY, - val z: Float = Config.customZ, - val yaw: Float = Config.customYaw, - val pitch: Float = Config.customPitch, - val roll: Float = Config.customRoll, - val speed: Float = Config.customSpeed, - val ignoreHaste: Boolean = Config.ignoreHaste, - val drinkingFix: Int = Config.drinkingSelector, + val size: Float = DulkirConfig.customSize, + val scaleSwing: Boolean = DulkirConfig.doesScaleSwing, + val x: Float = DulkirConfig.customX, + val y: Float = DulkirConfig.customY, + val z: Float = DulkirConfig.customZ, + val yaw: Float = DulkirConfig.customYaw, + val pitch: Float = DulkirConfig.customPitch, + val roll: Float = DulkirConfig.customRoll, + val speed: Float = DulkirConfig.customSpeed, + val ignoreHaste: Boolean = DulkirConfig.ignoreHaste, + val drinkingFix: Int = DulkirConfig.drinkingSelector, ) diff --git a/src/main/kotlin/dulkirmod/utils/TitleUtils.kt b/src/main/kotlin/dulkirmod/utils/TitleUtils.kt index 8932878..f5c6325 100644 --- a/src/main/kotlin/dulkirmod/utils/TitleUtils.kt +++ b/src/main/kotlin/dulkirmod/utils/TitleUtils.kt @@ -1,7 +1,7 @@ package dulkirmod.utils import dulkirmod.DulkirMod.Companion.mc -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import net.minecraft.client.gui.ScaledResolution import net.minecraft.client.renderer.GlStateManager import net.minecraftforge.client.event.RenderGameOverlayEvent @@ -18,12 +18,12 @@ object TitleUtils { val width = mc.fontRendererObj.getStringWidth(curString) val screenWidth = ScaledResolution(mc).scaledWidth_double val screenHeight = ScaledResolution(mc).scaledHeight_double - var scale = ((screenWidth - 100) * Config.bestiaryNotifSize) / width + var scale = ((screenWidth - 100) * DulkirConfig.bestiaryNotifSize) / width scale = min(scale, 10.0) GlStateManager.pushMatrix() GlStateManager.translate((screenWidth / 2 - width * scale / 2), screenHeight / 2 - (4.5 * scale), 0.0) GlStateManager.scale(scale, scale, scale) - mc.fontRendererObj.drawString(curString, 0f, 0f, 0, Config.bestiaryTextShadow) + mc.fontRendererObj.drawString(curString, 0f, 0f, 0, DulkirConfig.bestiaryTextShadow) GlStateManager.popMatrix() } diff --git a/src/main/kotlin/dulkirmod/utils/Utils.kt b/src/main/kotlin/dulkirmod/utils/Utils.kt index ce19b32..6340a6b 100644 --- a/src/main/kotlin/dulkirmod/utils/Utils.kt +++ b/src/main/kotlin/dulkirmod/utils/Utils.kt @@ -2,7 +2,7 @@ package dulkirmod.utils import com.google.gson.Gson import dulkirmod.DulkirMod.Companion.mc -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import net.minecraft.util.EnumChatFormatting import java.awt.Toolkit import java.awt.datatransfer.Clipboard @@ -33,17 +33,17 @@ object Utils { try { val jsonString = String(Base64.getDecoder().decode(base64)) val import = gson.fromJson(jsonString, ConfigData::class.java) - Config.customSize = import.size - Config.customSpeed = import.speed - Config.doesScaleSwing = import.scaleSwing - Config.customX = import.x - Config.customY = import.y - Config.customZ = import.z - Config.customYaw = import.yaw - Config.customPitch = import.pitch - Config.customRoll = import.roll - Config.drinkingSelector = import.drinkingFix - Config.ignoreHaste = import.ignoreHaste + DulkirConfig.customSize = import.size + DulkirConfig.customSpeed = import.speed + DulkirConfig.doesScaleSwing = import.scaleSwing + DulkirConfig.customX = import.x + DulkirConfig.customY = import.y + DulkirConfig.customZ = import.z + DulkirConfig.customYaw = import.yaw + DulkirConfig.customPitch = import.pitch + DulkirConfig.customRoll = import.roll + DulkirConfig.drinkingSelector = import.drinkingFix + DulkirConfig.ignoreHaste = import.ignoreHaste } catch (e: Exception) { TextUtils.info("§6§lCurrent clipboard is not a recognizable Custom Animation Preset.") } |