package net.shadowfacts.asmr import net.fabricmc.api.ModInitializer import net.fabricmc.fabric.api.registry.CommandRegistry import net.minecraft.client.MinecraftClient import net.minecraft.server.command.CommandManager /** * @author shadowfacts */ object ASMR: ModInitializer { override fun onInitialize() { println("hello fabric") CommandRegistry.INSTANCE.register(false) { dispatcher -> val command = CommandManager.literal("uitest").executes { try { MinecraftClient.getInstance().openScreen(TestScreen()) } catch (e: Throwable) { e.printStackTrace() } 1 } dispatcher.register(command) } } }