diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-02-20 18:32:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 18:32:31 +0100 |
commit | 3ab20a18d4a2be4cdba1f16cfa3d5a9276227042 (patch) | |
tree | 42ea557a74f43c991b28cfca439d952ceb803858 /src/main/java/at/hannibal2/skyhanni/utils | |
parent | 2d1a900fd40150cff686ea4f2c260d120140d653 (diff) | |
download | skyhanni-3ab20a18d4a2be4cdba1f16cfa3d5a9276227042.tar.gz skyhanni-3ab20a18d4a2be4cdba1f16cfa3d5a9276227042.tar.bz2 skyhanni-3ab20a18d4a2be4cdba1f16cfa3d5a9276227042.zip |
Added option to only show Ender Node tracker while holding a pickaxe. #984
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt index 99407b3ed..975a409c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemCategory.kt @@ -1,5 +1,8 @@ package at.hannibal2.skyhanni.utils +import at.hannibal2.skyhanni.utils.ItemUtils.getItemCategoryOrNull +import net.minecraft.item.ItemStack + enum class ItemCategory { SWORD, LONGSWORD, @@ -49,4 +52,12 @@ enum class ItemCategory { NONE, ; + + companion object { + + fun Collection<ItemCategory>.containsItem(stack: ItemStack?) = + stack?.getItemCategoryOrNull()?.let { this.contains(it) } ?: false + + val miningTools = listOf(PICKAXE, DRILL, GAUNTLET) + } } |