Skip to content

Commit 660022b

Browse files
committed
setting group cleanup
1 parent d66910d commit 660022b

36 files changed

Lines changed: 76 additions & 85 deletions

src/main/kotlin/com/lambda/config/AutomationConfig.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ open class AutomationConfig(
4848
Debug("Debug")
4949
}
5050

51-
override val buildConfig = BuildSettings(c = this, baseGroup = arrayOf(Group.Build))
52-
override val breakConfig = BreakSettings(c = this, baseGroup = arrayOf(Group.Break))
53-
override val interactConfig = InteractSettings(c = this, baseGroup = arrayOf(Group.Interact))
54-
override val rotationConfig = RotationSettings(c = this, baseGroup = arrayOf(Group.Rotation))
55-
override val inventoryConfig = InventorySettings(c = this, baseGroup = arrayOf(Group.Inventory))
56-
override val hotbarConfig = HotbarSettings(c = this, baseGroup = arrayOf(Group.Hotbar))
57-
override val eatConfig = EatSettings(c = this, baseGroup = arrayOf(Group.Eat))
51+
override val buildConfig = BuildSettings(this, Group.Build)
52+
override val breakConfig = BreakSettings(this, Group.Break)
53+
override val interactConfig = InteractSettings(this, Group.Interact)
54+
override val rotationConfig = RotationSettings(this, Group.Rotation)
55+
override val inventoryConfig = InventorySettings(this, Group.Inventory)
56+
override val hotbarConfig = HotbarSettings(this, Group.Hotbar)
57+
override val eatConfig = EatSettings(this, Group.Eat)
5858

5959
companion object {
6060
context(module: Module)

src/main/kotlin/com/lambda/config/groups/BreakSettings.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ import net.minecraft.block.Block
3232
import java.awt.Color
3333

3434
open class BreakSettings(
35-
prefix: String = "",
3635
c: Configurable,
3736
vararg baseGroup: NamedEnum,
37+
prefix: String = "",
3838
override val visibility: () -> Boolean = { true },
3939
) : SettingGroup(c), BreakConfig {
4040
private enum class Group(override val displayName: String) : NamedEnum {
@@ -112,7 +112,7 @@ open class BreakSettings(
112112

113113
// Outline
114114
override val outline by c.setting("${prefix}Outline", true, "Renders the lines of the box to display break progress") { visibility() && renders }.group(*baseGroup, Group.Cosmetic).index()
115-
override val outlineConfig = WorldLineSettings("${prefix}Outline ", c, baseGroup = arrayOf(*baseGroup, Group.Cosmetic)) { visibility() && outline }.apply {
115+
override val outlineConfig = WorldLineSettings(c, *baseGroup, Group.Cosmetic, prefix = "${prefix}Outline ") { visibility() && outline }.apply {
116116
c.applyEdits {
117117
hide(::startColor, ::endColor)
118118
}

src/main/kotlin/com/lambda/config/groups/BuildSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import com.lambda.util.NamedEnum
2424
import kotlin.math.max
2525

2626
class BuildSettings(
27-
prefix: String = "",
2827
c: Configurable,
2928
vararg baseGroup: NamedEnum,
29+
prefix: String = "",
3030
override val visibility: () -> Boolean = { true },
3131
) : SettingGroup(c), BuildConfig {
3232
enum class Group(override val displayName: String) : NamedEnum {

src/main/kotlin/com/lambda/config/groups/EatSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import com.lambda.util.NamedEnum
2323
import net.minecraft.item.Items
2424

2525
class EatSettings(
26-
prefix: String = "",
2726
c: Configurable,
2827
vararg baseGroup: NamedEnum,
28+
prefix: String = "",
2929
override val visibility: () -> Boolean = { true },
3030
) : SettingGroup(c), EatConfig {
3131
val nutritiousFoodDefaults = listOf(Items.APPLE, Items.BAKED_POTATO, Items.BEEF, Items.BEETROOT, Items.BEETROOT_SOUP, Items.BREAD, Items.CARROT, Items.CHICKEN, Items.CHORUS_FRUIT, Items.COD, Items.COOKED_BEEF, Items.COOKED_CHICKEN, Items.COOKED_COD, Items.COOKED_MUTTON, Items.COOKED_PORKCHOP, Items.COOKED_RABBIT, Items.COOKED_SALMON, Items.COOKIE, Items.DRIED_KELP, Items.ENCHANTED_GOLDEN_APPLE, Items.GOLDEN_APPLE, Items.GOLDEN_CARROT, Items.HONEY_BOTTLE, Items.MELON_SLICE, Items.MUSHROOM_STEW, Items.MUTTON, Items.POISONOUS_POTATO, Items.PORKCHOP, Items.POTATO, Items.PUFFERFISH, Items.PUMPKIN_PIE, Items.RABBIT, Items.RABBIT_STEW, Items.ROTTEN_FLESH, Items.SALMON, Items.SPIDER_EYE, Items.SUSPICIOUS_STEW, Items.SWEET_BERRIES, Items.GLOW_BERRIES, Items.TROPICAL_FISH)

src/main/kotlin/com/lambda/config/groups/EntityColorSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ import net.minecraft.entity.Entity
3434
import java.awt.Color
3535

3636
class EntityColorSettings(
37-
prefix: String = "",
3837
c: Configurable,
3938
vararg baseGroup: NamedEnum,
39+
prefix: String = "",
4040
override val visibility: () -> Boolean = { true },
4141
) : EntityColorsConfig, SettingGroup(c) {
4242
override val useNaturalColors by c.setting("${prefix}Use Natural Colors", false, "Uses an average color from the entities texture").group(*baseGroup).index()

src/main/kotlin/com/lambda/config/groups/EntitySelectionSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ import net.minecraft.entity.Entity
3535
import net.minecraft.entity.SpawnGroup
3636

3737
class EntitySelectionSettings(
38-
prefix: String = "",
3938
c: Configurable,
4039
vararg baseGroup: NamedEnum,
40+
prefix: String = "",
4141
override val visibility: () -> Boolean = { true },
4242
) : EntitySelectionConfig, SettingGroup(c) {
4343
override val self by c.setting("${prefix}Self", false, "Render own player in third person").group(*baseGroup).index()

src/main/kotlin/com/lambda/config/groups/FormatterSettings.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ import com.lambda.config.SettingGroup
2222
import com.lambda.util.NamedEnum
2323

2424
class FormatterSettings(
25-
prefix: String = "",
2625
c: Configurable,
27-
vararg baseGroup: NamedEnum,
26+
vararg baseGroup: NamedEnum,
27+
prefix: String = "",
2828
override val visibility: () -> Boolean = { true },
2929
) : FormatterConfig, SettingGroup(c) {
3030
val localeEnum by c.setting("${prefix}Locale", FormatterConfig.Locales.US, "The regional formatting used for numbers", visibility = visibility).group(*baseGroup).index()

src/main/kotlin/com/lambda/config/groups/HotbarSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import com.lambda.interaction.managers.hotbar.HotbarConfig
2525
import com.lambda.util.NamedEnum
2626

2727
class HotbarSettings(
28-
prefix: String = "",
2928
c: Configurable,
3029
vararg baseGroup: NamedEnum,
30+
prefix: String = "",
3131
override val visibility: () -> Boolean = { true },
3232
) : SettingGroup(c), HotbarConfig {
3333
override val swapMode by c.setting("${prefix}Swap Mode", HotbarConfig.SwapMode.Temporary, visibility = visibility).group(*baseGroup).index()

src/main/kotlin/com/lambda/config/groups/InteractSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ import com.lambda.interaction.managers.interacting.InteractConfig.InteractConfir
2727
import com.lambda.util.NamedEnum
2828

2929
class InteractSettings(
30-
prefix: String = "",
3130
c: Configurable,
3231
vararg baseGroup: NamedEnum,
32+
prefix: String = "",
3333
override val visibility: () -> Boolean = { true },
3434
) : SettingGroup(c), InteractConfig {
3535
override val rotate by c.setting("${prefix}Rotate For Interact", true, "Rotate towards block while placing", visibility = visibility).group(*baseGroup).index()

src/main/kotlin/com/lambda/config/groups/InventorySettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import com.lambda.util.NamedEnum
2525
import com.lambda.util.item.ItemUtils
2626

2727
class InventorySettings(
28-
prefix: String = "",
2928
c: Configurable,
3029
vararg baseGroup: NamedEnum,
30+
prefix: String = "",
3131
override val visibility: () -> Boolean = { true },
3232
) : SettingGroup(c), InventoryConfig {
3333
enum class Group(override val displayName: String) : NamedEnum {

0 commit comments

Comments
 (0)