Skip to content

Commit

Permalink
Add support for mojang mappings through srg
Browse files Browse the repository at this point in the history
Signed-off-by: shedaniel <[email protected]>
  • Loading branch information
shedaniel committed Feb 19, 2021
1 parent 09f003a commit fc6b820
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repositories {
}

dependencies {
compile("me.shedaniel:linkie-core:1.0.60")
compile("me.shedaniel:linkie-core:1.0.62")
compile("com.discord4j:discord4j-core:3.1.3") {
force = true
}
Expand Down
9 changes: 8 additions & 1 deletion src/main/kotlin/me/shedaniel/linkie/discord/LinkieBot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import me.shedaniel.linkie.discord.utils.event
import me.shedaniel.linkie.namespaces.LegacyYarnNamespace
import me.shedaniel.linkie.namespaces.MCPNamespace
import me.shedaniel.linkie.namespaces.MojangNamespace
import me.shedaniel.linkie.namespaces.MojangSrgNamespace
import me.shedaniel.linkie.namespaces.PlasmaNamespace
import me.shedaniel.linkie.namespaces.YarnNamespace
import me.shedaniel.linkie.namespaces.YarrnNamespace
Expand Down Expand Up @@ -76,7 +77,8 @@ fun main() {
YarnNamespace,
PlasmaNamespace,
MCPNamespace,
MojangNamespace
MojangNamespace,
MojangSrgNamespace,
)
)
) {
Expand Down Expand Up @@ -127,6 +129,11 @@ fun registerCommands(commands: CommandHandler) {
commands.registerCommand(QueryMethodCommand(Namespaces["plasma"]), "plasmam")
commands.registerCommand(QueryFieldCommand(Namespaces["plasma"]), "plasmaf")

commands.registerCommand(QueryCompoundCommand(Namespaces["mojang_srg"]), "mms", "mojmaps")
commands.registerCommand(QueryClassCommand(Namespaces["mojang_srg"]), "mmsc", "mojmapsc")
commands.registerCommand(QueryMethodCommand(Namespaces["mojang_srg"]), "mmsm", "mojmapsm")
commands.registerCommand(QueryFieldCommand(Namespaces["mojang_srg"]), "mmsf", "mojmapsm")

commands.registerCommand(QueryTranslateClassCommand(Namespaces["yarn"], Namespaces["mcp"]), "voldefyc", "voldec", "vc")
commands.registerCommand(QueryTranslateMethodCommand(Namespaces["yarn"], Namespaces["mcp"]), "voldefym", "voldem", "vm")
commands.registerCommand(QueryTranslateFieldCommand(Namespaces["yarn"], Namespaces["mcp"]), "voldefyf", "voldef", "vf")
Expand Down

0 comments on commit fc6b820

Please sign in to comment.