diff --git a/src/main/java/net/frozenblock/wilderwild/config/gui/BlockConfigGui.java b/src/main/java/net/frozenblock/wilderwild/config/gui/BlockConfigGui.java index 4f89facee3..46c6c78915 100644 --- a/src/main/java/net/frozenblock/wilderwild/config/gui/BlockConfigGui.java +++ b/src/main/java/net/frozenblock/wilderwild/config/gui/BlockConfigGui.java @@ -50,113 +50,121 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi var modifiedTermite = modifiedConfig.termite; category.setBackground(WilderSharedConstants.id("textures/config/block.png")); var shriekerGargling = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("shrieker_gargling"), modifiedConfig.shriekerGargling) - .setDefaultValue(defaultConfig.shriekerGargling) - .setSaveConsumer(newValue -> config.shriekerGargling = newValue) - .setTooltip(tooltip("shrieker_gargling")), - clazz, - "shriekerGargling", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("shrieker_gargling"), modifiedConfig.shriekerGargling) + .setDefaultValue(defaultConfig.shriekerGargling) + .setSaveConsumer(newValue -> config.shriekerGargling = newValue) + .setTooltip(tooltip("shrieker_gargling")) + .build(), + clazz, + "shriekerGargling", + configInstance + ) ); + var soulFireSounds = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("soul_fire_sounds"), modifiedConfig.soulFireSounds) - .setDefaultValue(defaultConfig.soulFireSounds) - .setSaveConsumer(newValue -> config.soulFireSounds = newValue) - .setTooltip(tooltip("soul_fire_sounds")), - clazz, - "soulFireSounds", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("soul_fire_sounds"), modifiedConfig.soulFireSounds) + .setDefaultValue(defaultConfig.soulFireSounds) + .setSaveConsumer(newValue -> config.soulFireSounds = newValue) + .setTooltip(tooltip("soul_fire_sounds")) + .build(), + clazz, + "soulFireSounds", + configInstance + ) ); + var billboardTendrils = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("billboard_tendrils"), modifiedConfig.billboardTendrils) - .setDefaultValue(defaultConfig.billboardTendrils) - .setSaveConsumer(newValue -> config.billboardTendrils = newValue) - .setTooltip(tooltip("billboard_tendrils")), - clazz, - "billboardTendrils", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("billboard_tendrils"), modifiedConfig.billboardTendrils) + .setDefaultValue(defaultConfig.billboardTendrils) + .setSaveConsumer(newValue -> config.billboardTendrils = newValue) + .setTooltip(tooltip("billboard_tendrils")) + .build(), + clazz, + "billboardTendrils", + configInstance + ) ); + var tendrilsCarryEvents = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("tendrils_carry_events"), modifiedConfig.tendrilsCarryEvents) - .setDefaultValue(defaultConfig.tendrilsCarryEvents) - .setSaveConsumer(newValue -> config.tendrilsCarryEvents = newValue) - .setTooltip(tooltip("tendrils_carry_events")), - clazz, - "tendrilsCarryEvents", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("tendrils_carry_events"), modifiedConfig.tendrilsCarryEvents) + .setDefaultValue(defaultConfig.tendrilsCarryEvents) + .setSaveConsumer(newValue -> config.tendrilsCarryEvents = newValue) + .setTooltip(tooltip("tendrils_carry_events")) + .build(), + clazz, + "tendrilsCarryEvents", + configInstance + ) ); + var pollenParticles = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("pollen_particles"), modifiedConfig.pollenParticles) - .setDefaultValue(defaultConfig.pollenParticles) - .setSaveConsumer(newValue -> config.pollenParticles = newValue) - .setTooltip(tooltip("pollen_particles")), - clazz, - "pollenParticles", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("pollen_particles"), modifiedConfig.pollenParticles) + .setDefaultValue(defaultConfig.pollenParticles) + .setSaveConsumer(newValue -> config.pollenParticles = newValue) + .setTooltip(tooltip("pollen_particles")) + .build(), + clazz, + "pollenParticles", + configInstance + ) ); + var logHollowing = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("log_hollowing"), modifiedConfig.logHollowing) - .setDefaultValue(defaultConfig.logHollowing) - .setSaveConsumer(newValue -> config.logHollowing = newValue) - .setTooltip(tooltip("log_hollowing")), - clazz, - "logHollowing", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("log_hollowing"), modifiedConfig.logHollowing) + .setDefaultValue(defaultConfig.logHollowing) + .setSaveConsumer(newValue -> config.logHollowing = newValue) + .setTooltip(tooltip("log_hollowing")) + .build(), + clazz, + "logHollowing", + configInstance + ) ); + var cactusPlacement = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("cactus_placement"), modifiedConfig.cactusPlacement) - .setDefaultValue(defaultConfig.cactusPlacement) - .setSaveConsumer(newValue -> config.cactusPlacement = newValue) - .setTooltip(tooltip("cactus_placement")), - clazz, - "cactusPlacement", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("cactus_placement"), modifiedConfig.cactusPlacement) + .setDefaultValue(defaultConfig.cactusPlacement) + .setSaveConsumer(newValue -> config.cactusPlacement = newValue) + .setTooltip(tooltip("cactus_placement")) + .build(), + clazz, + "cactusPlacement", + configInstance + ) ); + var frostedIceCracking = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("frosted_ice_cracking"), modifiedConfig.frostedIceCracking) - .setDefaultValue(defaultConfig.frostedIceCracking) - .setSaveConsumer(newValue -> config.frostedIceCracking = newValue) - .setTooltip(tooltip("frosted_ice_cracking")), - clazz, - "frostedIceCracking", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("frosted_ice_cracking"), modifiedConfig.frostedIceCracking) + .setDefaultValue(defaultConfig.frostedIceCracking) + .setSaveConsumer(newValue -> config.frostedIceCracking = newValue) + .setTooltip(tooltip("frosted_ice_cracking")) + .build(), + clazz, + "frostedIceCracking", + configInstance + ) ); + var dripleafPowering = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("dripleaf_powering"), modifiedConfig.dripleafPowering) - .setDefaultValue(defaultConfig.dripleafPowering) - .setSaveConsumer(newValue -> config.dripleafPowering = newValue) - .setTooltip(tooltip("dripleaf_powering")) - .requireRestart(), - clazz, - "dripleafPowering", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("dripleaf_powering"), modifiedConfig.dripleafPowering) + .setDefaultValue(defaultConfig.dripleafPowering) + .setSaveConsumer(newValue -> config.dripleafPowering = newValue) + .setTooltip(tooltip("dripleaf_powering")) + .requireRestart() + .build(), + clazz, + "dripleafPowering", + configInstance + ) ); var cactusSounds = entryBuilder.startBooleanToggle(text("cactus_sounds"), modifiedBlockSounds.cactusSounds) @@ -276,27 +284,27 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi sugarCaneSounds, witherRoseSounds, sandstoneSounds ); - var mesogleaLiquid = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("mesoglea_liquid"), modifiedConfig.mesoglea.mesogleaLiquid) - .setDefaultValue(defaultConfig.mesoglea.mesogleaLiquid) - .setSaveConsumer(newValue -> config.mesoglea.mesogleaLiquid = newValue) - .setTooltip(tooltip("mesoglea_liquid")), - config.mesoglea.getClass(), - "mesogleaLiquid", - configInstance - ) - .build(); + var mesogleaLiquid = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("mesoglea_liquid"), modifiedConfig.mesoglea.mesogleaLiquid) + .setDefaultValue(defaultConfig.mesoglea.mesogleaLiquid) + .setSaveConsumer(newValue -> config.mesoglea.mesogleaLiquid = newValue) + .setTooltip(tooltip("mesoglea_liquid")) + .build(), + config.mesoglea.getClass(), + "mesogleaLiquid", + configInstance + ); - var mesogleaBubbleColumns = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("mesoglea_bubble_columns"), modifiedConfig.mesoglea.mesogleaBubbleColumns) - .setDefaultValue(defaultConfig.mesoglea.mesogleaBubbleColumns) - .setSaveConsumer(newValue -> config.mesoglea.mesogleaBubbleColumns = newValue) - .setTooltip(tooltip("mesoglea_bubble_columns")), - config.mesoglea.getClass(), - "mesogleaBubbleColumns", - configInstance - ) - .build(); + var mesogleaBubbleColumns = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("mesoglea_bubble_columns"), modifiedConfig.mesoglea.mesogleaBubbleColumns) + .setDefaultValue(defaultConfig.mesoglea.mesogleaBubbleColumns) + .setSaveConsumer(newValue -> config.mesoglea.mesogleaBubbleColumns = newValue) + .setTooltip(tooltip("mesoglea_bubble_columns")) + .build(), + config.mesoglea.getClass(), + "mesogleaBubbleColumns", + configInstance + ); var mesogleaCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("mesoglea"), false, @@ -304,39 +312,39 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi mesogleaBubbleColumns, mesogleaLiquid ); - var termitesOnlyEatNaturalBlocks = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("termites_only_eat_natural_blocks"), modifiedTermite.onlyEatNaturalBlocks) - .setDefaultValue(defaultConfig.termite.onlyEatNaturalBlocks) - .setSaveConsumer(newValue -> termite.onlyEatNaturalBlocks = newValue) - .setTooltip(tooltip("termites_only_eat_natural_blocks")) - .requireRestart(), - termite.getClass(), - "onlyEatNaturalBlocks", - configInstance - ) - .build(); + var termitesOnlyEatNaturalBlocks = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("termites_only_eat_natural_blocks"), modifiedTermite.onlyEatNaturalBlocks) + .setDefaultValue(defaultConfig.termite.onlyEatNaturalBlocks) + .setSaveConsumer(newValue -> termite.onlyEatNaturalBlocks = newValue) + .setTooltip(tooltip("termites_only_eat_natural_blocks")) + .requireRestart() + .build(), + termite.getClass(), + "onlyEatNaturalBlocks", + configInstance + ); - var maxTermiteDistance = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("max_termite_distance"), modifiedTermite.maxDistance, 1, 72) - .setDefaultValue(defaultConfig.termite.maxDistance) - .setSaveConsumer(newValue -> termite.maxDistance = newValue) - .setTooltip(tooltip("max_termite_distance")), - termite.getClass(), - "maxDistance", - configInstance - ) - .build(); + var maxTermiteDistance = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("max_termite_distance"), modifiedTermite.maxDistance, 1, 72) + .setDefaultValue(defaultConfig.termite.maxDistance) + .setSaveConsumer(newValue -> termite.maxDistance = newValue) + .setTooltip(tooltip("max_termite_distance")) + .build(), + termite.getClass(), + "maxDistance", + configInstance + ); - var maxNaturalTermiteDistance = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("max_natural_termite_distance"), modifiedTermite.maxNaturalDistance, 1, 72) - .setDefaultValue(defaultConfig.termite.maxNaturalDistance) - .setSaveConsumer(newValue -> termite.maxNaturalDistance = newValue) - .setTooltip(tooltip("max_natural_termite_distance")), - termite.getClass(), - "maxNaturalDistance", - configInstance - ) - .build(); + var maxNaturalTermiteDistance = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("max_natural_termite_distance"), modifiedTermite.maxNaturalDistance, 1, 72) + .setDefaultValue(defaultConfig.termite.maxNaturalDistance) + .setSaveConsumer(newValue -> termite.maxNaturalDistance = newValue) + .setTooltip(tooltip("max_natural_termite_distance")) + .build(), + termite.getClass(), + "maxNaturalDistance", + configInstance + ); var termiteCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("termite"), false, @@ -344,16 +352,16 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi termitesOnlyEatNaturalBlocks, maxTermiteDistance, maxNaturalTermiteDistance ); - var stoneChestTimer = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("stone_chest_timer"), modifiedStoneChest.stoneChestTimer, 50, 200) - .setDefaultValue(defaultConfig.stoneChest.stoneChestTimer) - .setSaveConsumer(newValue -> stoneChest.stoneChestTimer = newValue) - .setTooltip(tooltip("stone_chest_timer")), - stoneChest.getClass(), - "stoneChestTimer", - configInstance - ) - .build(); + var stoneChestTimer = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("stone_chest_timer"), modifiedStoneChest.stoneChestTimer, 50, 200) + .setDefaultValue(defaultConfig.stoneChest.stoneChestTimer) + .setSaveConsumer(newValue -> stoneChest.stoneChestTimer = newValue) + .setTooltip(tooltip("stone_chest_timer")) + .build(), + stoneChest.getClass(), + "stoneChestTimer", + configInstance + ); var stoneChestCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("stone_chest"), false, diff --git a/src/main/java/net/frozenblock/wilderwild/config/gui/EntityConfigGui.java b/src/main/java/net/frozenblock/wilderwild/config/gui/EntityConfigGui.java index a080b2a83c..95c58ac7a3 100644 --- a/src/main/java/net/frozenblock/wilderwild/config/gui/EntityConfigGui.java +++ b/src/main/java/net/frozenblock/wilderwild/config/gui/EntityConfigGui.java @@ -59,56 +59,55 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi category.setBackground(WilderSharedConstants.id("textures/config/entity.png")); var unpassableRail = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("unpassable_rail"), modifiedConfig.unpassableRail) - .setDefaultValue(defaultConfig.unpassableRail) - .setSaveConsumer(newValue -> config.unpassableRail = newValue) - .setTooltip(tooltip("unpassable_rail")) - .requireRestart(), - clazz, - "unpassableRail", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("unpassable_rail"), modifiedConfig.unpassableRail) + .setDefaultValue(defaultConfig.unpassableRail) + .setSaveConsumer(newValue -> config.unpassableRail = newValue) + .setTooltip(tooltip("unpassable_rail")) + .requireRestart() + .build(), + clazz, + "unpassableRail", + configInstance + ) ); var lightningBlockParticles = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("lightning_block_particles"), modifiedConfig.lightningBlockParticles) - .setDefaultValue(defaultConfig.lightningBlockParticles) - .setSaveConsumer(newValue -> config.lightningBlockParticles = newValue) - .setTooltip(tooltip("lightning_block_particles")), - clazz, - "lightningBlockParticles", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("lightning_block_particles"), modifiedConfig.lightningBlockParticles) + .setDefaultValue(defaultConfig.lightningBlockParticles) + .setSaveConsumer(newValue -> config.lightningBlockParticles = newValue) + .setTooltip(tooltip("lightning_block_particles")) + .build(), + clazz, + "lightningBlockParticles", + configInstance + ) ); var lightningSmokeParticles = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("lightning_smoke_particles"), modifiedConfig.lightningSmokeParticles) - .setDefaultValue(defaultConfig.lightningSmokeParticles) - .setSaveConsumer(newValue -> config.lightningSmokeParticles = newValue) - .setTooltip(tooltip("lightning_smoke_particles")), - clazz, - "lightningSmokeParticles", - configInstance - ) - .build() - ); - - var keyframeAllayDance = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle( - text("keyframe_allay_dance"), modifiedAllay.keyframeAllayDance) - .setDefaultValue(defaultConfig.allay.keyframeAllayDance) - .setSaveConsumer(newValue -> allay.keyframeAllayDance = newValue) - .setTooltip(tooltip("keyframe_allay_dance")), - allay.getClass(), - "keyframeAllayDance", + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("lightning_smoke_particles"), modifiedConfig.lightningSmokeParticles) + .setDefaultValue(defaultConfig.lightningSmokeParticles) + .setSaveConsumer(newValue -> config.lightningSmokeParticles = newValue) + .setTooltip(tooltip("lightning_smoke_particles")) + .build(), + clazz, + "lightningSmokeParticles", configInstance ) - .build(); + ); + + var keyframeAllayDance = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("keyframe_allay_dance"), modifiedAllay.keyframeAllayDance) + .setDefaultValue(defaultConfig.allay.keyframeAllayDance) + .setSaveConsumer(newValue -> allay.keyframeAllayDance = newValue) + .setTooltip(tooltip("keyframe_allay_dance")) + .build(), + allay.getClass(), + "keyframeAllayDance", + configInstance + ); var allayCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("allay"), false, @@ -116,26 +115,27 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi keyframeAllayDance ); - var angerLoopSound = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("anger_loop_sound"), modifiedEnderMan.angerLoopSound) - .setDefaultValue(defaultConfig.enderMan.angerLoopSound) - .setSaveConsumer(newValue -> enderMan.angerLoopSound = newValue) - .setTooltip(tooltip("anger_loop_sound")), - enderMan.getClass(), - "angerLoopSound", - configInstance - ) - .build(); - var movingStareSound = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("moving_stare_sound"), modifiedEnderMan.movingStareSound) - .setDefaultValue(defaultConfig.enderMan.movingStareSound) - .setSaveConsumer(newValue -> enderMan.movingStareSound = newValue) - .setTooltip(tooltip("moving_stare_sound")), - enderMan.getClass(), - "movingStareSound", - configInstance - ) - .build(); + var angerLoopSound = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("anger_loop_sound"), modifiedEnderMan.angerLoopSound) + .setDefaultValue(defaultConfig.enderMan.angerLoopSound) + .setSaveConsumer(newValue -> enderMan.angerLoopSound = newValue) + .setTooltip(tooltip("anger_loop_sound")) + .build(), + enderMan.getClass(), + "angerLoopSound", + configInstance + ); + + var movingStareSound = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("moving_stare_sound"), modifiedEnderMan.movingStareSound) + .setDefaultValue(defaultConfig.enderMan.movingStareSound) + .setSaveConsumer(newValue -> enderMan.movingStareSound = newValue) + .setTooltip(tooltip("moving_stare_sound")) + .build(), + enderMan.getClass(), + "movingStareSound", + configInstance + ); var enderManCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("enderman"), false, @@ -143,17 +143,17 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi angerLoopSound, movingStareSound ); - var fireflySpawnCap = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("firefly_spawn_cap"), modifiedFirefly.fireflySpawnCap, 0, 100) - .setDefaultValue(defaultConfig.firefly.fireflySpawnCap) - .setSaveConsumer(newValue -> firefly.fireflySpawnCap = newValue) - .setTooltip(tooltip("firefly_spawn_cap")) - .requireRestart(), - firefly.getClass(), - "fireflySpawnCap", - configInstance - ) - .build(); + var fireflySpawnCap = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("firefly_spawn_cap"), modifiedFirefly.fireflySpawnCap, 0, 100) + .setDefaultValue(defaultConfig.firefly.fireflySpawnCap) + .setSaveConsumer(newValue -> firefly.fireflySpawnCap = newValue) + .setTooltip(tooltip("firefly_spawn_cap")) + .requireRestart() + .build(), + firefly.getClass(), + "fireflySpawnCap", + configInstance + ); var fireflyCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("firefly"), false, @@ -161,29 +161,29 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi fireflySpawnCap ); - var jellyfishSpawnCap = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("jellyfish_spawn_cap"), modifiedJellyfish.jellyfishSpawnCap, 0, 100) - .setDefaultValue(defaultConfig.jellyfish.jellyfishSpawnCap) - .setSaveConsumer(newValue -> jellyfish.jellyfishSpawnCap = newValue) - .setTooltip(tooltip("jellyfish_spawn_cap")) - .requireRestart(), - jellyfish.getClass(), - "jellyfishSpawnCap", - configInstance - ) - .build(); - - var jellyfishTentacles = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("jellyfish_tentacles"), modifiedJellyfish.jellyfishTentacles, 0, 100) - .setDefaultValue(defaultConfig.jellyfish.jellyfishTentacles) - .setSaveConsumer(newValue -> jellyfish.jellyfishTentacles = newValue) - .setTooltip(tooltip("jellyfish_tentacles")) - .requireRestart(), - jellyfish.getClass(), - "jellyfishTentacles", - configInstance - ) - .build(); + var jellyfishSpawnCap = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("jellyfish_spawn_cap"), modifiedJellyfish.jellyfishSpawnCap, 0, 100) + .setDefaultValue(defaultConfig.jellyfish.jellyfishSpawnCap) + .setSaveConsumer(newValue -> jellyfish.jellyfishSpawnCap = newValue) + .setTooltip(tooltip("jellyfish_spawn_cap")) + .requireRestart() + .build(), + jellyfish.getClass(), + "jellyfishSpawnCap", + configInstance + ); + + var jellyfishTentacles = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("jellyfish_tentacles"), modifiedJellyfish.jellyfishTentacles, 0, 100) + .setDefaultValue(defaultConfig.jellyfish.jellyfishTentacles) + .setSaveConsumer(newValue -> jellyfish.jellyfishTentacles = newValue) + .setTooltip(tooltip("jellyfish_tentacles")) + .requireRestart() + .build(), + jellyfish.getClass(), + "jellyfishTentacles", + configInstance + ); var jellyfishCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("jellyfish"), false, @@ -191,29 +191,29 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi jellyfishSpawnCap, jellyfishTentacles ); - var crabSpawnCap = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("crab_spawn_cap"), modifiedCrab.crabSpawnCap, 0, 100) - .setDefaultValue(defaultConfig.crab.crabSpawnCap) - .setSaveConsumer(newValue -> crab.crabSpawnCap = newValue) - .setTooltip(tooltip("crab_spawn_cap")) - .requireRestart(), - crab.getClass(), - "crabSpawnCap", - configInstance - ) - .build(); - - var reachAffectsAttack = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("reach_affects_attack"), modifiedCrab.reachAffectsAttack) - .setDefaultValue(defaultConfig.crab.reachAffectsAttack) - .setSaveConsumer(newValue -> crab.reachAffectsAttack = newValue) - .setTooltip(tooltip("reach_affects_attack")) - .requireRestart(), - crab.getClass(), - "reachAffectsAttack", - configInstance - ) - .build(); + var crabSpawnCap = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("crab_spawn_cap"), modifiedCrab.crabSpawnCap, 0, 100) + .setDefaultValue(defaultConfig.crab.crabSpawnCap) + .setSaveConsumer(newValue -> crab.crabSpawnCap = newValue) + .setTooltip(tooltip("crab_spawn_cap")) + .requireRestart() + .build(), + crab.getClass(), + "crabSpawnCap", + configInstance + ); + + var reachAffectsAttack = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("reach_affects_attack"), modifiedCrab.reachAffectsAttack) + .setDefaultValue(defaultConfig.crab.reachAffectsAttack) + .setSaveConsumer(newValue -> crab.reachAffectsAttack = newValue) + .setTooltip(tooltip("reach_affects_attack")) + .requireRestart() + .build(), + crab.getClass(), + "reachAffectsAttack", + configInstance + ); var crabCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("crab"), false, @@ -221,50 +221,50 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi crabSpawnCap, reachAffectsAttack ); - var tumbleweedSpawnCap = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("tumbleweed_spawn_cap"), modifiedTumbleweed.tumbleweedSpawnCap, 0, 100) - .setDefaultValue(defaultConfig.tumbleweed.tumbleweedSpawnCap) - .setSaveConsumer(newValue -> tumbleweed.tumbleweedSpawnCap = newValue) - .setTooltip(tooltip("tumbleweed_spawn_cap")) - .requireRestart(), - tumbleweed.getClass(), - "tumbleweedSpawnCap", - configInstance - ) - .build(); - - var leashedTumbleweed = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("leashed_tumbleweed"), modifiedTumbleweed.leashedTumbleweed) - .setDefaultValue(defaultConfig.tumbleweed.leashedTumbleweed) - .setSaveConsumer(newValue -> tumbleweed.leashedTumbleweed = newValue) - .setTooltip(tooltip("leashed_tumbleweed")), - tumbleweed.getClass(), - "leashedTumbleweed", - configInstance - ) - .build(); - - var tumbleweedDestroysCrops = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("tumbleweed_destroys_crops"), modifiedTumbleweed.tumbleweedDestroysCrops) - .setDefaultValue(defaultConfig.tumbleweed.tumbleweedDestroysCrops) - .setSaveConsumer(newValue -> tumbleweed.tumbleweedDestroysCrops = newValue) - .setTooltip(tooltip("tumbleweed_destroys_crops")), - tumbleweed.getClass(), - "tumbleweedDestroysCrops", - configInstance - ) - .build(); - - var tumbleweedRotatesToLookDirection = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("tumbleweed_rotates_to_look_direction"), modifiedTumbleweed.tumbleweedRotatesToLookDirection) - .setDefaultValue(defaultConfig.tumbleweed.tumbleweedRotatesToLookDirection) - .setSaveConsumer(newValue -> tumbleweed.tumbleweedRotatesToLookDirection = newValue) - .setTooltip(tooltip("tumbleweed_rotates_to_look_direction")), - tumbleweed.getClass(), - "tumbleweedRotatesToLookDirection", - configInstance - ) - .build(); + var tumbleweedSpawnCap = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("tumbleweed_spawn_cap"), modifiedTumbleweed.tumbleweedSpawnCap, 0, 100) + .setDefaultValue(defaultConfig.tumbleweed.tumbleweedSpawnCap) + .setSaveConsumer(newValue -> tumbleweed.tumbleweedSpawnCap = newValue) + .setTooltip(tooltip("tumbleweed_spawn_cap")) + .requireRestart() + .build(), + tumbleweed.getClass(), + "tumbleweedSpawnCap", + configInstance + ); + + var leashedTumbleweed = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("leashed_tumbleweed"), modifiedTumbleweed.leashedTumbleweed) + .setDefaultValue(defaultConfig.tumbleweed.leashedTumbleweed) + .setSaveConsumer(newValue -> tumbleweed.leashedTumbleweed = newValue) + .setTooltip(tooltip("leashed_tumbleweed")) + .build(), + tumbleweed.getClass(), + "leashedTumbleweed", + configInstance + ); + + var tumbleweedDestroysCrops = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("tumbleweed_destroys_crops"), modifiedTumbleweed.tumbleweedDestroysCrops) + .setDefaultValue(defaultConfig.tumbleweed.tumbleweedDestroysCrops) + .setSaveConsumer(newValue -> tumbleweed.tumbleweedDestroysCrops = newValue) + .setTooltip(tooltip("tumbleweed_destroys_crops")) + .build(), + tumbleweed.getClass(), + "tumbleweedDestroysCrops", + configInstance + ); + + var tumbleweedRotatesToLookDirection = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("tumbleweed_rotates_to_look_direction"), modifiedTumbleweed.tumbleweedRotatesToLookDirection) + .setDefaultValue(defaultConfig.tumbleweed.tumbleweedRotatesToLookDirection) + .setSaveConsumer(newValue -> tumbleweed.tumbleweedRotatesToLookDirection = newValue) + .setTooltip(tooltip("tumbleweed_rotates_to_look_direction")) + .build(), + tumbleweed.getClass(), + "tumbleweedRotatesToLookDirection", + configInstance + ); var tumbleweedCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("tumbleweed"), false, @@ -272,110 +272,120 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi tumbleweedSpawnCap, leashedTumbleweed, tumbleweedDestroysCrops, tumbleweedRotatesToLookDirection ); - var wardenAttacksImmediately = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_attacks_immediately"), modifiedWarden.wardenAttacksImmediately) - .setDefaultValue(defaultConfig.warden.wardenAttacksImmediately) - .setSaveConsumer(newValue -> warden.wardenAttacksImmediately = newValue) - .setTooltip(tooltip("warden_attacks_immediately")), - warden.getClass(), - "wardenAttacksImmediately", - configInstance - ) - .build(); - var wardenSwims = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_swims"), modifiedWarden.wardenSwims) - .setDefaultValue(defaultConfig.warden.wardenSwims) - .setSaveConsumer(newValue -> warden.wardenSwims = newValue) - .setTooltip(tooltip("warden_swims")), - warden.getClass(), - "wardenSwims", - configInstance - ) - .build(); - var wardenSwimAnimation = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_swim_animation"), modifiedWarden.wardenSwimAnimation) - .setDefaultValue(defaultConfig.warden.wardenSwimAnimation) - .setSaveConsumer(newValue -> warden.wardenSwimAnimation = newValue) - .setTooltip(tooltip("warden_swim_animation")), - warden.getClass(), - "wardenSwimAnimation", - configInstance - ) - .build(); - var wardenDyingAnimation = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_dying_animation"), modifiedWarden.wardenDyingAnimation) - .setDefaultValue(defaultConfig.warden.wardenDyingAnimation) - .setSaveConsumer(newValue -> warden.wardenDyingAnimation = newValue) - .setTooltip(tooltip("warden_dying_animation")), - warden.getClass(), - "wardenDyingAnimation", - configInstance - ) - .build(); - var wardenImprovedEmerge = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_improved_emerge"), modifiedWarden.wardenImprovedEmerge) - .setDefaultValue(defaultConfig.warden.wardenImprovedEmerge) - .setSaveConsumer(newValue -> warden.wardenImprovedEmerge = newValue) - .setYesNoTextSupplier(bool -> text("improved." + bool)) - .setTooltip(tooltip("warden_improved_emerge")), - warden.getClass(), - "wardenImprovedEmerge", - configInstance - ) - .build(); - var wardenEmergesFromCommand = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_emerges_from_command"), modifiedWarden.wardenEmergesFromCommand) - .setDefaultValue(defaultConfig.warden.wardenEmergesFromCommand) - .setSaveConsumer(newValue -> warden.wardenEmergesFromCommand = newValue) - .setTooltip(tooltip("warden_emerges_from_command")), - warden.getClass(), - "wardenEmergesFromCommand", - configInstance - ) - .build(); - var wardenEmergesFromEgg = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_emerges_from_egg"), modifiedWarden.wardenEmergesFromEgg) - .setDefaultValue(defaultConfig.warden.wardenEmergesFromEgg) - .setSaveConsumer(newValue -> warden.wardenEmergesFromEgg = newValue) - .setTooltip(tooltip("warden_emerges_from_egg")), - warden.getClass(), - "wardenEmergesFromEgg", - configInstance - ) - .build(); - var wardenImprovedDig = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_improved_dig"), modifiedWarden.wardenImprovedDig) - .setDefaultValue(defaultConfig.warden.wardenImprovedDig) - .setSaveConsumer(newValue -> warden.wardenImprovedDig = newValue) - .setYesNoTextSupplier(bool -> text("improved." + bool)) - .setTooltip(tooltip("warden_improved_dig")), - warden.getClass(), - "wardenImprovedDig", - configInstance - ) - .build(); - var wardenBedrockSniff = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_bedrock_sniff"), modifiedWarden.wardenBedrockSniff) - .setDefaultValue(defaultConfig.warden.wardenBedrockSniff) - .setSaveConsumer(newValue -> warden.wardenBedrockSniff = newValue) - .setYesNoTextSupplier(bool -> text("warden_bedrock_sniff." + bool)) - .setTooltip(tooltip("warden_bedrock_sniff")), - warden.getClass(), - "wardenBedrockSniff", - configInstance - ) - .build(); - var wardenCustomTendrils = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("warden_custom_tendrils"), modifiedWarden.wardenCustomTendrils) - .setDefaultValue(defaultConfig.warden.wardenCustomTendrils) - .setSaveConsumer(newValue -> warden.wardenCustomTendrils = newValue) - .setYesNoTextSupplier(bool -> text("improved." + bool)) - .setTooltip(tooltip("warden_custom_tendrils")), - warden.getClass(), - "wardenCustomTendrils", - configInstance - ) - .build(); + var wardenAttacksImmediately = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_attacks_immediately"), modifiedWarden.wardenAttacksImmediately) + .setDefaultValue(defaultConfig.warden.wardenAttacksImmediately) + .setSaveConsumer(newValue -> warden.wardenAttacksImmediately = newValue) + .setTooltip(tooltip("warden_attacks_immediately")) + .build(), + warden.getClass(), + "wardenAttacksImmediately", + configInstance + ); + + var wardenSwims = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_swims"), modifiedWarden.wardenSwims) + .setDefaultValue(defaultConfig.warden.wardenSwims) + .setSaveConsumer(newValue -> warden.wardenSwims = newValue) + .setTooltip(tooltip("warden_swims")) + .build(), + warden.getClass(), + "wardenSwims", + configInstance + ); + + var wardenSwimAnimation = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_swim_animation"), modifiedWarden.wardenSwimAnimation) + .setDefaultValue(defaultConfig.warden.wardenSwimAnimation) + .setSaveConsumer(newValue -> warden.wardenSwimAnimation = newValue) + .setTooltip(tooltip("warden_swim_animation")) + .build(), + warden.getClass(), + "wardenSwimAnimation", + configInstance + ); + + var wardenDyingAnimation = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_dying_animation"), modifiedWarden.wardenDyingAnimation) + .setDefaultValue(defaultConfig.warden.wardenDyingAnimation) + .setSaveConsumer(newValue -> warden.wardenDyingAnimation = newValue) + .setTooltip(tooltip("warden_dying_animation")) + .build(), + warden.getClass(), + "wardenDyingAnimation", + configInstance + ); + + var wardenImprovedEmerge = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_improved_emerge"), modifiedWarden.wardenImprovedEmerge) + .setDefaultValue(defaultConfig.warden.wardenImprovedEmerge) + .setSaveConsumer(newValue -> warden.wardenImprovedEmerge = newValue) + .setYesNoTextSupplier(bool -> text("improved." + bool)) + .setTooltip(tooltip("warden_improved_emerge")) + .build(), + warden.getClass(), + "wardenImprovedEmerge", + configInstance + ); + + var wardenEmergesFromCommand = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_emerges_from_command"), modifiedWarden.wardenEmergesFromCommand) + .setDefaultValue(defaultConfig.warden.wardenEmergesFromCommand) + .setSaveConsumer(newValue -> warden.wardenEmergesFromCommand = newValue) + .setTooltip(tooltip("warden_emerges_from_command")) + .build(), + warden.getClass(), + "wardenEmergesFromCommand", + configInstance + ); + + var wardenEmergesFromEgg = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_emerges_from_egg"), modifiedWarden.wardenEmergesFromEgg) + .setDefaultValue(defaultConfig.warden.wardenEmergesFromEgg) + .setSaveConsumer(newValue -> warden.wardenEmergesFromEgg = newValue) + .setTooltip(tooltip("warden_emerges_from_egg")) + .build(), + warden.getClass(), + "wardenEmergesFromEgg", + configInstance + ); + + var wardenImprovedDig = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_improved_dig"), modifiedWarden.wardenImprovedDig) + .setDefaultValue(defaultConfig.warden.wardenImprovedDig) + .setSaveConsumer(newValue -> warden.wardenImprovedDig = newValue) + .setYesNoTextSupplier(bool -> text("improved." + bool)) + .setTooltip(tooltip("warden_improved_dig")) + .build(), + warden.getClass(), + "wardenImprovedDig", + configInstance + ); + + var wardenBedrockSniff = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_bedrock_sniff"), modifiedWarden.wardenBedrockSniff) + .setDefaultValue(defaultConfig.warden.wardenBedrockSniff) + .setSaveConsumer(newValue -> warden.wardenBedrockSniff = newValue) + .setYesNoTextSupplier(bool -> text("warden_bedrock_sniff." + bool)) + .setTooltip(tooltip("warden_bedrock_sniff")) + .requireRestart() + .build(), + warden.getClass(), + "wardenBedrockSniff", + configInstance + ); + + var wardenCustomTendrils = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("warden_custom_tendrils"), modifiedWarden.wardenCustomTendrils) + .setDefaultValue(defaultConfig.warden.wardenCustomTendrils) + .setSaveConsumer(newValue -> warden.wardenCustomTendrils = newValue) + .setYesNoTextSupplier(bool -> text("warden_custom_tendrils." + bool)) + .setTooltip(tooltip("warden_custom_tendrils")) + .build(), + warden.getClass(), + "wardenCustomTendrils", + configInstance + ); var wardenCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("warden"), false, diff --git a/src/main/java/net/frozenblock/wilderwild/config/gui/ItemConfigGui.java b/src/main/java/net/frozenblock/wilderwild/config/gui/ItemConfigGui.java index 0f1849365e..7959a3e551 100644 --- a/src/main/java/net/frozenblock/wilderwild/config/gui/ItemConfigGui.java +++ b/src/main/java/net/frozenblock/wilderwild/config/gui/ItemConfigGui.java @@ -48,71 +48,71 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi var modifiedProjectileLandingSounds = modifiedConfig.projectileLandingSounds; category.setBackground(WilderSharedConstants.id("textures/config/item.png")); - var summonsWarden = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("ancient_horn_can_summon_warden"), modifiedAncientHorn.ancientHornCanSummonWarden) - .setDefaultValue(defaultConfig.ancientHorn.ancientHornCanSummonWarden) - .setSaveConsumer(newValue -> ancientHorn.ancientHornCanSummonWarden = newValue) - .setTooltip(tooltip("ancient_horn_can_summon_warden")), - config.ancientHorn.getClass(), - "ancientHornCanSummonWarden", - configInstance - ) - .build(); - - var lifespan = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("ancient_horn_lifespan"), modifiedAncientHorn.ancientHornLifespan, 0, 1000) - .setDefaultValue(defaultConfig.ancientHorn.ancientHornLifespan) - .setSaveConsumer(newValue -> ancientHorn.ancientHornLifespan = newValue) - .setTooltip(tooltip("ancient_horn_lifespan")), - config.ancientHorn.getClass(), - "ancientHornLifespan", - configInstance - ) - .build(); - - var mobDamage = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("ancient_horn_mob_damage"), modifiedAncientHorn.ancientHornMobDamage, 0, 50) - .setDefaultValue(defaultConfig.ancientHorn.ancientHornMobDamage) - .setSaveConsumer(newValue -> ancientHorn.ancientHornMobDamage = newValue) - .setTooltip(tooltip("ancient_horn_mob_damage")), - config.ancientHorn.getClass(), - "ancientHornMobDamage", - configInstance - ) - .build(); - - var playerDamage = FrozenClothConfig.syncedBuilder( - entryBuilder.startIntSlider(text("ancient_horn_player_damage"), modifiedAncientHorn.ancientHornPlayerDamage, 0, 50) - .setDefaultValue(defaultConfig.ancientHorn.ancientHornPlayerDamage) - .setSaveConsumer(newValue -> ancientHorn.ancientHornPlayerDamage = newValue) - .setTooltip(tooltip("ancient_horn_player_damage")), - config.ancientHorn.getClass(), - "ancientHornPlayerDamage", - configInstance - ) - .build(); - - var shattersGlass = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("ancient_horn_shatters_glass"), modifiedAncientHorn.ancientHornShattersGlass) - .setDefaultValue(defaultConfig.ancientHorn.ancientHornShattersGlass) - .setSaveConsumer(newValue -> ancientHorn.ancientHornShattersGlass = newValue) - .setTooltip(tooltip("ancient_horn_shatters_glass")), - config.ancientHorn.getClass(), - "ancientHornShattersGlass", - configInstance - ) - .build(); - - var sizeMultiplier = FrozenClothConfig.syncedBuilder( - entryBuilder.startFloatField(text("ancient_horn_size_multiplier"), modifiedAncientHorn.ancientHornSizeMultiplier) - .setDefaultValue(defaultConfig.ancientHorn.ancientHornSizeMultiplier) - .setSaveConsumer(newValue -> ancientHorn.ancientHornSizeMultiplier = newValue) - .setTooltip(tooltip("ancient_horn_size_multiplier")), - config.ancientHorn.getClass(), - "ancientHornSizeMultiplier", - configInstance - ) - .build(); + var summonsWarden = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("ancient_horn_can_summon_warden"), modifiedAncientHorn.ancientHornCanSummonWarden) + .setDefaultValue(defaultConfig.ancientHorn.ancientHornCanSummonWarden) + .setSaveConsumer(newValue -> ancientHorn.ancientHornCanSummonWarden = newValue) + .setTooltip(tooltip("ancient_horn_can_summon_warden")) + .build(), + config.ancientHorn.getClass(), + "ancientHornCanSummonWarden", + configInstance + ); + + var lifespan = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("ancient_horn_lifespan"), modifiedAncientHorn.ancientHornLifespan, 0, 1000) + .setDefaultValue(defaultConfig.ancientHorn.ancientHornLifespan) + .setSaveConsumer(newValue -> ancientHorn.ancientHornLifespan = newValue) + .setTooltip(tooltip("ancient_horn_lifespan")) + .build(), + config.ancientHorn.getClass(), + "ancientHornLifespan", + configInstance + ); + + var mobDamage = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("ancient_horn_mob_damage"), modifiedAncientHorn.ancientHornMobDamage, 0, 50) + .setDefaultValue(defaultConfig.ancientHorn.ancientHornMobDamage) + .setSaveConsumer(newValue -> ancientHorn.ancientHornMobDamage = newValue) + .setTooltip(tooltip("ancient_horn_mob_damage")) + .build(), + config.ancientHorn.getClass(), + "ancientHornMobDamage", + configInstance + ); + + var playerDamage = FrozenClothConfig.syncedEntry( + entryBuilder.startIntSlider(text("ancient_horn_player_damage"), modifiedAncientHorn.ancientHornPlayerDamage, 0, 50) + .setDefaultValue(defaultConfig.ancientHorn.ancientHornPlayerDamage) + .setSaveConsumer(newValue -> ancientHorn.ancientHornPlayerDamage = newValue) + .setTooltip(tooltip("ancient_horn_player_damage")) + .build(), + config.ancientHorn.getClass(), + "ancientHornPlayerDamage", + configInstance + ); + + var shattersGlass = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("ancient_horn_shatters_glass"), modifiedAncientHorn.ancientHornShattersGlass) + .setDefaultValue(defaultConfig.ancientHorn.ancientHornShattersGlass) + .setSaveConsumer(newValue -> ancientHorn.ancientHornShattersGlass = newValue) + .setTooltip(tooltip("ancient_horn_shatters_glass")) + .build(), + config.ancientHorn.getClass(), + "ancientHornShattersGlass", + configInstance + ); + + var sizeMultiplier = FrozenClothConfig.syncedEntry( + entryBuilder.startFloatField(text("ancient_horn_size_multiplier"), modifiedAncientHorn.ancientHornSizeMultiplier) + .setDefaultValue(defaultConfig.ancientHorn.ancientHornSizeMultiplier) + .setSaveConsumer(newValue -> ancientHorn.ancientHornSizeMultiplier = newValue) + .setTooltip(tooltip("ancient_horn_size_multiplier")) + .build(), + config.ancientHorn.getClass(), + "ancientHornSizeMultiplier", + configInstance + ); var ancientHornCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("ancient_horn"), false, @@ -120,49 +120,49 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi summonsWarden, lifespan, mobDamage, playerDamage, shattersGlass, sizeMultiplier ); - var snowballLandingSounds = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("snowball_landing_sounds"), modifiedProjectileLandingSounds.snowballLandingSounds) - .setDefaultValue(defaultConfig.projectileLandingSounds.snowballLandingSounds) - .setSaveConsumer(newValue -> projectileLandingSounds.snowballLandingSounds = newValue) - .setTooltip(tooltip("snowball_landing_sounds")), - config.projectileLandingSounds.getClass(), - "snowballLandingSounds", - configInstance - ) - .build(); - - var eggLandingSounds = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("egg_landing_sounds"), modifiedProjectileLandingSounds.eggLandingSounds) - .setDefaultValue(defaultConfig.projectileLandingSounds.eggLandingSounds) - .setSaveConsumer(newValue -> projectileLandingSounds.eggLandingSounds = newValue) - .setTooltip(tooltip("egg_landing_sounds")), - config.projectileLandingSounds.getClass(), - "eggLandingSounds", - configInstance - ) - .build(); - - var enderPearlLandingSounds = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("ender_pearl_landing_sounds"), modifiedProjectileLandingSounds.enderPearlLandingSounds) - .setDefaultValue(defaultConfig.projectileLandingSounds.enderPearlLandingSounds) - .setSaveConsumer(newValue -> projectileLandingSounds.enderPearlLandingSounds = newValue) - .setTooltip(tooltip("ender_pearl_landing_sounds")), - config.projectileLandingSounds.getClass(), - "enderPearlLandingSounds", - configInstance - ) - .build(); - - var potionLandingSounds = FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("potion_landing_sounds"), modifiedProjectileLandingSounds.potionLandingSounds) - .setDefaultValue(defaultConfig.projectileLandingSounds.potionLandingSounds) - .setSaveConsumer(newValue -> projectileLandingSounds.potionLandingSounds = newValue) - .setTooltip(tooltip("potion_landing_sounds")), - config.projectileLandingSounds.getClass(), - "potionLandingSounds", - configInstance - ) - .build(); + var snowballLandingSounds = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("snowball_landing_sounds"), modifiedProjectileLandingSounds.snowballLandingSounds) + .setDefaultValue(defaultConfig.projectileLandingSounds.snowballLandingSounds) + .setSaveConsumer(newValue -> projectileLandingSounds.snowballLandingSounds = newValue) + .setTooltip(tooltip("snowball_landing_sounds")) + .build(), + config.projectileLandingSounds.getClass(), + "snowballLandingSounds", + configInstance + ); + + var eggLandingSounds = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("egg_landing_sounds"), modifiedProjectileLandingSounds.eggLandingSounds) + .setDefaultValue(defaultConfig.projectileLandingSounds.eggLandingSounds) + .setSaveConsumer(newValue -> projectileLandingSounds.eggLandingSounds = newValue) + .setTooltip(tooltip("egg_landing_sounds")) + .build(), + config.projectileLandingSounds.getClass(), + "eggLandingSounds", + configInstance + ); + + var enderPearlLandingSounds = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("ender_pearl_landing_sounds"), modifiedProjectileLandingSounds.enderPearlLandingSounds) + .setDefaultValue(defaultConfig.projectileLandingSounds.enderPearlLandingSounds) + .setSaveConsumer(newValue -> projectileLandingSounds.enderPearlLandingSounds = newValue) + .setTooltip(tooltip("ender_pearl_landing_sounds")) + .build(), + config.projectileLandingSounds.getClass(), + "enderPearlLandingSounds", + configInstance + ); + + var potionLandingSounds = FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("potion_landing_sounds"), modifiedProjectileLandingSounds.potionLandingSounds) + .setDefaultValue(defaultConfig.projectileLandingSounds.potionLandingSounds) + .setSaveConsumer(newValue -> projectileLandingSounds.potionLandingSounds = newValue) + .setTooltip(tooltip("potion_landing_sounds")) + .build(), + config.projectileLandingSounds.getClass(), + "potionLandingSounds", + configInstance + ); var projectileLandingSoundsCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("projectile_landing_sounds"), false, @@ -171,29 +171,29 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi ); var projectileBreakParticles = category.addEntry( - FrozenClothConfig.syncedBuilder( + FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("projectile_break_particles"), modifiedConfig.projectileBreakParticles) .setDefaultValue(defaultConfig.projectileBreakParticles) .setSaveConsumer(newValue -> config.projectileBreakParticles = newValue) - .setTooltip(tooltip("projectile_break_particles")), + .setTooltip(tooltip("projectile_break_particles")) + .build(), clazz, "projectileBreakParticles", configInstance ) - .build() ); var restrictInstrumentSound = category.addEntry( - FrozenClothConfig.syncedBuilder( + FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("restrict_instrument_sound"), modifiedConfig.restrictInstrumentSound) .setDefaultValue(defaultConfig.restrictInstrumentSound) .setSaveConsumer(newValue -> config.restrictInstrumentSound = newValue) - .setTooltip(tooltip("restrict_instrument_sound")), + .setTooltip(tooltip("restrict_instrument_sound")) + .build() , clazz, "restrictInstrumentSound", configInstance ) - .build() ); } } diff --git a/src/main/java/net/frozenblock/wilderwild/config/gui/MiscConfigGui.java b/src/main/java/net/frozenblock/wilderwild/config/gui/MiscConfigGui.java index 02933f6935..599baf0671 100644 --- a/src/main/java/net/frozenblock/wilderwild/config/gui/MiscConfigGui.java +++ b/src/main/java/net/frozenblock/wilderwild/config/gui/MiscConfigGui.java @@ -47,16 +47,16 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi category.setBackground(WilderSharedConstants.id("textures/config/misc.png")); var modifyAdvancements = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("modify_advancements"), modifiedConfig.modifyAdvancements) - .setDefaultValue(defaultConfig.modifyAdvancements) - .setSaveConsumer(newValue -> config.modifyAdvancements = newValue) - .setTooltip(tooltip("modofy_advancements")), - clazz, - "modifyAdvancements", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("modify_advancements"), modifiedConfig.modifyAdvancements) + .setDefaultValue(defaultConfig.modifyAdvancements) + .setSaveConsumer(newValue -> config.modifyAdvancements = newValue) + .setTooltip(tooltip("modofy_advancements")) + .build(), + clazz, + "modifyAdvancements", + configInstance + ) ); var cloudMovement = category.addEntry(entryBuilder.startBooleanToggle(text("cloud_movement"), config.cloudMovement) diff --git a/src/main/java/net/frozenblock/wilderwild/config/gui/WorldgenConfigGui.java b/src/main/java/net/frozenblock/wilderwild/config/gui/WorldgenConfigGui.java index 16b81a54ab..315ca13bc9 100644 --- a/src/main/java/net/frozenblock/wilderwild/config/gui/WorldgenConfigGui.java +++ b/src/main/java/net/frozenblock/wilderwild/config/gui/WorldgenConfigGui.java @@ -51,228 +51,250 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi category.setBackground(WilderSharedConstants.id("textures/config/worldgen.png")); var betaBeaches = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("beta_beaches"), modifiedConfig.betaBeaches) - .setDefaultValue(defaultConfig.betaBeaches) - .setSaveConsumer(newValue -> config.betaBeaches = newValue) - .setTooltip(tooltip("beta_beaches")), - clazz, - "betaBeaches", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("beta_beaches"), modifiedConfig.betaBeaches) + .setDefaultValue(defaultConfig.betaBeaches) + .setSaveConsumer(newValue -> config.betaBeaches = newValue) + .setTooltip(tooltip("beta_beaches")) + .build(), + clazz, + "betaBeaches", + configInstance + ) ); - var cypressWetlands = FrozenClothConfig.syncedBuilder( + var cypressWetlands = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_cypress_wetlands"), modifiedBiomes.generateCypressWetlands) .setDefaultValue(defaultConfig.biomeGeneration.generateCypressWetlands) .setSaveConsumer(newValue -> biomes.generateCypressWetlands = newValue) .setTooltip(tooltip("generate_cypress_wetlands")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateCypressWetlands", configInstance - ).build(); - var jellyfishCaves = FrozenClothConfig.syncedBuilder( + ); + + var jellyfishCaves = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_jellyfish_caves"), modifiedBiomes.generateJellyfishCaves) .setDefaultValue(defaultConfig.biomeGeneration.generateJellyfishCaves) .setSaveConsumer(newValue -> biomes.generateJellyfishCaves = newValue) .setTooltip(tooltip("generate_jellyfish_caves")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateJellyfishCaves", configInstance - ).build(); - var mixedForest = FrozenClothConfig.syncedBuilder( + ); + var mixedForest = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_mixed_forest"), modifiedBiomes.generateMixedForest) .setDefaultValue(defaultConfig.biomeGeneration.generateMixedForest) .setSaveConsumer(newValue -> biomes.generateMixedForest = newValue) .setTooltip(tooltip("generate_mixed_forest")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateMixedForest", configInstance - ).build(); - var oasis = FrozenClothConfig.syncedBuilder( + ); + var oasis = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_oasis"), modifiedBiomes.generateOasis) .setDefaultValue(defaultConfig.biomeGeneration.generateOasis) .setSaveConsumer(newValue -> biomes.generateOasis = newValue) .setTooltip(tooltip("generate_oasis")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateOasis", configInstance - ).build(); - var warmRiver = FrozenClothConfig.syncedBuilder( + ); + var warmRiver = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_warm_river"), modifiedBiomes.generateWarmRiver) .setDefaultValue(defaultConfig.biomeGeneration.generateWarmRiver) .setSaveConsumer(newValue -> biomes.generateWarmRiver = newValue) .setTooltip(tooltip("generate_warm_river")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateWarmRiver", configInstance - ).build(); - var warmBeach = FrozenClothConfig.syncedBuilder( + ); + var warmBeach = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_warm_beach"), modifiedBiomes.generateWarmBeach) .setDefaultValue(defaultConfig.biomeGeneration.generateWarmBeach) .setSaveConsumer(newValue -> biomes.generateWarmBeach = newValue) .setTooltip(tooltip("generate_warm_beach")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateWarmBeach", configInstance - ).build(); - var birchTaiga = FrozenClothConfig.syncedBuilder( + ); + var birchTaiga = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_birch_taiga"), modifiedBiomes.generateBirchTaiga) .setDefaultValue(defaultConfig.biomeGeneration.generateBirchTaiga) .setSaveConsumer(newValue -> biomes.generateBirchTaiga = newValue) .setTooltip(tooltip("generate_birch_taiga")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateBirchTaiga", configInstance - ).build(); - var oldGrowthBirchTaiga = FrozenClothConfig.syncedBuilder( + ); + var oldGrowthBirchTaiga = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_old_growth_birch_taiga"), modifiedBiomes.generateOldGrowthBirchTaiga) .setDefaultValue(defaultConfig.biomeGeneration.generateOldGrowthBirchTaiga) .setSaveConsumer(newValue -> biomes.generateOldGrowthBirchTaiga = newValue) .setTooltip(tooltip("generate_old_growth_birch_taiga")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateOldGrowthBirchTaiga", configInstance - ).build(); - var flowerField = FrozenClothConfig.syncedBuilder( + ); + var flowerField = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_flower_field"), modifiedBiomes.generateFlowerField) .setDefaultValue(defaultConfig.biomeGeneration.generateFlowerField) .setSaveConsumer(newValue -> biomes.generateFlowerField = newValue) .setTooltip(tooltip("generate_flower_field")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateFlowerField", configInstance - ).build(); - var aridSavanna = FrozenClothConfig.syncedBuilder( + ); + var aridSavanna = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_arid_savanna"), modifiedBiomes.generateAridSavanna) .setDefaultValue(defaultConfig.biomeGeneration.generateAridSavanna) .setSaveConsumer(newValue -> biomes.generateAridSavanna = newValue) .setTooltip(tooltip("generate_arid_savanna")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateAridSavanna", configInstance - ).build(); - var parchedForest = FrozenClothConfig.syncedBuilder( + ); + var parchedForest = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_parched_forest"), modifiedBiomes.generateParchedForest) .setDefaultValue(defaultConfig.biomeGeneration.generateParchedForest) .setSaveConsumer(newValue -> biomes.generateParchedForest = newValue) .setTooltip(tooltip("generate_parched_forest")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateParchedForest", configInstance - ).build(); - var aridForest = FrozenClothConfig.syncedBuilder( + ); + var aridForest = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_arid_forest"), modifiedBiomes.generateAridForest) .setDefaultValue(defaultConfig.biomeGeneration.generateAridForest) .setSaveConsumer(newValue -> biomes.generateAridForest = newValue) .setTooltip(tooltip("generate_arid_forest")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateAridForest", configInstance - ).build(); - var oldGrowthSnowyTaiga = FrozenClothConfig.syncedBuilder( + ); + var oldGrowthSnowyTaiga = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_snowy_old_growth_pine_taiga"), modifiedBiomes.generateOldGrowthSnowyTaiga) .setDefaultValue(defaultConfig.biomeGeneration.generateOldGrowthSnowyTaiga) .setSaveConsumer(newValue -> biomes.generateOldGrowthSnowyTaiga = newValue) .setTooltip(tooltip("generate_snowy_old_growth_pine_taiga")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateOldGrowthSnowyTaiga", configInstance - ).build(); - var birchJungle = FrozenClothConfig.syncedBuilder( + ); + var birchJungle = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_birch_jungle"), modifiedBiomes.generateBirchJungle) .setDefaultValue(defaultConfig.biomeGeneration.generateBirchJungle) .setSaveConsumer(newValue -> biomes.generateBirchJungle = newValue) .setTooltip(tooltip("generate_birch_jungle")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateBirchJungle", configInstance - ).build(); - var sparseBirchJungle = FrozenClothConfig.syncedBuilder( + ); + var sparseBirchJungle = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_sparse_birch_jungle"), modifiedBiomes.generateSparseBirchJungle) .setDefaultValue(defaultConfig.biomeGeneration.generateSparseBirchJungle) .setSaveConsumer(newValue -> biomes.generateSparseBirchJungle = newValue) .setTooltip(tooltip("generate_sparse_birch_jungle")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateSparseBirchJungle", configInstance - ).build(); - var oldGrowthDarkForest = FrozenClothConfig.syncedBuilder( + ); + var oldGrowthDarkForest = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_old_growth_dark_forest"), modifiedBiomes.generateOldGrowthDarkForest) .setDefaultValue(defaultConfig.biomeGeneration.generateOldGrowthDarkForest) .setSaveConsumer(newValue -> biomes.generateOldGrowthDarkForest = newValue) .setTooltip(tooltip("generate_old_growth_dark_forest")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateOldGrowthDarkForest", configInstance - ).build(); - var darkBirchForest = FrozenClothConfig.syncedBuilder( + ); + var darkBirchForest = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_dark_birch_forest"), modifiedBiomes.generateDarkBirchForest) .setDefaultValue(defaultConfig.biomeGeneration.generateDarkBirchForest) .setSaveConsumer(newValue -> biomes.generateDarkBirchForest = newValue) .setTooltip(tooltip("generate_dark_birch_forest")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateDarkBirchForest", configInstance - ).build(); - var semiBirchForest = FrozenClothConfig.syncedBuilder( + ); + var semiBirchForest = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_semi_birch_forest"), modifiedBiomes.generateSemiBirchForest) .setDefaultValue(defaultConfig.biomeGeneration.generateSemiBirchForest) .setSaveConsumer(newValue -> biomes.generateSemiBirchForest = newValue) .setTooltip(tooltip("generate_semi_birch_forest")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateSemiBirchForest", configInstance - ).build(); - var temperateRainforest = FrozenClothConfig.syncedBuilder( + ); + var temperateRainforest = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_temperate_rainforest"), modifiedBiomes.generateTemperateRainforest) .setDefaultValue(defaultConfig.biomeGeneration.generateTemperateRainforest) .setSaveConsumer(newValue -> biomes.generateTemperateRainforest = newValue) .setTooltip(tooltip("generate_temperate_rainforest")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateTemperateRainforest", configInstance - ).build(); - var rainforest = FrozenClothConfig.syncedBuilder( + ); + var rainforest = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_rainforest"), modifiedBiomes.generateRainforest) .setDefaultValue(defaultConfig.biomeGeneration.generateRainforest) .setSaveConsumer(newValue -> biomes.generateRainforest = newValue) .setTooltip(tooltip("generate_rainforest")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateRainforest", configInstance - ).build(); - var darkTaiga = FrozenClothConfig.syncedBuilder( + ); + var darkTaiga = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("generate_dark_taiga"), modifiedBiomes.generateDarkTaiga) .setDefaultValue(defaultConfig.biomeGeneration.generateDarkTaiga) .setSaveConsumer(newValue -> biomes.generateDarkTaiga = newValue) .setTooltip(tooltip("generate_dark_taiga")) - .requireRestart(), + .requireRestart() + .build(), biomes.getClass(), "generateDarkTaiga", configInstance - ).build(); + ); var biomeGenerationCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("biome_generation"), false, @@ -282,72 +304,78 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi sparseBirchJungle, temperateRainforest, warmBeach, warmRiver ); - var cherryGrove = FrozenClothConfig.syncedBuilder( + var cherryGrove = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("modify_cherry_grove_placement"), modifiedBiomePlacement.modifyCherryGrovePlacement) .setDefaultValue(defaultConfig.biomePlacement.modifyCherryGrovePlacement) .setSaveConsumer(newValue -> biomePlacement.modifyCherryGrovePlacement = newValue) .setYesNoTextSupplier(bool -> text("biome_placement." + bool)) .setTooltip(tooltip("modify_cherry_grove_placement")) - .requireRestart(), + .requireRestart() + .build(), biomePlacement.getClass(), "modifyCherryGrovePlacement", configInstance - ).build(); - var jungle = FrozenClothConfig.syncedBuilder( + ); + var jungle = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("modify_jungle_placement"), modifiedBiomePlacement.modifyJunglePlacement) .setDefaultValue(defaultConfig.biomePlacement.modifyJunglePlacement) .setSaveConsumer(newValue -> biomePlacement.modifyJunglePlacement = newValue) .setYesNoTextSupplier(bool -> text("biome_placement." + bool)) .setTooltip(tooltip("modify_jungle_placement")) - .requireRestart(), + .requireRestart() + .build(), biomePlacement.getClass(), "modifyJunglePlacement", configInstance - ).build(); - var mangroveSwamp = FrozenClothConfig.syncedBuilder( + ); + var mangroveSwamp = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("modify_mangrove_swamp_placement"), modifiedBiomePlacement.modifyMangroveSwampPlacement) .setDefaultValue(defaultConfig.biomePlacement.modifyMangroveSwampPlacement) .setSaveConsumer(newValue -> biomePlacement.modifyMangroveSwampPlacement = newValue) .setYesNoTextSupplier(bool -> text("biome_placement." + bool)) .setTooltip(tooltip("modify_mangrove_swamp_placement")) - .requireRestart(), + .requireRestart() + .build(), biomePlacement.getClass(), "modifyMangroveSwampPlacement", configInstance - ).build(); - var stonyShore = FrozenClothConfig.syncedBuilder( + ); + var stonyShore = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("modify_stony_shore_placement"), modifiedBiomePlacement.modifyStonyShorePlacement) .setDefaultValue(defaultConfig.biomePlacement.modifyStonyShorePlacement) .setSaveConsumer(newValue -> biomePlacement.modifyStonyShorePlacement = newValue) .setYesNoTextSupplier(bool -> text("biome_placement." + bool)) .setTooltip(tooltip("modify_stony_shore_placement")) - .requireRestart(), + .requireRestart() + .build(), biomePlacement.getClass(), "modifyStonyShorePlacement", configInstance - ).build(); - var swamp = FrozenClothConfig.syncedBuilder( + ); + var swamp = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("modify_swamp_placement"), modifiedBiomePlacement.modifySwampPlacement) .setDefaultValue(defaultConfig.biomePlacement.modifySwampPlacement) .setSaveConsumer(newValue -> biomePlacement.modifySwampPlacement = newValue) .setYesNoTextSupplier(bool -> text("biome_placement." + bool)) .setTooltip(tooltip("modify_swamp_placement")) - .requireRestart(), + .requireRestart() + .build(), biomePlacement.getClass(), "modifySwampPlacement", configInstance - ).build(); - var windsweptSavanna = FrozenClothConfig.syncedBuilder( + ); + var windsweptSavanna = FrozenClothConfig.syncedEntry( entryBuilder.startBooleanToggle(text("modify_windswept_savanna_placement"), modifiedBiomePlacement.modifyWindsweptSavannaPlacement) .setDefaultValue(defaultConfig.biomePlacement.modifyWindsweptSavannaPlacement) .setSaveConsumer(newValue -> biomePlacement.modifyWindsweptSavannaPlacement = newValue) .setYesNoTextSupplier(bool -> text("biome_placement." + bool)) .setTooltip(tooltip("modify_windswept_savanna_placement")) - .requireRestart(), + .requireRestart() + .build(), biomePlacement.getClass(), "modifyWindsweptSavannaPlacement", configInstance - ).build(); + ); var biomePlacementCategory = FrozenClothConfig.createSubCategory(entryBuilder, category, text("biome_placement"), false, @@ -391,198 +419,198 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi ); var fallenLogs = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("fallen_logs"), modifiedConfig.fallenLogs) - .setDefaultValue(defaultConfig.fallenLogs) - .setSaveConsumer(newValue -> config.fallenLogs = newValue) - .setTooltip(tooltip("fallen_logs")) - .requireRestart(), - clazz, - "fallenLogs", - configInstance - ) - .build() - ); - var snappedLogs = category.addEntry(FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("snapped_logs"), modifiedConfig.snappedLogs) - .setDefaultValue(defaultConfig.snappedLogs) - .setSaveConsumer(newValue -> config.snappedLogs = newValue) - .setTooltip(tooltip("snapped_logs")) - .requireRestart(), - clazz, - "snappedLogs", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("fallen_logs"), modifiedConfig.fallenLogs) + .setDefaultValue(defaultConfig.fallenLogs) + .setSaveConsumer(newValue -> config.fallenLogs = newValue) + .setTooltip(tooltip("fallen_logs")) + .requireRestart() + .build(), + clazz, + "fallenLogs", + configInstance + ) ); + var snappedLogs = category.addEntry( + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("snapped_logs"), modifiedConfig.snappedLogs) + .setDefaultValue(defaultConfig.snappedLogs) + .setSaveConsumer(newValue -> config.snappedLogs = newValue) + .setTooltip(tooltip("snapped_logs")) + .requireRestart() + .build(), + clazz, + "snappedLogs", + configInstance + )); var wilderWildGrass = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("wilder_wild_grass"), modifiedConfig.wilderWildGrassGen) - .setDefaultValue(defaultConfig.wilderWildGrassGen) - .setSaveConsumer(newValue -> config.wilderWildGrassGen = newValue) - .setTooltip(tooltip("wilder_wild_grass")) - .requireRestart(), - clazz, - "wilderWildGrassGen", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("wilder_wild_grass"), modifiedConfig.wilderWildGrassGen) + .setDefaultValue(defaultConfig.wilderWildGrassGen) + .setSaveConsumer(newValue -> config.wilderWildGrassGen = newValue) + .setTooltip(tooltip("wilder_wild_grass")) + .requireRestart() + .build(), + clazz, + "wilderWildGrassGen", + configInstance + ) ); var wilderWildFlowers = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("wilder_wild_flowers"), modifiedConfig.wilderWildFlowerGen) - .setDefaultValue(defaultConfig.wilderWildFlowerGen) - .setSaveConsumer(newValue -> config.wilderWildFlowerGen = newValue) - .setTooltip(tooltip("wilder_wild_flowers")) - .requireRestart(), - clazz, - "wilderWildFlowerGen", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("wilder_wild_flowers"), modifiedConfig.wilderWildFlowerGen) + .setDefaultValue(defaultConfig.wilderWildFlowerGen) + .setSaveConsumer(newValue -> config.wilderWildFlowerGen = newValue) + .setTooltip(tooltip("wilder_wild_flowers")) + .requireRestart() + .build(), + clazz, + "wilderWildFlowerGen", + configInstance + ) ); var wilderWildTrees = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("wilder_wild_trees"), modifiedConfig.wilderWildTreeGen) - .setDefaultValue(defaultConfig.wilderWildTreeGen) - .setSaveConsumer(newValue -> config.wilderWildTreeGen = newValue) - .setTooltip(tooltip("wilder_wild_trees")) - .requireRestart(), - clazz, - "wilderWildTreeGen", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("wilder_wild_trees"), modifiedConfig.wilderWildTreeGen) + .setDefaultValue(defaultConfig.wilderWildTreeGen) + .setSaveConsumer(newValue -> config.wilderWildTreeGen = newValue) + .setTooltip(tooltip("wilder_wild_trees")) + .requireRestart() + .build(), + clazz, + "wilderWildTreeGen", + configInstance + ) ); var wilderWildBushes = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("wilder_wild_bushes"), modifiedConfig.wilderWildBushGen) - .setDefaultValue(defaultConfig.wilderWildBushGen) - .setSaveConsumer(newValue -> config.wilderWildBushGen = newValue) - .setTooltip(tooltip("wilder_wild_bushes")) - .requireRestart(), - clazz, - "wilderWildBushGen", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("wilder_wild_bushes"), modifiedConfig.wilderWildBushGen) + .setDefaultValue(defaultConfig.wilderWildBushGen) + .setSaveConsumer(newValue -> config.wilderWildBushGen = newValue) + .setTooltip(tooltip("wilder_wild_bushes")) + .requireRestart() + .build(), + clazz, + "wilderWildBushGen", + configInstance + ) ); var wilderWildCacti = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("wilder_wild_cacti"), modifiedConfig.wilderWildCactusGen) - .setDefaultValue(defaultConfig.wilderWildCactusGen) - .setSaveConsumer(newValue -> config.wilderWildCactusGen = newValue) - .setTooltip(tooltip("wilder_wild_cacti")) - .requireRestart(), - clazz, - "wilderWildCactusGen", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("wilder_wild_cacti"), modifiedConfig.wilderWildCactusGen) + .setDefaultValue(defaultConfig.wilderWildCactusGen) + .setSaveConsumer(newValue -> config.wilderWildCactusGen = newValue) + .setTooltip(tooltip("wilder_wild_cacti")) + .requireRestart() + .build(), + clazz, + "wilderWildCactusGen", + configInstance + ) ); var wilderWildMushrooms = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("wilder_wild_mushrooms"), modifiedConfig.wilderWildMushroomGen) - .setDefaultValue(defaultConfig.wilderWildMushroomGen) - .setSaveConsumer(newValue -> config.wilderWildMushroomGen = newValue) - .setTooltip(tooltip("wilder_wild_mushrooms")) - .requireRestart(), - clazz, - "wilderWildMushroomGen", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("wilder_wild_mushrooms"), modifiedConfig.wilderWildMushroomGen) + .setDefaultValue(defaultConfig.wilderWildMushroomGen) + .setSaveConsumer(newValue -> config.wilderWildMushroomGen = newValue) + .setTooltip(tooltip("wilder_wild_mushrooms")) + .requireRestart() + .build(), + clazz, + "wilderWildMushroomGen", + configInstance + ) ); var tumbleweed = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("tumbleweed_gen"), modifiedConfig.tumbleweed) - .setDefaultValue(defaultConfig.tumbleweed) - .setSaveConsumer(newValue -> config.tumbleweed = newValue) - .setTooltip(tooltip("tumbleweed_gen")) - .requireRestart(), - clazz, - "tumbleweed", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("tumbleweed_gen"), modifiedConfig.tumbleweed) + .setDefaultValue(defaultConfig.tumbleweed) + .setSaveConsumer(newValue -> config.tumbleweed = newValue) + .setTooltip(tooltip("tumbleweed_gen")) + .requireRestart() + .build(), + clazz, + "tumbleweed", + configInstance + ) ); var algae = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("algae_gen"), modifiedConfig.algae) - .setDefaultValue(defaultConfig.algae) - .setSaveConsumer(newValue -> config.algae = newValue) - .setTooltip(tooltip("algae_gen")) - .requireRestart(), - clazz, - "algae", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("algae_gen"), modifiedConfig.algae) + .setDefaultValue(defaultConfig.algae) + .setSaveConsumer(newValue -> config.algae = newValue) + .setTooltip(tooltip("algae_gen")) + .requireRestart() + .build(), + clazz, + "algae", + configInstance + ) ); var termite = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("termite_gen"), modifiedConfig.termiteGen) - .setDefaultValue(defaultConfig.termiteGen) - .setSaveConsumer(newValue -> config.termiteGen = newValue) - .setTooltip(tooltip("termite_gen")) - .requireRestart(), - clazz, - "termiteGen", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("termite_gen"), modifiedConfig.termiteGen) + .setDefaultValue(defaultConfig.termiteGen) + .setSaveConsumer(newValue -> config.termiteGen = newValue) + .setTooltip(tooltip("termite_gen")) + .requireRestart() + .build(), + clazz, + "termiteGen", + configInstance + ) ); var surfaceDecoration = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("surface_decoration"), modifiedConfig.surfaceDecoration) - .setDefaultValue(defaultConfig.surfaceDecoration) - .setSaveConsumer(newValue -> config.surfaceDecoration = newValue) - .setTooltip(tooltip("surface_decoration")) - .requireRestart(), - clazz, - "surfaceDecoration", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("surface_decoration"), modifiedConfig.surfaceDecoration) + .setDefaultValue(defaultConfig.surfaceDecoration) + .setSaveConsumer(newValue -> config.surfaceDecoration = newValue) + .setTooltip(tooltip("surface_decoration")) + .requireRestart() + .build(), + clazz, + "surfaceDecoration", + configInstance + ) ); var snowBelowTrees = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("snow_below_trees"), modifiedConfig.snowBelowTrees) - .setDefaultValue(defaultConfig.snowBelowTrees) - .setSaveConsumer(newValue -> config.snowBelowTrees = newValue) - .setTooltip(tooltip("snow_below_trees")) - .requireRestart(), - clazz, - "snowBelowTrees", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("snow_below_trees"), modifiedConfig.snowBelowTrees) + .setDefaultValue(defaultConfig.snowBelowTrees) + .setSaveConsumer(newValue -> config.snowBelowTrees = newValue) + .setTooltip(tooltip("snow_below_trees")) + .requireRestart() + .build(), + clazz, + "snowBelowTrees", + configInstance + ) ); var surfaceTransitions = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("surface_transitions"), modifiedConfig.surfaceTransitions) - .setDefaultValue(defaultConfig.surfaceTransitions) - .setSaveConsumer(newValue -> config.surfaceTransitions = newValue) - .setTooltip(tooltip("surface_transitions")) - .requireRestart(), - clazz, - "surfaceTransitions", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("surface_transitions"), modifiedConfig.surfaceTransitions) + .setDefaultValue(defaultConfig.surfaceTransitions) + .setSaveConsumer(newValue -> config.surfaceTransitions = newValue) + .setTooltip(tooltip("surface_transitions")) + .requireRestart() + .build(), + clazz, + "surfaceTransitions", + configInstance + ) ); var newWitchHuts = category.addEntry( - FrozenClothConfig.syncedBuilder( - entryBuilder.startBooleanToggle(text("new_witch_huts"), modifiedConfig.newWitchHuts) - .setDefaultValue(defaultConfig.newWitchHuts) - .setSaveConsumer(newValue -> config.newWitchHuts = newValue) - .setTooltip(tooltip("new_witch_huts")) - .requireRestart(), - clazz, - "newWitchHuts", - configInstance - ) - .build() + FrozenClothConfig.syncedEntry( + entryBuilder.startBooleanToggle(text("new_witch_huts"), modifiedConfig.newWitchHuts) + .setDefaultValue(defaultConfig.newWitchHuts) + .setSaveConsumer(newValue -> config.newWitchHuts = newValue) + .setTooltip(tooltip("new_witch_huts")) + .requireRestart() + .build(), + clazz, + "newWitchHuts", + configInstance + ) ); } }