aboutsummaryrefslogtreecommitdiff
path: root/defaults/src/main/java/shcm
diff options
context:
space:
mode:
Diffstat (limited to 'defaults/src/main/java/shcm')
-rw-r--r--defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/config/CITResewnDefaultsConfigScreenFactory.java9
1 files changed, 6 insertions, 3 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();
}