Skip to content

Commit

Permalink
Now works with Fabric, magic!
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafacasari committed Jun 10, 2024
1 parent 7e9a0ca commit 4972cd4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.mojang.brigadier.CommandDispatcher
import com.mojang.brigadier.context.CommandContext
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType
import com.rafacasari.mod.cobbledex.client.gui.CobbledexGUI
import net.minecraft.client.MinecraftClient
import net.minecraft.command.CommandSource

object OpenCobbledexCommand : IClientCommandInterface {
Expand Down Expand Up @@ -36,15 +37,18 @@ object OpenCobbledexCommand : IClientCommandInterface {
throw NO_POKEMON_EXCEPTION.create()
}

CobbledexGUI.openCobbledexScreen(properties.create())
MinecraftClient.getInstance().send {
CobbledexGUI.openCobbledexScreen(properties.create())
}


return Command.SINGLE_SUCCESS
}

private fun execute(): Int {

CobbledexGUI.openCobbledexScreen()

MinecraftClient.getInstance().send {
CobbledexGUI.openCobbledexScreen()
}
return Command.SINGLE_SUCCESS
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mod_id=cobbledex

generated_file_name_addon=-1.20.1
archives_base_name=cobbledex-1.20.1
mod_version=1.0.8
mod_version=1.0.9
mod_description=A mod to track your progress on Cobblemon. Fabric and Forge compatible.
mod_icon=assets/cobbledex/icon.png
repository=https://github.com/rafacasari/cobbledex
Expand Down

0 comments on commit 4972cd4

Please sign in to comment.