diff --git a/build.gradle b/build.gradle index 7eb8168..a49fa9c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.5-SNAPSHOT' + id 'fabric-loom' version '0.6-SNAPSHOT' id 'maven-publish' } @@ -11,6 +11,12 @@ version = project.mod_version group = project.maven_group repositories { + maven { + url = "https://maven.terraformersmc.com/" + } + maven { + url = "https://maven.shedaniel.me/" + } } dependencies { @@ -22,14 +28,9 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modApi("io.github.prospector:modmenu:${modmenu_version}") { - exclude(group: "net.fabricmc.fabric-api") - } + modCompileOnly "com.terraformersmc:modmenu:${modmenu_version}" - modApi("me.shedaniel.cloth:config-2:${clothconfig_version}") { - exclude(group: "net.fabricmc.fabric-api") - } - //include "me.shedaniel.cloth:config-2:${clothconfig_version}" + modCompileOnly "me.shedaniel.cloth:cloth-config-fabric:${cloth_config_version}" } processResources { diff --git a/gradle.properties b/gradle.properties index 95bedcb..5173341 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,23 +1,23 @@ # Done to increase the memory available to gradle. -org.gradle.jvmargs=-Xmx1G +org.gradle.jvmargs = -Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version = 1.16.4 + minecraft_version = 1.16.5 # https://maven.fabricmc.net/net/fabricmc/yarn - yarn_mappings = 1.16.4+build.9 + yarn_mappings = 1.16.5+build.6 # https://maven.fabricmc.net/net/fabricmc/fabric-loader - loader_version = 0.11.0 + loader_version = 0.11.3 # Mod Properties - mod_version = 1.0.0 + mod_version = 1.0.1 maven_group = me.pepperbell archives_base_name = item-model-fix # Dependencies # https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version = 0.29.3+1.16 - # https://maven.fabricmc.net/io/github/prospector/modmenu - modmenu_version = 1.14.9+build.14 + fabric_version = 0.33.1+1.16 + # https://maven.terraformersmc.com/releases/com/terraformersmc/modmenu + modmenu_version = 1.16.9 # https://www.curseforge.com/minecraft/mc-mods/cloth-config/files - clothconfig_version = 4.8.3 + cloth_config_version = 4.11.19 diff --git a/src/main/java/me/pepperbell/itemmodelfix/ItemModelFix.java b/src/main/java/me/pepperbell/itemmodelfix/ItemModelFix.java index f6f552e..758c269 100644 --- a/src/main/java/me/pepperbell/itemmodelfix/ItemModelFix.java +++ b/src/main/java/me/pepperbell/itemmodelfix/ItemModelFix.java @@ -6,7 +6,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import me.pepperbell.itemmodelfix.data.Config; +import me.pepperbell.itemmodelfix.config.Config; import net.fabricmc.loader.api.FabricLoader; public class ItemModelFix { diff --git a/src/main/java/me/pepperbell/itemmodelfix/integration/ClothConfigFactory.java b/src/main/java/me/pepperbell/itemmodelfix/config/ClothConfigFactory.java similarity index 74% rename from src/main/java/me/pepperbell/itemmodelfix/integration/ClothConfigFactory.java rename to src/main/java/me/pepperbell/itemmodelfix/config/ClothConfigFactory.java index ba31dde..76cfb51 100644 --- a/src/main/java/me/pepperbell/itemmodelfix/integration/ClothConfigFactory.java +++ b/src/main/java/me/pepperbell/itemmodelfix/config/ClothConfigFactory.java @@ -1,10 +1,9 @@ -package me.pepperbell.itemmodelfix.integration; +package me.pepperbell.itemmodelfix.config; import java.util.Locale; import java.util.Optional; import io.github.prospector.modmenu.api.ConfigScreenFactory; -import me.pepperbell.itemmodelfix.data.Config; import me.pepperbell.itemmodelfix.util.ModelGenerationType; import me.pepperbell.itemmodelfix.util.ParsingUtil; import me.shedaniel.clothconfig2.api.ConfigBuilder; @@ -14,6 +13,7 @@ import net.minecraft.client.gui.screen.Screen; import net.minecraft.text.TranslatableText; +@SuppressWarnings("deprecation") public class ClothConfigFactory implements ConfigScreenFactory { private Config config; @@ -27,12 +27,12 @@ public Screen create(Screen parent) { ConfigBuilder builder = ConfigBuilder.create() .setParentScreen(parent) - .setTitle(new TranslatableText("itemmodelfix.config.title")) + .setTitle(new TranslatableText("screen.itemmodelfix.config.title")) .setSavingRunnable(savingRunnable); ConfigEntryBuilder entryBuilder = builder.entryBuilder(); - ConfigCategory general = builder.getOrCreateCategory(new TranslatableText("itemmodelfix.config.category.general")); - general.addEntry(entryBuilder.startEnumSelector(new TranslatableText("itemmodelfix.options.generation_type"), ModelGenerationType.class, config.getOptions().generationType) + ConfigCategory general = builder.getOrCreateCategory(new TranslatableText("category.itemmodelfix.general")); + general.addEntry(entryBuilder.startEnumSelector(new TranslatableText("option.itemmodelfix.generation_type"), ModelGenerationType.class, config.getOptions().generationType) .setSaveConsumer((value) -> { if (config.getOptions().generationType != value) { savingRunnable.reloadResources = true; @@ -40,10 +40,10 @@ public Screen create(Screen parent) { config.getOptions().generationType = value; }) .setEnumNameProvider((value) -> { - return new TranslatableText("itemmodelfix.options.generation_type."+value.toString().toLowerCase(Locale.ROOT)); + return new TranslatableText("option.itemmodelfix.generation_type." + value.name().toLowerCase(Locale.ROOT)); }) .setTooltipSupplier((value) -> { - return Optional.ofNullable(ParsingUtil.parseNewlines("itemmodelfix.options.generation_type."+value.toString().toLowerCase(Locale.ROOT)+".tooltip")); + return Optional.ofNullable(ParsingUtil.parseNewlines("option.itemmodelfix.generation_type." + value.name().toLowerCase(Locale.ROOT) + ".tooltip")); }) .setDefaultValue(Config.Options.DEFAULT.generationType) .build()); diff --git a/src/main/java/me/pepperbell/itemmodelfix/data/Config.java b/src/main/java/me/pepperbell/itemmodelfix/config/Config.java similarity index 97% rename from src/main/java/me/pepperbell/itemmodelfix/data/Config.java rename to src/main/java/me/pepperbell/itemmodelfix/config/Config.java index 4324e6d..dbb54ab 100644 --- a/src/main/java/me/pepperbell/itemmodelfix/data/Config.java +++ b/src/main/java/me/pepperbell/itemmodelfix/config/Config.java @@ -1,4 +1,4 @@ -package me.pepperbell.itemmodelfix.data; +package me.pepperbell.itemmodelfix.config; import java.io.File; import java.io.FileReader; diff --git a/src/main/java/me/pepperbell/itemmodelfix/integration/ModMenuImpl.java b/src/main/java/me/pepperbell/itemmodelfix/config/ModMenuApiImpl.java similarity index 77% rename from src/main/java/me/pepperbell/itemmodelfix/integration/ModMenuImpl.java rename to src/main/java/me/pepperbell/itemmodelfix/config/ModMenuApiImpl.java index 8818db8..e2476f1 100644 --- a/src/main/java/me/pepperbell/itemmodelfix/integration/ModMenuImpl.java +++ b/src/main/java/me/pepperbell/itemmodelfix/config/ModMenuApiImpl.java @@ -1,11 +1,12 @@ -package me.pepperbell.itemmodelfix.integration; +package me.pepperbell.itemmodelfix.config; import io.github.prospector.modmenu.api.ConfigScreenFactory; import io.github.prospector.modmenu.api.ModMenuApi; import me.pepperbell.itemmodelfix.ItemModelFix; import net.fabricmc.loader.api.FabricLoader; -public class ModMenuImpl implements ModMenuApi { +@SuppressWarnings("deprecation") +public class ModMenuApiImpl implements ModMenuApi { @Override public ConfigScreenFactory getModConfigScreenFactory() { if (FabricLoader.getInstance().isModLoaded("cloth-config2")) { diff --git a/src/main/resources/assets/itemmodelfix/lang/en_us.json b/src/main/resources/assets/itemmodelfix/lang/en_us.json index 0ebd5c4..b21187b 100644 --- a/src/main/resources/assets/itemmodelfix/lang/en_us.json +++ b/src/main/resources/assets/itemmodelfix/lang/en_us.json @@ -1,13 +1,13 @@ { - "itemmodelfix.config.title": "Item Model Fix Configuration", - "itemmodelfix.config.category.general": "General", - "itemmodelfix.options.generation_type": "Item Model Generation Type", - "itemmodelfix.options.generation_type.vanilla": "Vanilla", - "itemmodelfix.options.generation_type.vanilla.tooltip": "Performance impact: \u00A7b\u00A7lnone\u00A7r\nUses Vanilla model generation.", - "itemmodelfix.options.generation_type.unlerp": "Unlerp", - "itemmodelfix.options.generation_type.unlerp.tooltip": "Performance impact: \u00A7b\u00A7lnone\u00A7r\nUses Vanilla model generation, but\napplies some math to make it look correct.\nMay cause flickering along model edges.", - "itemmodelfix.options.generation_type.outline": "Outline", - "itemmodelfix.options.generation_type.outline.tooltip": "Performance impact: \u00A7b\u00A7lnone\u00A7r\nSame as Unlerp mode, but uses a\ndifferent generation algorithm to\nprevent enchantment glint flickering.", - "itemmodelfix.options.generation_type.pixel": "Pixel", - "itemmodelfix.options.generation_type.pixel.tooltip": "Performance impact: \u00A7b\u00A7lnone\u00A7r-\u00A7a\u00A7llow\u00A7r\nGenerates all pixels individually. Provides\nbest results but causes a larger impact\nwith higher resolution resource packs." + "screen.itemmodelfix.config.title": "Item Model Fix Configuration", + "category.itemmodelfix.general": "General", + "option.itemmodelfix.generation_type": "Item Model Generation Type", + "option.itemmodelfix.generation_type.vanilla": "Vanilla", + "option.itemmodelfix.generation_type.vanilla.tooltip": "Performance impact: \u00A7b\u00A7lnone\u00A7r\nUses Vanilla model generation.", + "option.itemmodelfix.generation_type.unlerp": "Unlerp", + "option.itemmodelfix.generation_type.unlerp.tooltip": "Performance impact: \u00A7b\u00A7lnone\u00A7r\nUses Vanilla model generation, but\napplies some math to make it look correct.\nMay cause flickering along model edges.", + "option.itemmodelfix.generation_type.outline": "Outline", + "option.itemmodelfix.generation_type.outline.tooltip": "Performance impact: \u00A7b\u00A7lnone\u00A7r\nSame as Unlerp mode, but uses a\ndifferent generation algorithm to\nprevent enchantment glint flickering.", + "option.itemmodelfix.generation_type.pixel": "Pixel", + "option.itemmodelfix.generation_type.pixel.tooltip": "Performance impact: \u00A7b\u00A7lnone\u00A7r-\u00A7a\u00A7llow\u00A7r\nGenerates all pixels individually. Provides\nbest results but causes a larger impact\nwith higher resolution resource packs." } diff --git a/src/main/resources/assets/itemmodelfix/lang/ru_ru.json b/src/main/resources/assets/itemmodelfix/lang/ru_ru.json index 87f7314..0cd974c 100644 --- a/src/main/resources/assets/itemmodelfix/lang/ru_ru.json +++ b/src/main/resources/assets/itemmodelfix/lang/ru_ru.json @@ -1,13 +1,13 @@ { - "itemmodelfix.config.title": "Настройки Item Model Fix", - "itemmodelfix.config.category.general": "Основные", - "itemmodelfix.options.generation_type": "Тип генерации модели предмета", - "itemmodelfix.options.generation_type.vanilla": "Ванильный", - "itemmodelfix.options.generation_type.vanilla.tooltip": "Влияние на производительность: \u00A7b\u00A7lотсутствует\u00A7r\nИспользует ванильную генерацию модели.", - "itemmodelfix.options.generation_type.unlerp": "Unlerp", - "itemmodelfix.options.generation_type.unlerp.tooltip": "Влияние на производительность: \u00A7b\u00A7lотсутствует\u00A7r\nИспользует ванильную генерацию модели, но\nс некоторыми математическими вычислениями,\nчтобы она выглядела правильно. Может вызвать\nмерцание эффекта зачарования по краям модели.", - "itemmodelfix.options.generation_type.outline": "Границы", - "itemmodelfix.options.generation_type.outline.tooltip": "Влияние на производительность: \u00A7b\u00A7lотсутствует\u00A7r\nПохож на предыдущий, но использует другой\nалгоритм генерации, чтобы исправить\nмерцание зачарованного предмета.", - "itemmodelfix.options.generation_type.pixel": "Воксели", - "itemmodelfix.options.generation_type.pixel.tooltip": "Влияние на производительность: \u00A7a\u00A7lнизкая\u00A7r\nГенерирует каждый воксель отдельно.\nОбеспечивает наилучший результат, но\nвызывает больше нагрузки с текстурами\nвысокого разрешения." + "screen.itemmodelfix.config.title": "Настройки Item Model Fix", + "category.itemmodelfix.general": "Основные", + "option.itemmodelfix.generation_type": "Тип генерации модели предмета", + "option.itemmodelfix.generation_type.vanilla": "Ванильный", + "option.itemmodelfix.generation_type.vanilla.tooltip": "Влияние на производительность: \u00A7b\u00A7lотсутствует\u00A7r\nИспользует ванильную генерацию модели.", + "option.itemmodelfix.generation_type.unlerp": "Unlerp", + "option.itemmodelfix.generation_type.unlerp.tooltip": "Влияние на производительность: \u00A7b\u00A7lотсутствует\u00A7r\nИспользует ванильную генерацию модели, но\nс некоторыми математическими вычислениями,\nчтобы она выглядела правильно. Может вызвать\nмерцание эффекта зачарования по краям модели.", + "option.itemmodelfix.generation_type.outline": "Границы", + "option.itemmodelfix.generation_type.outline.tooltip": "Влияние на производительность: \u00A7b\u00A7lотсутствует\u00A7r\nПохож на предыдущий, но использует другой\nалгоритм генерации, чтобы исправить\nмерцание зачарованного предмета.", + "option.itemmodelfix.generation_type.pixel": "Воксели", + "option.itemmodelfix.generation_type.pixel.tooltip": "Влияние на производительность: \u00A7a\u00A7lнизкая\u00A7r\nГенерирует каждый воксель отдельно.\nОбеспечивает наилучший результат, но\nвызывает больше нагрузки с текстурами\nвысокого разрешения." } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 31c3cf1..8300b90 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -20,7 +20,7 @@ "environment": "client", "entrypoints": { "modmenu": [ - "me.pepperbell.itemmodelfix.integration.ModMenuImpl" + "me.pepperbell.itemmodelfix.config.ModMenuApiImpl" ] }, "mixins": [