errores del primer commit

This commit is contained in:
EnderProyects committed 2023-04-04 19:54:11 +02:00
1 parent d9538e9d44
commit 91fa3fcbd0
15 files changed
+422 -18

No files matched your search

@@ -0,0 +1,22 @@
package ab.common.utils;
import net.minecraft.util.StatCollector;
public class LocalizationManager {
public static String getLocalizedString(String key) {
if (StatCollector.canTranslate(key)) {
return StatCollector.translateToLocal(key);
} else {
return StatCollector.translateToFallback(key);
}
}
public static String getLocalizedString(String key, Object... objects) {
if (StatCollector.canTranslate(key)) {
return String.format(StatCollector.translateToLocal(key), objects);
} else {
return String.format(StatCollector.translateToFallback(key), objects);
}
}
}