From d2a7a6b219ff2b229774dba336417822ec019b7b Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Fri, 4 Mar 2022 09:55:50 +0200 Subject: Added back enchantment scroll multiplier config --- .../defaults/config/CITResewnDefaultsConfigScreenFactory.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'defaults/src/main/java/shcm') 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(); } -- cgit