From 246d01466d3956dd723e4f6a6ac7646f28164c72 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 3 Oct 2022 00:27:07 +0700 Subject: [PATCH] Simplify when expression --- .../kotlin/ru/dbotthepony/mc/otm/item/TritaniumArmorItem.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/TritaniumArmorItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/TritaniumArmorItem.kt index d003f7585..6c13ca8ef 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/TritaniumArmorItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/TritaniumArmorItem.kt @@ -20,23 +20,21 @@ import java.util.function.Consumer private object TritaniumArmorMaterial : ArmorMaterial { override fun getDurabilityForSlot(p_40410_: EquipmentSlot): Int { return when (p_40410_) { - EquipmentSlot.MAINHAND -> throw IllegalArgumentException("yo dude what the fuck") - EquipmentSlot.OFFHAND -> throw IllegalArgumentException("yo dude what the fuck") EquipmentSlot.FEET -> 470 EquipmentSlot.LEGS -> 540 EquipmentSlot.CHEST -> 820 EquipmentSlot.HEAD -> 520 + else -> throw IllegalArgumentException("yo dude what the fuck") } } override fun getDefenseForSlot(p_40411_: EquipmentSlot): Int { return when (p_40411_) { - EquipmentSlot.MAINHAND -> throw IllegalArgumentException("yo dude what the fuck") - EquipmentSlot.OFFHAND -> throw IllegalArgumentException("yo dude what the fuck") EquipmentSlot.FEET -> 4 EquipmentSlot.LEGS -> 7 EquipmentSlot.CHEST -> 12 EquipmentSlot.HEAD -> 5 + else -> throw IllegalArgumentException("yo dude what the fuck") } }