diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-31 19:01:24 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-31 19:01:24 +0100 |
commit | 892602a0aadb1c6fc2a582068b617bb7027d2ce4 (patch) | |
tree | 14e33a7fb2f3baf6dfb3e8a6efcd00f500b27833 /src/main/java | |
parent | 1f99d218c62418a401cd69754e95eef329e3279d (diff) | |
download | skyhanni-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.kt | 25 |
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) { |