It's a long road, to 1.19
This commit is contained in:
@@ -2,25 +2,23 @@ package me.hypherionmc.craterlib.util;
|
||||
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
|
||||
public class LangUtils {
|
||||
|
||||
public static Component getTooltipTitle(String key) {
|
||||
return new TextComponent(ChatFormatting.YELLOW + new TranslatableComponent(key).getString());
|
||||
return Component.literal(ChatFormatting.YELLOW + Component.translatable(key).getString());
|
||||
}
|
||||
|
||||
public static String resolveTranslation(String key) {
|
||||
return new TranslatableComponent(key).getString();
|
||||
return Component.translatable(key).getString();
|
||||
}
|
||||
|
||||
public static Component getTranslation(String key) {
|
||||
return new TranslatableComponent(key);
|
||||
return Component.translatable(key);
|
||||
}
|
||||
|
||||
public static Component makeComponent(String text) {
|
||||
return new TranslatableComponent(text);
|
||||
return Component.translatable(text);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user