diff options
Diffstat (limited to 'src/main')
20 files changed, 0 insertions, 721 deletions
diff --git a/src/main/java/dev/isxander/yacl/api/utils/Dimension.java b/src/main/java/dev/isxander/yacl/api/utils/Dimension.java deleted file mode 100644 index 0de0a58..0000000 --- a/src/main/java/dev/isxander/yacl/api/utils/Dimension.java +++ /dev/null @@ -1,33 +0,0 @@ -package dev.isxander.yacl.api.utils; - -import dev.isxander.yacl.impl.utils.DimensionIntegerImpl; - -public interface Dimension<T extends Number> { - T x(); - T y(); - - T width(); - T height(); - - T xLimit(); - T yLimit(); - - T centerX(); - T centerY(); - - boolean isPointInside(T x, T y); - - MutableDimension<T> clone(); - - Dimension<T> withX(T x); - Dimension<T> withY(T y); - Dimension<T> withWidth(T width); - Dimension<T> withHeight(T height); - - Dimension<T> moved(T x, T y); - Dimension<T> expanded(T width, T height); - - static MutableDimension<Integer> ofInt(int x, int y, int width, int height) { - return new DimensionIntegerImpl(x, y, width, height); - } -} diff --git a/src/main/java/dev/isxander/yacl/api/utils/MutableDimension.java b/src/main/java/dev/isxander/yacl/api/utils/MutableDimension.java deleted file mode 100644 index eff0186..0000000 --- a/src/main/java/dev/isxander/yacl/api/utils/MutableDimension.java +++ /dev/null @@ -1,11 +0,0 @@ -package dev.isxander.yacl.api.utils; - -public interface MutableDimension<T extends Number> extends Dimension<T> { - MutableDimension<T> setX(T x); - MutableDimension<T> setY(T y); - MutableDimension<T> setWidth(T width); - MutableDimension<T> setHeight(T height); - - MutableDimension<T> move(T x, T y); - MutableDimension<T> expand(T width, T height); -} diff --git a/src/main/java/dev/isxander/yacl/config/ConfigEntry.java b/src/main/java/dev/isxander/yacl/config/ConfigEntry.java deleted file mode 100644 index 7f04c33..0000000 --- a/src/main/java/dev/isxander/yacl/config/ConfigEntry.java +++ /dev/null @@ -1,11 +0,0 @@ -package dev.isxander.yacl.config; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface ConfigEntry { -} diff --git a/src/main/java/dev/isxander/yacl/config/ConfigInstance.java b/src/main/java/dev/isxander/yacl/config/ConfigInstance.java deleted file mode 100644 index c207161..0000000 --- a/src/main/java/dev/isxander/yacl/config/ConfigInstance.java +++ /dev/null @@ -1,48 +0,0 @@ -package dev.isxander.yacl.config; - -import java.lang.reflect.InvocationTargetException; - -/** - * Responsible for handing the actual config data type. - * Holds the instance along with a final default instance - * to reference default values for options and should not be changed. - * - * Abstract methods to save and load the class, implementations are responsible for - * how it saves and load. - * - * @param <T> config data type - */ -public abstract class ConfigInstance<T> { - private final Class<T> configClass; - private final T defaultInstance; - private T instance; - - public ConfigInstance(Class<T> configClass) { - this.configClass = configClass; - - try { - this.defaultInstance = this.instance = configClass.getConstructor().newInstance(); - } catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) { - throw new IllegalStateException(String.format("Could not create default instance of config for %s. Make sure there is a default constructor!", this.configClass.getSimpleName())); - } - } - - public abstract void save(); - public abstract void load(); - - public T getConfig() { - return this.instance; - } - - protected void setConfig(T instance) { - this.instance = instance; - } - - public T getDefaults() { - return this.defaultInstance; - } - - public Class<T> getConfigClass() { - return this.configClass; - } -} diff --git a/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java b/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java deleted file mode 100644 index ad7f550..0000000 --- a/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java +++ /dev/null @@ -1,212 +0,0 @@ -package dev.isxander.yacl.config; - -import com.google.gson.*; -import dev.isxander.yacl.impl.utils.YACLConstants; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.Style; - -import java.awt.*; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardOpenOption; -import java.util.function.UnaryOperator; - -/** - * Uses GSON to serialize and deserialize config data from JSON to a file. - * - * Only fields annotated with {@link ConfigEntry} are included in the JSON. - * {@link Component}, {@link Style} and {@link Color} have default type adapters, so there is no need to provide them in your GSON instance. - * GSON is automatically configured to format fields as {@code lower_camel_case}. - * - * @param <T> config data type - */ -public class GsonConfigInstance<T> extends ConfigInstance<T> { - private final Gson gson; - private final Path path; - - @Deprecated - public GsonConfigInstance(Class<T> configClass, Path path) { - this(configClass, path, new GsonBuilder()); - } - - @Deprecated - public GsonConfigInstance(Class<T> configClass, Path path, Gson gson) { - this(configClass, path, gson.newBuilder()); - } - - @Deprecated - public GsonConfigInstance(Class<T> configClass, Path path, UnaryOperator<GsonBuilder> builder) { - this(configClass, path, builder.apply(new GsonBuilder())); - } - - @Deprecated - public GsonConfigInstance(Class<T> configClass, Path path, GsonBuilder builder) { - super(configClass); - this.path = path; - this.gson = builder - .setExclusionStrategies(new ConfigExclusionStrategy()) - .registerTypeHierarchyAdapter(Component.class, new Component.Serializer()) - .registerTypeHierarchyAdapter(Style.class, new Style.Serializer()) - .registerTypeHierarchyAdapter(Color.class, new ColorTypeAdapter()) - .serializeNulls() - .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - .create(); - } - - private GsonConfigInstance(Class<T> configClass, Path path, Gson gson, boolean fromBuilder) { - super(configClass); - this.path = path; - this.gson = gson; - } - - @Override - public void save() { - try { - YACLConstants.LOGGER.info("Saving {}...", getConfigClass().getSimpleName()); - Files.writeString(path, gson.toJson(getConfig()), StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE); - } catch (IOException e) { - e.printStackTrace(); - } - } - - @Override - public void load() { - try { - if (Files.notExists(path)) { - save(); - return; - } - - YACLConstants.LOGGER.info("Loading {}...", getConfigClass().getSimpleName()); - setConfig(gson.fromJson(Files.readString(path), getConfigClass())); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public Path getPath() { - return this.path; - } - - private static class ConfigExclusionStrategy implements ExclusionStrategy { - @Override - public boolean shouldSkipField(FieldAttributes fieldAttributes) { - return fieldAttributes.getAnnotation(ConfigEntry.class) == null; - } - - @Override - public boolean shouldSkipClass(Class<?> aClass) { - return false; - } - } - - public static class ColorTypeAdapter implements JsonSerializer<Color>, JsonDeserializer<Color> { - @Override - public Color deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { - return new Color(jsonElement.getAsInt(), true); - } - - @Override - public JsonElement serialize(Color color, Type type, JsonSerializationContext jsonSerializationContext) { - return new JsonPrimitive(color.getRGB()); - } - } - - /** - * Creates a builder for a GSON config instance. - * @param configClass the config class - * @return a new builder - * @param <T> the config type - */ - public static <T> Builder<T> createBuilder(Class<T> configClass) { - return new Builder<>(configClass); - } - - public static class Builder<T> { - private final Class<T> configClass; - private Path path; - private UnaryOperator<GsonBuilder> gsonBuilder = builder -> builder - .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - .serializeNulls() - .registerTypeHierarchyAdapter(Component.class, new Component.Serializer()) - .registerTypeHierarchyAdapter(Style.class, new Style.Serializer()) - .registerTypeHierarchyAdapter(Color.class, new ColorTypeAdapter()); - - private Builder(Class<T> configClass) { - this.configClass = configClass; - } - - /** - * Sets the file path to save and load the config from. - */ - public Builder<T> setPath(Path path) { - this.path = path; - return this; - } - - /** - * Sets the GSON instance to use. Overrides all YACL defaults such as: - * <ul> - * <li>lower_camel_case field naming policy</li> - * <li>null serialization</li> - * <li>{@link Component}, {@link Style} and {@link Color} type adapters</li> - * </ul> - * Still respects the exclusion strategy to only serialize {@link ConfigEntry} - * but these can be added to with setExclusionStrategies. - * - * @param gsonBuilder gson builder to use - */ - public Builder<T> overrideGsonBuilder(GsonBuilder gsonBuilder) { - this.gsonBuilder = builder -> gsonBuilder; - return this; - } - - /** - * Sets the GSON instance to use. Overrides all YACL defaults such as: - * <ul> - * <li>lower_camel_case field naming policy</li> - * <li>null serialization</li> - * <li>{@link Component}, {@link Style} and {@link Color} type adapters</li> - * </ul> - * Still respects the exclusion strategy to only serialize {@link ConfigEntry} - * but these can be added to with setExclusionStrategies. - * - * @param gson gson instance to be converted to a builder - */ - public Builder<T> overrideGsonBuilder(Gson gson) { - return this.overrideGsonBuilder(gson.newBuilder()); - } - - /** - * Appends extra configuration to a GSON builder. - * This is the intended way to add functionality to the GSON instance. - * <p> - * By default, YACL sets the GSON with the following options: - * <ul> - * <li>lower_camel_case field naming policy</li> - * <li>null serialization</li> - * <li>{@link Component}, {@link Style} and {@link Color} type adapters</li> - * </ul> - * - * @param gsonBuilder the function to apply to the builder - */ - public Builder<T> appendGsonBuilder(UnaryOperator<GsonBuilder> gsonBuilder) { - this.gsonBuilder = builder -> gsonBuilder.apply(this.gsonBuilder.apply(builder)); - return this; - } - - /** - * Builds the config instance. - * @return the built config instance - */ - public GsonConfigInstance<T> build() { - UnaryOperator<GsonBuilder> gsonBuilder = builder -> this.gsonBuilder.apply(builder) - .addSerializationExclusionStrategy(new ConfigExclusionStrategy()) - .addDeserializationExclusionStrategy(new ConfigExclusionStrategy()); - - return new GsonConfigInstance<>(configClass, path, gsonBuilder.apply(new GsonBuilder()).create(), true); - } - } -} diff --git a/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java b/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java deleted file mode 100644 index 6c7508d..0000000 --- a/src/main/java/dev/isxander/yacl/impl/utils/DimensionIntegerImpl.java +++ /dev/null @@ -1,115 +0,0 @@ -package dev.isxander.yacl.impl.utils; - -import dev.isxander.yacl.api.utils.Dimension; -import dev.isxander.yacl.api.utils.MutableDimension; - -public class DimensionIntegerImpl implements MutableDimension<Integer> { - private int x, y; - private int width, height; - - public DimensionIntegerImpl(int x, int y, int width, int height) { - this.x = x; - this.y = y; - this.width = width; - this.height = height; - } - - @Override - public Integer x() { - return x; - } - - @Override - public Integer y() { - return y; - } - - @Override - public Integer width() { - return width; - } - - @Override - public Integer height() { - return height; - } - - @Override - public Integer xLimit() { - return x + width; - } - - @Override - public Integer yLimit() { - return y + height; - } - - @Override - public Integer centerX() { - return x + width / 2; - } - - @Override - public Integer centerY() { - return y + height / 2; - } - - @Override - public boolean isPointInside(Integer x, Integer y) { - return x >= x() && x <= xLimit() && y >= y() && y <= yLimit(); - } - - @Override - public MutableDimension<Integer> clone() { - return new DimensionIntegerImpl(x, y, width, height); - } - - @Override public MutableDimension<Integer> setX(Integer x) { this.x = x; return this; } - @Override public MutableDimension<Integer> setY(Integer y) { this.y = y; return this; } - @Override public MutableDimension<Integer> setWidth(Integer width) { this.width = width; return this; } - @Override public MutableDimension<Integer> setHeight(Integer height) { this.height = height; return this; } - - @Override - public Dimension<Integer> withX(Integer x) { - return clone().setX(x); - } - - @Override - public Dimension<Integer> withY(Integer y) { - return clone().setY(y); - } - - @Override - public Dimension<Integer> withWidth(Integer width) { - return clone().setWidth(width); - } - - @Override - public Dimension<Integer> withHeight(Integer height) { - return clone().setHeight(height); - } - - @Override - public MutableDimension<Integer> move(Integer x, Integer y) { - this.x += x; - this.y += y; - return this; - } - - @Override - public MutableDimension<Integer> expand(Integer width, Integer height) { - this.width += width; - this.height += height; - return this; - } - - @Override - public Dimension<Integer> moved(Integer x, Integer y) { - return clone().move(x, y); - } - - @Override - public Dimension<Integer> expanded(Integer width, Integer height) { - return clone().expand(width, height); - } -} diff --git a/src/main/java/dev/isxander/yacl/impl/utils/YACLConstants.java b/src/main/java/dev/isxander/yacl/impl/utils/YACLConstants.java deleted file mode 100644 index 3d382d4..0000000 --- a/src/main/java/dev/isxander/yacl/impl/utils/YACLConstants.java +++ /dev/null @@ -1,8 +0,0 @@ -package dev.isxander.yacl.impl.utils; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class YACLConstants { - public static final Logger LOGGER = LoggerFactory.getLogger("YetAnotherConfigLib"); -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/el_gr.json b/src/main/resources/assets/yet-another-config-lib/lang/el_gr.json deleted file mode 100644 index b7bc2d2..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/el_gr.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "yacl.control.boolean.true": "Ναι", - "yacl.control.boolean.false": "Όχι", - - "yacl.control.action.execute": "ΕΚΤΕΛΕΣΗ", - - "yacl.gui.save": "Αποθήκευση Αλλαγών", - "yacl.gui.save.tooltip": "Μονιμοποιήει τις αλλαγές.", - "yacl.gui.finished.tooltip": "Κλείνει το GUI.", - "yacl.gui.cancel.tooltip": "Ξεχνά τις ενεργές αλλαγές και κλείνει το μενού.", - "yacl.gui.reset.tooltip": "Επαναφέρει όλες τις επιλογές στις προεπιλογές τους. (Μπορεί να ανερεθε)", - "yacl.gui.undo": "Επαναφορά", - "yacl.gui.undo.tooltip": "Επαναφέρει όλες τις ενεργές επιλογές στις προεπιλογές τους.", - "yacl.gui.fail_apply": "Αποτυχία εφαρμογής", - "yacl.gui.fail_apply.tooltip": "Δημιουργήθηκε ένα σφάλμα και οι αλλαγές δεν μπόρεσαν να εφαρμοστούν.", - "yacl.gui.save_before_exit": "Αποθήκευση πριν το κλείσιμο!", - "yacl.gui.save_before_exit.tooltip": "Αποθήκευσε ή ακύρωσε για να βγεις απ' το μενού." - - "yacl.restart.title": "Η ρύθμιση απαιτεί επανεκκήνιση!", - "yacl.restart.message": "Μία ή παραπάνω επιλογές προϋποθέτουν επανεκκήνηση το παιχνιδιού για να εφαρμοστούν.", - "yacl.restart.yes": "Κλείσιμο του Minecraft", - "yacl.restart.no": "Αγνόησε το για τώρα" -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/en_us.json b/src/main/resources/assets/yet-another-config-lib/lang/en_us.json deleted file mode 100644 index 32621e9..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/en_us.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "yacl.control.boolean.true": "True", - "yacl.control.boolean.false": "False", - - "yacl.control.action.execute": "EXECUTE", - - "yacl.gui.save": "Save Changes", - "yacl.gui.save.tooltip": "Makes the changes made permanent.", - "yacl.gui.finished.tooltip": "Closes the GUI.", - "yacl.gui.cancel.tooltip": "Forgets pending changes and closes the GUI.", - "yacl.gui.reset.tooltip": "Resets all options to default. (This is reversible!)", - "yacl.gui.undo": "Undo", - "yacl.gui.undo.tooltip": "Reverts all options back to what they were before editing.", - "yacl.gui.fail_apply": "Failed to apply", - "yacl.gui.fail_apply.tooltip": "There was an error and the changes couldn't be applied.", - "yacl.gui.save_before_exit": "Save before exiting!", - "yacl.gui.save_before_exit.tooltip": "Save or cancel to exit the GUI.", - - "yacl.list.move_up": "Move up", - "yacl.list.move_down": "Move down", - "yacl.list.remove": "Remove", - "yacl.list.add_top": "New entry", - "yacl.list.empty": "List is empty", - - "yacl.restart.title": "Config requires restart!", - "yacl.restart.message": "One or more options needs you to restart the game to apply the changes.", - "yacl.restart.yes": "Close Minecraft", - "yacl.restart.no": "Ignore" -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/et_ee.json b/src/main/resources/assets/yet-another-config-lib/lang/et_ee.json deleted file mode 100644 index 5f5274a..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/et_ee.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "yacl.control.boolean.true": "Tõene", - "yacl.control.boolean.false": "Väär", - - "yacl.control.action.execute": "KÄIVITA", - - "yacl.gui.save": "Salvesta muudatused", - "yacl.gui.save.tooltip": "Teeb tehtud muudatused püsivaks.", - "yacl.gui.finished.tooltip": "Sulgeb liidese.", - "yacl.gui.cancel.tooltip": "Unustab tehtud muudatused ja sulgeb liidese.", - "yacl.gui.reset.tooltip": "Lähtestab kõik valikud vaikeväärtustele. (Seda saab tagasi võtta!)", - "yacl.gui.undo": "Võta tagasi", - "yacl.gui.undo.tooltip": "Lähtestab kõik valikud muutmise-eelsetele väärtustele.", - "yacl.gui.fail_apply": "Rakendamine ebaõnnestus", - "yacl.gui.fail_apply.tooltip": "Esines viga ja muudatusi ei saadud rakendada.", - "yacl.gui.save_before_exit": "Salvesta enne väljumist!", - "yacl.gui.save_before_exit.tooltip": "Liidesest väljumiseks salvesta või loobu." -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/fr_fr.json b/src/main/resources/assets/yet-another-config-lib/lang/fr_fr.json deleted file mode 100644 index bc069cf..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/fr_fr.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "yacl.control.boolean.true": "Vrai", - "yacl.control.boolean.false": "Faux", - - "yacl.control.action.execute": "EXÉCUTION", - - "yacl.gui.save": "Sauvegarder les modifications", - "yacl.gui.save.tooltip": "Rend les changements effectués permanents.", - "yacl.gui.finished.tooltip": "Ferme la superposition.", - "yacl.gui.cancel.tooltip": "Oublie les changements en cours et ferme la superposition.", - "yacl.gui.reset.tooltip": "Réinitialise toutes les options par défaut. (Réversible !)", - "yacl.gui.undo": "Annuler", - "yacl.gui.undo.tooltip": "Rétablit toutes les options telles qu'elles étaient avant l'édition.", - "yacl.gui.fail_apply": "Échec de l'application", - "yacl.gui.fail_apply.tooltip": "Il y a eu une erreur et les changements n'ont pas pu être appliqués.", - "yacl.gui.save_before_exit": "Sauvegardez avant de quitter !", - "yacl.gui.save_before_exit.tooltip": "Sauvegardez ou annulez pour quitter la superposition.", - - "yacl.list.move_up": "Monter en haut", - "yacl.list.move_down": "Monter en bas", - "yacl.list.remove": "Retirer", - "yacl.list.add_top": "Nouvelle entrée", - "yacl.list.empty": "La liste est vide", - - "yacl.restart.title": "La configuration nécessite un redémarrage !", - "yacl.restart.message": "Une ou plusieurs options nécessitent que vous redémarriez le jeu pour appliquer les changements.", - "yacl.restart.yes": "Fermer Minecraft", - "yacl.restart.no": "Ignorer" -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/pl_pl.json b/src/main/resources/assets/yet-another-config-lib/lang/pl_pl.json deleted file mode 100644 index 49074ea..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/pl_pl.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "yacl.control.boolean.true": "Tak", - "yacl.control.boolean.false": "Nie", - - "yacl.control.action.execute": "WYKONAJ", - - "yacl.gui.save": "Zapisz zmiany", - "yacl.gui.save.tooltip": "Sprawia, że wprowadzone zmiany są trwałe.", - "yacl.gui.finished.tooltip": "Zamyka GUI.", - "yacl.gui.cancel.tooltip": "Zapomina oczekujące zmiany i zamyka GUI.", - "yacl.gui.reset.tooltip": "Resetuje wszystkie opcje do wartości domyślnych. (To jest odwracalne!)", - "yacl.gui.undo": "Cofnij", - "yacl.gui.undo.tooltip": "Przywraca wszystkie opcje do stanu sprzed edycji.", - "yacl.gui.fail_apply": "Nie udało się zastosować", - "yacl.gui.fail_apply.tooltip": "Wystąpił błąd i nie udało się zastosować zmian.", - "yacl.gui.save_before_exit": "Zapisz przed wyjściem!", - "yacl.gui.save_before_exit.tooltip": "Zapisz lub anuluj, aby wyjść z GUI.", - - "yacl.restart.title": "Konfiguracja wymaga restartu!", - "yacl.restart.message": "Jedna lub więcej opcji wymaga ponownego uruchomienia gry, aby zastosować zmiany.", - "yacl.restart.yes": "Zamknij Minecrafta", - "yacl.restart.no": "Ignoruj" -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/pt_br.json b/src/main/resources/assets/yet-another-config-lib/lang/pt_br.json deleted file mode 100644 index 9d4ef8d..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/pt_br.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "yacl.control.boolean.true": "Verdadeiro", - "yacl.control.boolean.false": "Falso", - - "yacl.control.action.execute": "EXECUTAR", - - "yacl.gui.save": "Salvar Mudanças", - "yacl.gui.save.tooltip": "Faz as mudanças serem permanentes.", - "yacl.gui.finished.tooltip": "Fecha o GUI.", - "yacl.gui.cancel.tooltip": "Esquece as mudanças pendentes e fecha o GUI.", - "yacl.gui.reset.tooltip": "Reinicia todas as opções para o valor padrão. (Isso é irreversível!)", - "yacl.gui.undo": "Desfazer", - "yacl.gui.undo.tooltip": "Reverte todas as opções como elas estavam antes de serem editadas.", - "yacl.gui.fail_apply": "Falha na aplicação", - "yacl.gui.fail_apply.tooltip": "Houve um erro e as mudanças não puderam ser aplicadas.", - "yacl.gui.save_before_exit": "Salve antes de sair!", - "yacl.gui.save_before_exit.tooltip": "Salve ou calcele para sair do GUI." -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/ru_ru.json b/src/main/resources/assets/yet-another-config-lib/lang/ru_ru.json deleted file mode 100644 index 5725d34..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/ru_ru.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "yacl.control.boolean.true": "§atrue", - "yacl.control.boolean.false": "§cfalse", - - "yacl.control.action.execute": "Выполнить", - - "yacl.gui.save": "Сохранить", - "yacl.gui.save.tooltip": "Сохранить изменения до следующего редактирования.", - "yacl.gui.finished.tooltip": "Закрыть меню.", - "yacl.gui.cancel": "Назад", - "yacl.gui.cancel.tooltip": "Отменить изменения и закрыть настройки.", - "yacl.gui.reset.tooltip": "Сбросить все настройки до значений по умолчанию (их можно восстановить).", - "yacl.gui.undo": "Отменить", - "yacl.gui.undo.tooltip": "Вернуть все настройки к состоянию, в котором они были до изменений.", - "yacl.gui.fail_apply": "Не удалось сохранить", - "yacl.gui.fail_apply.tooltip": "Возникла ошибка; изменения невозможно применить.", - "yacl.gui.save_before_exit": "Сохраните перед закрытием", - "yacl.gui.save_before_exit.tooltip": "Сохраните или отмените изменения, чтобы закрыть настройки.", - - "yacl.restart.title": "Настройки требуют перезагрузки.", - "yacl.restart.message": "Одна или несколько настроек требует перезапуска игры для применения изменений.", - "yacl.restart.yes": "Закрыть Minecraft", - "yacl.restart.no": "Игнорировать" -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/sl_si.json b/src/main/resources/assets/yet-another-config-lib/lang/sl_si.json deleted file mode 100644 index 743dd4d..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/sl_si.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "yacl.control.boolean.true": "Vklopljeno", - "yacl.control.boolean.false": "Izklopljeno", - - "yacl.control.action.execute": "POŽENI", - - "yacl.gui.save": "Shrani spremembe", - "yacl.gui.save.tooltip": "Uvede trajne spremembe.", - "yacl.gui.finished.tooltip": "Zapre meni.", - "yacl.gui.cancel.tooltip": "Zavrže neshranjene spremembe in zapre meni.", - "yacl.gui.reset.tooltip": "Ponastavi vse možnosti na privzete. (To se da razveljaviti!)", - "yacl.gui.undo": "Razveljavi", - "yacl.gui.undo.tooltip": "Ponastavi vse možnosti na take kot pred spreminjanjem.", - "yacl.gui.fail_apply": "Napaka pri uveljavljanju", - "yacl.gui.fail_apply.tooltip": "Prišlo je do napake pri uveljavljanju sprememb.", - "yacl.gui.save_before_exit": "Shrani pred izhodom!", - "yacl.gui.save_before_exit.tooltip": "Shrani ali prekliči za izhod iz menija.", - "yacl.restart.title": "Nastavitve potrebujejo ponovni zagon!", - "yacl.restart.message": "Vsaj ena izmed nastavitev potrebuje ponovni zagon igre za uveljavitev.", - "yacl.restart.yes": "Zapri Minecraft", - "yacl.restart.no": "Prezri" -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/zh_cn.json b/src/main/resources/assets/yet-another-config-lib/lang/zh_cn.json deleted file mode 100644 index 9307c9b..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/zh_cn.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "yacl.control.boolean.true": "是", - "yacl.control.boolean.false": "否", - - "yacl.control.action.execute": "执行", - - "yacl.gui.save": "保存更改", - "yacl.gui.save.tooltip": "永久保存所做更改。", - "yacl.gui.finished.tooltip": "关闭 GUI。", - "yacl.gui.cancel.tooltip": "忽略犹豫不决的更改然后关闭 GUI。", - "yacl.gui.reset.tooltip": "将所有选项重置为默认值。(这是可逆的!)", - "yacl.gui.undo": "撤销", - "yacl.gui.undo.tooltip": "将所有选项恢复到编辑前的状态。", - "yacl.gui.fail_apply": "应用失败", - "yacl.gui.fail_apply.tooltip": "有一个错误以至于更改不能被应用。", - "yacl.gui.save_before_exit": "退出前保存!", - "yacl.gui.save_before_exit.tooltip": "保存或取消以退出 GUI。", - - "yacl.list.move_up": "上移", - "yacl.list.move_down": "下移", - "yacl.list.remove": "移除", - "yacl.list.add_top": "新条目", - "yacl.list.empty": "列表为空", - - "yacl.restart.title": "配置需要重新启动!", - "yacl.restart.message": "一个或多个选项需要你重新启动游戏来应用这些更改。", - "yacl.restart.yes": "关闭 Minecraft", - "yacl.restart.no": "忽略" -} diff --git a/src/main/resources/assets/yet-another-config-lib/lang/zh_tw.json b/src/main/resources/assets/yet-another-config-lib/lang/zh_tw.json deleted file mode 100644 index 67d05a7..0000000 --- a/src/main/resources/assets/yet-another-config-lib/lang/zh_tw.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "yacl.control.boolean.true": "是", - "yacl.control.boolean.false": "否", - - "yacl.control.action.execute": "執行", - - "yacl.gui.save": "儲存變更", - "yacl.gui.save.tooltip": "儲存你的變更。", - "yacl.gui.finished.tooltip": "關閉介面。", - "yacl.gui.cancel.tooltip": "取消變更並關閉介面。", - "yacl.gui.reset.tooltip": "重設所有選項到預設。(這可以復原!)", - "yacl.gui.undo": "復原", - "yacl.gui.undo.tooltip": "將所有選項恢復成編輯前的狀態。", - "yacl.gui.fail_apply": "套用失敗", - "yacl.gui.fail_apply.tooltip": "發生錯誤,無法套用變更。", - "yacl.gui.save_before_exit": "在離開時儲存!", - "yacl.gui.save_before_exit.tooltip": "儲存或是取消並離開介面。", - - "yacl.restart.title": "變更設定需要重開遊戲!", - "yacl.restart.message": "一個或多個選項需要你重開遊戲才能套用變更。", - "yacl.restart.yes": "關閉 Minecraft", - "yacl.restart.no": "忽略" -} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json deleted file mode 100644 index cc2e6b9..0000000 --- a/src/main/resources/fabric.mod.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "schemaVersion": 1, - "id": "${id}", - "version": "${version}", - "name": "${name}", - "description": "${description}", - "authors": [ - "isXander" - ], - "contact": { - "homepage": "https://isxander.dev", - "issues": "https://github.com/${github}/issues", - "sources": "https://github.com/${github}" - }, - "icon": "yacl-128x.png", - "license": "LGPL-3.0-or-later", - "environment": "*", - "entrypoints": { - - }, - "depends": { - "fabricloader": ">=0.14.0", - "minecraft": "~1.19.4", - "java": ">=17", - "fabric-resource-loader-v0": "*" - }, - "mixins": [ - { - "config": "yet-another-config-lib.client.mixins.json", - "environment": "client" - } - ], - "accessWidener": "yacl.accesswidener", - "custom": { - "modmenu": { - "badges": ["library"] - } - } -} diff --git a/src/main/resources/yacl-128x.png b/src/main/resources/yacl-128x.png Binary files differdeleted file mode 100644 index c86981c..0000000 --- a/src/main/resources/yacl-128x.png +++ /dev/null diff --git a/src/main/resources/yacl.accesswidener b/src/main/resources/yacl.accesswidener deleted file mode 100644 index 3a65a38..0000000 --- a/src/main/resources/yacl.accesswidener +++ /dev/null @@ -1,6 +0,0 @@ -accessWidener v1 named - -extendable method net/minecraft/client/gui/components/AbstractSelectionList children ()Ljava/util/List; -extendable method net/minecraft/client/gui/components/AbstractSelectionList getEntryAtPosition (DD)Lnet/minecraft/client/gui/components/AbstractSelectionList$Entry; -accessible class net/minecraft/client/gui/components/AbstractSelectionList$Entry -extendable method net/minecraft/client/gui/components/AbstractButton getTextureY ()I |