mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-17 17:55:09 +01:00
- fix bug: avoid the crash due to Identifier syntax not legitimate.
- new feature: multiple expect values for `@Condition` - change: use `net.minecraft.client.gui.widget.CheckboxWidget` for boolean `@Entry` instead of `net.minecraft.client.gui.widget.ButtonWidget` - misc: cleanup for `en_us.json` and example code & bump version
This commit is contained in:
@@ -74,7 +74,7 @@ public class MidnightConfigExample extends MidnightConfig {
|
||||
@Entry(category = CONDITIONS, name="Turn me on!")
|
||||
public static boolean turnMeOn = false;
|
||||
@Condition(requiredOption = "modid:turnMeOn", visibleButLocked = true)
|
||||
@Entry(category = CONDITIONS, name="Turn me off (locked if modid:turnMeOn is false)!")
|
||||
@Entry(category = CONDITIONS, name="Turn me off (locked)!")
|
||||
public static Boolean turnMeOff = true;
|
||||
@Condition(requiredOption = "turnMeOn") // You can also use multiple conditions for the same entry
|
||||
@Condition(requiredOption = "modid:turnMeOff", requiredValue = "false")
|
||||
@@ -101,6 +101,12 @@ public class MidnightConfigExample extends MidnightConfig {
|
||||
@Comment(category = CONDITIONS, name="⭐ Correct! Quilt (and Fabric) are the best!", centered = true)
|
||||
public static Comment answerQuilt;
|
||||
|
||||
@Entry(category = CONDITIONS, name="Enter any prime number below 10")
|
||||
public static int primeNumber = 0;
|
||||
@Comment(category = CONDITIONS, name="Correct!")
|
||||
@Condition(requiredOption = "primeNumber", requiredValue = {"2", "3", "5", "7"})
|
||||
public static Comment answerPrime;
|
||||
|
||||
@Condition(requiredOption = "midnightlib:config_screen_list", requiredValue = "FALSE") // Access options of other mods that are also using MidnightLib
|
||||
@Comment(category = CONDITIONS) public static Comment spaceracer;
|
||||
@Condition(requiredOption = "midnightlib:config_screen_list", requiredValue = "FALSE")
|
||||
|
||||
Reference in New Issue
Block a user