Skip to content

Commit

Permalink
Change translation keys
Browse files Browse the repository at this point in the history
Update build dependencies
Bump version
  • Loading branch information
PepperCode1 committed Apr 30, 2021
1 parent 76e4587 commit d1456f4
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 51 deletions.
17 changes: 9 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.5-SNAPSHOT'
id 'fabric-loom' version '0.6-SNAPSHOT'
id 'maven-publish'
}

Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/main/java/me/pepperbell/itemmodelfix/ItemModelFix.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -14,6 +13,7 @@
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.TranslatableText;

@SuppressWarnings("deprecation")
public class ClothConfigFactory implements ConfigScreenFactory<Screen> {
private Config config;

Expand All @@ -27,23 +27,23 @@ 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;
}
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());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.pepperbell.itemmodelfix.data;
package me.pepperbell.itemmodelfix.config;

import java.io.File;
import java.io.FileReader;
Expand Down
Original file line number Diff line number Diff line change
@@ -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")) {
Expand Down
22 changes: 11 additions & 11 deletions src/main/resources/assets/itemmodelfix/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -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."
}
22 changes: 11 additions & 11 deletions src/main/resources/assets/itemmodelfix/lang/ru_ru.json
Original file line number Diff line number Diff line change
@@ -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высокого разрешения."
}
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"environment": "client",
"entrypoints": {
"modmenu": [
"me.pepperbell.itemmodelfix.integration.ModMenuImpl"
"me.pepperbell.itemmodelfix.config.ModMenuApiImpl"
]
},
"mixins": [
Expand Down

0 comments on commit d1456f4

Please sign in to comment.