diff options
author | SHsuperCM <shsupercm@gmail.com> | 2022-03-04 09:55:50 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2022-03-04 10:03:28 +0200 |
commit | d2a7a6b219ff2b229774dba336417822ec019b7b (patch) | |
tree | 3ab4c2fd99a7420feaa502e78e0816be1e585f57 /defaults/src/main/java/shcm | |
parent | 5b465c7ec114700e51f22dff6a68e594bef5bc5b (diff) | |
download | CITResewn-d2a7a6b219ff2b229774dba336417822ec019b7b.tar.gz CITResewn-d2a7a6b219ff2b229774dba336417822ec019b7b.tar.bz2 CITResewn-d2a7a6b219ff2b229774dba336417822ec019b7b.zip |
Added back enchantment scroll multiplier config
Diffstat (limited to 'defaults/src/main/java/shcm')
-rw-r--r-- | defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/config/CITResewnDefaultsConfigScreenFactory.java | 9 |
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(); } |