Skip to content

Commit

Permalink
Mark Kilt flags as JVM static fields
Browse files Browse the repository at this point in the history
  • Loading branch information
BluSpring committed Jan 10, 2025
1 parent 9bea59d commit a98837f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/kotlin/xyz/bluspring/kilt/loader/KiltFlags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ package xyz.bluspring.kilt.loader

object KiltFlags {
// Mainly for debugging, so already-remapped Forge mods will be remapped again.
val FORCE_REMAPPING = "kilt.forceRemap".checkPropertyBoolean()
@JvmField val FORCE_REMAPPING = "kilt.forceRemap".checkPropertyBoolean()

// Mainly for debugging, used to test unobfuscated mods and ensure that Kilt is running as intended.
val DISABLE_REMAPPING = "kilt.noRemap".checkPropertyBoolean()
@JvmField val DISABLE_REMAPPING = "kilt.noRemap".checkPropertyBoolean()

// Mainly for debugging, to make sure all Forge mods remap correctly in production environments
// without needing to actually launch a production environment.
val FORCE_PRODUCTION_REMAPPING = "kilt.forceProductionRemap".checkPropertyBoolean()
@JvmField val FORCE_PRODUCTION_REMAPPING = "kilt.forceProductionRemap".checkPropertyBoolean()

// Disables coremods in all loaded Forge mods.
val DISABLE_COREMODS = !"kilt.disableCoreMods".checkPropertyBoolean()
@JvmField val DISABLE_COREMODS = !"kilt.disableCoreMods".checkPropertyBoolean()

// Mainly for debugging, enables profiling if the DeltaTimeProfiler#dumpTree method is called.
val ENABLE_PROFILING = "kilt.enableProfiling".checkPropertyBoolean()
@JvmField val ENABLE_PROFILING = "kilt.enableProfiling".checkPropertyBoolean()

// Mainly for debugging, enables logging access transformer info under the INFO level.
// By default, AT info is logged under the DEBUG level, so it may still be found there.
val ENABLE_ACCESS_TRANSFORMER_DEBUG = "kilt.printATDebug".checkPropertyBoolean()
@JvmField val ENABLE_ACCESS_TRANSFORMER_DEBUG = "kilt.printATDebug".checkPropertyBoolean()

private fun String.checkPropertyBoolean(): Boolean {
return System.getProperty(this)?.lowercase() == "true"
Expand Down

0 comments on commit a98837f

Please sign in to comment.