aboutsummaryrefslogtreecommitdiff
path: root/defaults/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'defaults/src/main')
-rw-r--r--defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/config/CITResewnDefaultsConfigScreenFactory.java9
-rw-r--r--defaults/src/main/resources/assets/citresewn-defaults/lang/en_us.json7
2 files changed, 11 insertions, 5 deletions
diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/config/CITResewnDefaultsConfigScreenFactory.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/config/CITResewnDefaultsConfigScreenFactory.java
index 6d89bc6..95b0579 100644
--- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/config/CITResewnDefaultsConfigScreenFactory.java
+++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/config/CITResewnDefaultsConfigScreenFactory.java
@@ -4,7 +4,6 @@ import io.shcm.shsupercm.fabric.fletchingtable.api.Entrypoint;
import me.shedaniel.clothconfig2.api.ConfigBuilder;
import me.shedaniel.clothconfig2.api.ConfigCategory;
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
-import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.LiteralText;
import net.minecraft.text.TranslatableText;
@@ -17,13 +16,17 @@ public class CITResewnDefaultsConfigScreenFactory {
ConfigBuilder builder = ConfigBuilder.create()
.setParentScreen(parent)
- .setTitle(new TranslatableText("config.citresewn.defaults.title"))
+ .setTitle(new TranslatableText("config.citresewn-defaults.title"))
.setSavingRunnable(currentConfig::write);
ConfigCategory category = builder.getOrCreateCategory(new LiteralText(""));
ConfigEntryBuilder entryBuilder = builder.entryBuilder();
-
+ category.addEntry(entryBuilder.startFloatField(new TranslatableText("config.citresewn-defaults.type_enchantment_scroll_multiplier.title"), currentConfig.type_enchantment_scroll_multiplier)
+ .setTooltip(new TranslatableText("config.citresewn-defaults.type_enchantment_scroll_multiplier.tooltip"))
+ .setSaveConsumer(newConfig -> currentConfig.type_enchantment_scroll_multiplier = newConfig)
+ .setDefaultValue(defaultConfig.type_enchantment_scroll_multiplier)
+ .build());
return builder.build();
}
diff --git a/defaults/src/main/resources/assets/citresewn-defaults/lang/en_us.json b/defaults/src/main/resources/assets/citresewn-defaults/lang/en_us.json
index 72784ed..5f68e45 100644
--- a/defaults/src/main/resources/assets/citresewn-defaults/lang/en_us.json
+++ b/defaults/src/main/resources/assets/citresewn-defaults/lang/en_us.json
@@ -1,4 +1,7 @@
{
- "config.citresewn.defaults.title": "CIT Resewn: Defaults",
- "config.citresewn.defaults.tooltip": "Go to the defaults' config menu"
+ "config.citresewn-defaults.title": "CIT Resewn: Defaults",
+ "config.citresewn-defaults.tooltip": "Go to the defaults' config menu",
+
+ "config.citresewn-defaults.type_enchantment_scroll_multiplier.title": "Type Enchantment: Scroll multiplier",
+ "config.citresewn-defaults.type_enchantment_scroll_multiplier.tooltip": "A general multiplier for how fast cit enchantment glints scroll"
} \ No newline at end of file