diff options
author | inglettronald <inglettronald@gmail.com> | 2023-06-08 19:52:04 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-06-08 19:52:04 -0500 |
commit | 5c8aeecfa64e438a86b2b4bc547867b5f041e5ad (patch) | |
tree | 9bab1f9c04548bb85f19c8f6e11c09cd91388760 /src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt | |
parent | 5dbc77360001ce5bd0cd422ca6dc134b34ec2575 (diff) | |
download | DulkirMod-Fabric-5c8aeecfa64e438a86b2b4bc547867b5f041e5ad.tar.gz DulkirMod-Fabric-5c8aeecfa64e438a86b2b4bc547867b5f041e5ad.tar.bz2 DulkirMod-Fabric-5c8aeecfa64e438a86b2b4bc547867b5f041e5ad.zip |
Replaced openScreenDelayed with mc.send
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt b/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt index 81d5d07..e4d3cb2 100644 --- a/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt +++ b/src/main/kotlin/com/dulkirfabric/commands/ConfigCommand.kt @@ -1,9 +1,7 @@ package com.dulkirfabric.commands -import com.dulkirfabric.DulkirModFabric import com.dulkirfabric.DulkirModFabric.mc import com.dulkirfabric.config.DulkirConfig -import com.google.common.eventbus.Subscribe import com.mojang.brigadier.CommandDispatcher import com.mojang.brigadier.builder.LiteralArgumentBuilder import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource @@ -12,8 +10,9 @@ import net.minecraft.command.CommandRegistryAccess object ConfigCommand { fun register(dispatcher: CommandDispatcher<FabricClientCommandSource>, registryAccess: CommandRegistryAccess) { dispatcher.register(LiteralArgumentBuilder.literal<FabricClientCommandSource>("dulkir").executes { - println("command running") - DulkirModFabric.openScreenDelayed(DulkirConfig().screen) + mc.send { + mc.setScreen(DulkirConfig().screen) + } return@executes 0 }) } |