aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-31 19:01:24 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-01-31 19:01:24 +0100
commit892602a0aadb1c6fc2a582068b617bb7027d2ce4 (patch)
tree14e33a7fb2f3baf6dfb3e8a6efcd00f500b27833 /src/main/java
parent1f99d218c62418a401cd69754e95eef329e3279d (diff)
downloadskyhanni-892602a0aadb1c6fc2a582068b617bb7027d2ce4.tar.gz
skyhanni-892602a0aadb1c6fc2a582068b617bb7027d2ce4.tar.bz2
skyhanni-892602a0aadb1c6fc2a582068b617bb7027d2ce4.zip
code cleanup
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
index f2e37e353..a4a326ad2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt
@@ -97,18 +97,19 @@ class GardenOptimalSpeed {
private fun CropType.getOptimalSpeed() = getConfig().get().toInt()
- private fun CropType.getConfig(): Property<Float> = when (this) {
- CropType.WHEAT -> configCustomSpeed.wheat
- CropType.CARROT -> configCustomSpeed.carrot
- CropType.POTATO -> configCustomSpeed.potato
- CropType.NETHER_WART -> configCustomSpeed.netherWart
- CropType.PUMPKIN -> configCustomSpeed.pumpkin
- CropType.MELON -> configCustomSpeed.melon
- CropType.COCOA_BEANS -> configCustomSpeed.cocoaBeans
- CropType.SUGAR_CANE -> configCustomSpeed.sugarCane
- CropType.CACTUS -> configCustomSpeed.cactus
- CropType.MUSHROOM -> configCustomSpeed.mushroom
- }
+ private fun CropType.getConfig(): Property<Float> =
+ when (this) {
+ CropType.WHEAT -> configCustomSpeed.wheat
+ CropType.CARROT -> configCustomSpeed.carrot
+ CropType.POTATO -> configCustomSpeed.potato
+ CropType.NETHER_WART -> configCustomSpeed.netherWart
+ CropType.PUMPKIN -> configCustomSpeed.pumpkin
+ CropType.MELON -> configCustomSpeed.melon
+ CropType.COCOA_BEANS -> configCustomSpeed.cocoaBeans
+ CropType.SUGAR_CANE -> configCustomSpeed.sugarCane
+ CropType.CACTUS -> configCustomSpeed.cactus
+ CropType.MUSHROOM -> configCustomSpeed.mushroom
+ }
@SubscribeEvent
fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) {