ASMR/src/main/kotlin/net/shadowfacts/asmr/ASMR.kt

27 lines
609 B
Kotlin
Raw Normal View History

2019-06-21 16:55:57 +00:00
package net.shadowfacts.asmr
import net.fabricmc.api.ModInitializer
2019-06-21 20:22:23 +00:00
import net.fabricmc.fabric.api.registry.CommandRegistry
import net.minecraft.client.MinecraftClient
import net.minecraft.server.command.CommandManager
2019-06-21 16:55:57 +00:00
object ASMR: ModInitializer {
override fun onInitialize() {
println("hello fabric")
2019-06-21 20:22:23 +00:00
CommandRegistry.INSTANCE.register(false) { dispatcher ->
val command = CommandManager.literal("uitest").executes {
try {
MinecraftClient.getInstance().openScreen(UITest())
} catch (e: Throwable) {
e.printStackTrace()
}
1
}
dispatcher.register(command)
}
2019-06-21 16:55:57 +00:00
}
}