lang move to Utl, make all references to language file use Utl.lang()

This commit is contained in:
Oth3r 2024-02-24 23:34:20 -06:00
commit 0bbb46b4f4
5 changed files with 14 additions and 25 deletions

View file

@ -4,6 +4,8 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.MutableText;
import net.minecraft.text.Text;
import java.lang.reflect.Type;
import java.util.ArrayList;
@ -11,6 +13,10 @@ import java.util.HashMap;
import java.util.List;
public class Utl {
public static MutableText lang(String key, Object... args) {
if (Sit.isClient) return Text.translatable(key, args);
else return LangReader.of(key, args).getTxT();
}
public enum HandType {
main,
off