Skip to content

Commit

Permalink
Add mcdev annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed Sep 24, 2023
1 parent a809996 commit 945284e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ dependencies {
include modImplementation("dev.xpple:betterconfig:${project.betterconfig_version}")
includedLibrary "com.seedfinding:mc_feature:${project.seedfinding_version}"

compileOnly 'com.demonwav.mcdev:annotations:2.0.0'

modRuntimeOnly 'me.djtheredstoner:DevAuth-fabric:1.1.0'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.earthcomputer.clientcommands.command;

import com.demonwav.mcdev.annotations.Translatable;
import com.mojang.brigadier.context.CommandContext;
import net.earthcomputer.clientcommands.interfaces.IFlaggedCommandSource;
import net.earthcomputer.clientcommands.mixin.InGameHudAccessor;
Expand Down Expand Up @@ -38,7 +39,7 @@ public static void sendHelp(Text help) {
sendFeedback(Text.literal("").append(help).formatted(Formatting.AQUA));
}

public static void sendFeedback(String message, Object... args) {
public static void sendFeedback(@Translatable String message, Object... args) {
sendFeedback(Text.translatable(message, args));
}

Expand Down Expand Up @@ -74,7 +75,7 @@ public static Text getGlowCoordsTextComponent(MutableText translatableText, Bloc
return getCommandTextComponent(translatableText, String.format("/cglow block %d %d %d 10", pos.getX(), pos.getY(), pos.getZ()));
}

public static Text getCommandTextComponent(String translationKey, String command) {
public static Text getCommandTextComponent(@Translatable String translationKey, String command) {
return getCommandTextComponent(Text.translatable(translationKey), command);
}

Expand Down

0 comments on commit 945284e

Please sign in to comment.