aboutsummaryrefslogtreecommitdiff
path: root/forge
diff options
context:
space:
mode:
authorhackthetime <l4bg0jb7@duck.com>2023-11-16 11:24:20 +0100
committerhackthetime <l4bg0jb7@duck.com>2023-11-16 11:24:20 +0100
commitca8c9a40cbd393ddc1559382fb29a7f3a7c3a646 (patch)
tree78dd4d4083879075c3661b2ee224b3bdd1ca2d56 /forge
parentce208c31079689527a489eab2b54765591a8507f (diff)
downloadBBsentials-ca8c9a40cbd393ddc1559382fb29a7f3a7c3a646.tar.gz
BBsentials-ca8c9a40cbd393ddc1559382fb29a7f3a7c3a646.tar.bz2
BBsentials-ca8c9a40cbd393ddc1559382fb29a7f3a7c3a646.zip
working on moulconfig. re-added debug thread instead of using execution service because it slowly but surely takes all threads.
Diffstat (limited to 'forge')
-rw-r--r--forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java8
-rw-r--r--forge/src/main/java/de/hype/bbsentials/forge/client/categories/FirstCategory.java54
2 files changed, 57 insertions, 5 deletions
diff --git a/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java b/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java
index 24bca8a..93ecd99 100644
--- a/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java
+++ b/forge/src/main/java/de/hype/bbsentials/forge/client/MoulConfig.java
@@ -1,6 +1,7 @@
package de.hype.bbsentials.forge.client;
import com.google.gson.annotations.Expose;
+import de.hype.bbsentials.forge.client.categories.FirstCategory;
import io.github.moulberry.moulconfig.Config;
import io.github.moulberry.moulconfig.annotations.Category;
import io.github.moulberry.moulconfig.annotations.ConfigEditorDropdown;
@@ -11,20 +12,17 @@ import io.github.moulberry.moulconfig.processor.BuiltinMoulConfigGuis;
import io.github.moulberry.moulconfig.processor.ConfigProcessorDriver;
import io.github.moulberry.moulconfig.processor.MoulConfigProcessor;
import net.minecraft.client.Minecraft;
+import net.minecraftforge.common.config.ConfigCategory;
import static de.hype.bbsentials.common.client.BBsentials.config;
public class MoulConfig extends Config {
- @Expose
- @ConfigOption(name = "test", desc = "dropdown test")
- @ConfigEditorDropdown(values = {"hi", "test"})
- public String test;
MoulConfigEditor<MoulConfig> editor;
MoulConfigProcessor<MoulConfig> processor;
@Expose
@Category(name = "First Category", desc = "This is the first category.")
- MoulConfig main = this;
+ public FirstCategory firstCategory = new FirstCategory();
public MoulConfig() {
processor = new MoulConfigProcessor<>(this);
diff --git a/forge/src/main/java/de/hype/bbsentials/forge/client/categories/FirstCategory.java b/forge/src/main/java/de/hype/bbsentials/forge/client/categories/FirstCategory.java
new file mode 100644
index 0000000..05aa511
--- /dev/null
+++ b/forge/src/main/java/de/hype/bbsentials/forge/client/categories/FirstCategory.java
@@ -0,0 +1,54 @@
+package de.hype.bbsentials.forge.client.categories;
+
+import com.google.gson.annotations.Expose;
+import io.github.moulberry.moulconfig.annotations.*;
+
+import java.awt.*;
+
+public class FirstCategory {
+ @Expose
+ @ConfigOption(name = "ConfigEditorDropdown", desc = "ConfigEditorDropdown")
+ @ConfigEditorDropdown(values = {"hi", "test"})
+ public String test;
+
+ @Expose
+ @ConfigOption(name = "First Toggle", desc = "Enable this toggle to activate a feature.")
+ @ConfigEditorBoolean
+ public boolean firstToggle = false;
+
+ @Expose
+ @ConfigOption(name = "Color Editor", desc = "Color Editor")
+ @ConfigEditorColour
+ public Color color = Color.RED;
+
+ @Expose
+ @ConfigOption(name = "ConfigEditorInfoText", desc = "Info Text Sample")
+ @ConfigEditorInfoText(infoTitle = "ยง6Info Text Sample")
+ public String text = "";
+
+ @Expose
+ @ConfigOption(name = "Text Example", desc = "Text Sample")
+ @ConfigEditorText
+ public String textSample = "";
+
+ @Expose
+ @ConfigOption(name = "Slider Example", desc = "Slider Sample")
+ @ConfigEditorSlider(minStep = 10, maxValue = 100, minValue = 0)
+ public int i = 0;
+
+// @Expose
+// @ConfigOption(name = "Keybinding Example", desc = "Keybinding Sample")
+// @ConfigEditorKeybind(defaultKey = 12)
+// public ConfigEditorKeybind keybind = new KeyBinding("Craft",12,"");
+//
+// @Expose
+// @ConfigOption(name = "Button Example", desc = "Button Sample")
+// @ConfigEditorButton
+// public ConfigEditorButton button = new ConfigEditorButton();
+// @Expose
+// @ConfigOption(name = "Draggable List Example", desc = "Draggable List Sample")
+// @ConfigEditorDraggableList
+// public ConfigEditorDraggableList draggableList = new ConfigEditorDraggableList();
+
+
+}