diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-31 18:55:38 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-31 18:55:38 +0100 |
commit | 1f99d218c62418a401cd69754e95eef329e3279d (patch) | |
tree | 7abb28b2f46a723647479689ba79cb9c34c8a183 /src/main/java/at/hannibal2/skyhanni/config | |
parent | d9478299376f302773b59bb0961f2282ab1a03dc (diff) | |
download | skyhanni-1f99d218c62418a401cd69754e95eef329e3279d.tar.gz skyhanni-1f99d218c62418a401cd69754e95eef329e3279d.tar.bz2 skyhanni-1f99d218c62418a401cd69754e95eef329e3279d.zip |
Updating optimal speed immediately when changing the setting.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java index 615883c96..768a155a6 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/optimalspeed/CustomSpeedConfig.java @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.config.features.garden.optimalspeed; import com.google.gson.annotations.Expose; import io.github.moulberry.moulconfig.annotations.ConfigEditorSlider; import io.github.moulberry.moulconfig.annotations.ConfigOption; +import io.github.moulberry.moulconfig.observer.Property; public class CustomSpeedConfig { @@ -11,56 +12,56 @@ public class CustomSpeedConfig { "§e5 Blocks§7: §f✦ 93 speed\n" + "§e4 Blocks§7: §f✦ 116 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int wheat = 93; + public Property<Float> wheat = Property.of(93f); @Expose @ConfigOption(name = "Carrot", desc = "Suggested farm speed:\n" + "§e5 Blocks§7: §f✦ 93 speed\n" + "§e4 Blocks§7: §f✦ 116 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int carrot = 93; + public Property<Float> carrot = Property.of(93f); @Expose @ConfigOption(name = "Potato", desc = "Suggested farm speed:\n" + "§e5 Blocks§7: §f✦ 93 speed\n" + "§e4 Blocks§7: §f✦ 116 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int potato = 93; + public Property<Float> potato = Property.of(93f); @Expose @ConfigOption(name = "Nether Wart", desc = "Suggested farm speed:\n" + "§e5 Blocks§7: §f✦ 93 speed\n" + "§e4 Blocks§7: §f✦ 116 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int netherWart = 93; + public Property<Float> netherWart = Property.of(93f); @Expose @ConfigOption(name = "Pumpkin", desc = "Suggested farm speed:\n" + "§e3 Blocks§7: §f✦ 155 speed\n" + "§e2 Blocks§7: §f✦ 265 §7or §f400 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int pumpkin = 155; + public Property<Float> pumpkin = Property.of(155f); @Expose @ConfigOption(name = "Melon", desc = "Suggested farm speed:\n" + "§e3 Blocks§7: §f✦ 155 speed\n" + "§e2 Blocks§7: §f✦ 265 or 400 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int melon = 155; + public Property<Float> melon = Property.of(155f); @Expose @ConfigOption(name = "Cocoa Beans", desc = "Suggested farm speed:\n" + "§e3 Blocks§7: §f✦ 155 speed\n" + "§e4 Blocks§7: §f✦ 116 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int cocoaBeans = 155; + public Property<Float> cocoaBeans = Property.of(155f); // TODO does other speed settings exist? @Expose @ConfigOption(name = "Sugar Cane", desc = "Suggested farm speed:\n" + "§eYaw 45§7: §f✦ 328 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int sugarCane = 328; + public Property<Float> sugarCane = Property.of(328f); @Expose @ConfigOption(name = "Cactus", desc = "Suggested farm speed:\n" + @@ -68,12 +69,12 @@ public class CustomSpeedConfig { "§eRacing Helmet§7: §f✦ 464 speed\n" + "§eBlack Cat§7: §f✦ 464 speed") @ConfigEditorSlider(minValue = 1, maxValue = 500, minStep = 1) - public int cactus = 400; + public Property<Float> cactus = Property.of(400f); // TODO does other speed settings exist? @Expose @ConfigOption(name = "Mushroom", desc = "Suggested farm speed:\n" + "§eYaw 60§7: §f✦ 233 speed") @ConfigEditorSlider(minValue = 1, maxValue = 400, minStep = 1) - public int mushroom = 233; + public Property<Float> mushroom = Property.of(233f); } |