You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ref: Better handling of collection settings (#171)
This pull request changes the way we store and display collection
settings by introducing two new classes being `CollectionSetting` and
`ClassCollectionSetting`. The former is a generic setting that codec's
comparable values by their `toString` function while the latter codec's
non-comparable values (classes, any, etc) by their qualified name minus
the package location.
This allow for fine grained control over how custom collection settings
are stored and displayed.
---------
Co-authored-by: beanbag44 <pidgeonmaster64@gmail.com>
overrideval breakDelay by c.setting("Break Delay", 0, 0..6, 1, "The delay between breaking blocks", " tick(s)").group(baseGroup, Group.General).index()
57
58
58
59
// Timing
59
-
overrideval tickStageMask by c.setting("Break Stage Mask", setOf<TickEvent>(TickEvent.Input.Post), description ="The sub-tick timing at which break actions can be performed").group(baseGroup, Group.General).index()
60
+
overrideval tickStageMask by c.setting("Break Stage Mask", ALL_STAGES.toSet(), setOf(TickEvent.Input.Post), description ="The sub-tick timing at which break actions can be performed").group(baseGroup, Group.General).index()
60
61
61
62
// Swap
62
63
overrideval swapMode by c.setting("Swap Mode", BreakConfig.SwapMode.End, "Decides when to swap to the best suited tool when breaking a block").group(baseGroup, Group.General).index()
overrideval eatOnHunger by c.setting("Eat On Hunger", true, "Whether to eat when hungry").group(baseGroup).index()
35
36
overrideval minFoodLevel by c.setting("Minimum Food Level", 6, 0..20, 1, "The minimum food level to eat food", " food level") { eatOnHunger }.group(baseGroup).index()
36
37
overrideval saturated by c.setting("Saturated", EatConfig.Saturation.EatSmart, "When to stop eating") { eatOnHunger }.group(baseGroup).index()
37
-
overrideval nutritiousFood by c.setting("Nutritious Food", nutritiousFoodDefaults, nutritiousFoodDefaults,"Items that are be considered nutritious") { eatOnHunger }.group(baseGroup).index()
38
+
overrideval nutritiousFood by c.setting("Nutritious Food", nutritiousFoodDefaults, description ="Items that are be considered nutritious") { eatOnHunger }.group(baseGroup).index()
38
39
overrideval selectionPriority by c.setting("Selection Priority", EatConfig.SelectionPriority.MostNutritious, "The priority for selecting food items") { eatOnHunger }.group(baseGroup).index()
39
40
overrideval eatOnFire by c.setting("Eat On Fire", true, "Whether to eat when on fire").group(baseGroup).index()
40
-
overrideval resistanceFood by c.setting("Resistance Food", resistanceFoodDefaults, resistanceFoodDefaults,"Items that give Fire Resistance") { eatOnFire }.group(baseGroup).index()
41
+
overrideval resistanceFood by c.setting("Resistance Food", resistanceFoodDefaults, description ="Items that give Fire Resistance") { eatOnFire }.group(baseGroup).index()
41
42
overrideval eatOnDamage by c.setting("Eat On Damage", true, "Whether to eat when damaged").group(baseGroup).index()
42
43
overrideval minDamage by c.setting("Minimum Damage", 10, 0..20, 1, "The minimum damage threshold to trigger eating") { eatOnDamage }.group(baseGroup).index()
43
-
overrideval regenerationFood by c.setting("Regeneration Food", regenerationFoodDefaults, regenerationFoodDefaults,"Items that give Regeneration") { eatOnDamage }.group(baseGroup).index()
44
+
overrideval regenerationFood by c.setting("Regeneration Food", regenerationFoodDefaults, description ="Items that give Regeneration") { eatOnDamage }.group(baseGroup).index()
44
45
overrideval ignoreBadFood by c.setting("Ignore Bad Food", true, "Whether to eat when the food is bad").group(baseGroup).index()
45
-
overrideval badFood by c.setting("Bad Food", negativeFoodDefaults, negativeFoodDefaults,"Items that are considered bad food") { ignoreBadFood }.group(baseGroup).index()
46
+
overrideval badFood by c.setting("Bad Food", negativeFoodDefaults, description ="Items that are considered bad food") { ignoreBadFood }.group(baseGroup).index()
overrideval swapDelay by c.setting("Swap Delay", 0, 0..3, 1, "The number of ticks delay before allowing another hotbar selection swap", " ticks").group(baseGroup).index()
32
33
overrideval swapsPerTick by c.setting("Swaps Per Tick", 3, 1..10, 1, "The number of hotbar selection swaps that can take place each tick") { swapDelay <=0 }.group(baseGroup).index()
33
34
overrideval swapPause by c.setting("Swap Pause", 0, 0..20, 1, "The delay in ticks to pause actions after switching to the slot", " ticks").group(baseGroup).index()
34
-
overrideval tickStageMask by c.setting("Hotbar Stage Mask", setOf<TickEvent>(TickEvent.Input.Post), description ="The sub-tick timing at which hotbar actions are performed").group(baseGroup).index()
35
+
overrideval tickStageMask by c.setting("Hotbar Stage Mask", ALL_STAGES.toSet(), setOf(TickEvent.Input.Post), description ="The sub-tick timing at which hotbar actions are performed").group(baseGroup).index()
0 commit comments