Refactor source layout
Introduce compat source sets and move all kotlin sources to the main directory [no changelog]
This commit is contained in:
13
src/main/kotlin/features/debug/DebugLogger.kt
Normal file
13
src/main/kotlin/features/debug/DebugLogger.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
package moe.nea.firmament.features.debug
|
||||
|
||||
import net.minecraft.text.Text
|
||||
import moe.nea.firmament.util.MC
|
||||
|
||||
class DebugLogger(val tag: String) {
|
||||
fun isEnabled() = DeveloperFeatures.isEnabled // TODO: allow filtering by tag
|
||||
fun log(text: () -> String) {
|
||||
if (!isEnabled()) return
|
||||
MC.sendChat(Text.literal(text()))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user