diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-20 02:47:29 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-07-20 03:57:21 +0200 |
commit | 526b46963732ba525c098ca5cd194d8b4889e22a (patch) | |
tree | 469af39db48495d8a1747e48c0a18df7fb46315d /src/main/java/at/hannibal2/skyhanni/features | |
parent | b6a4614e91c74f748fabae832b8ef1f1b75c4410 (diff) | |
download | skyhanni-526b46963732ba525c098ca5cd194d8b4889e22a.tar.gz skyhanni-526b46963732ba525c098ca5cd194d8b4889e22a.tar.bz2 skyhanni-526b46963732ba525c098ca5cd194d8b4889e22a.zip |
Hide Not Rift-transferable items in Rift Transfer Chest as part of hide not clickable items feature
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt index f51b625e6..9b93e5293 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.bazaar.BazaarApi import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorFeatures +import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI import at.hannibal2.skyhanni.features.rift.everywhere.RiftAPI.motesNpcPrice import at.hannibal2.skyhanni.utils.* import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName @@ -16,6 +17,8 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.isEnchanted import at.hannibal2.skyhanni.utils.ItemUtils.isVanilla +import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.isRiftExportable +import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.isRiftTransferable import at.hannibal2.skyhanni.utils.StringUtils.removeColor import com.google.gson.JsonObject import net.minecraft.client.Minecraft @@ -172,15 +175,34 @@ class HideNotClickableItems { hideYourEquipment(chestName, stack) -> true hideComposter(chestName, stack) -> true hideRiftMotesGrubber(chestName, stack) -> true + hideRiftTransferChest(chestName, stack) -> true else -> { false } } } - private fun hideRiftMotesGrubber(chestName: String, stack: ItemStack): Boolean { -// if (!RiftAPI.inRift()) return false + private fun hideRiftTransferChest(chestName: String, stack: ItemStack): Boolean { + if (chestName != "Rift Transfer Chest") return false + + reverseColor = true + val riftTransferable = stack.isRiftTransferable() ?: return true + if (riftTransferable) { + return false + } + if (RiftAPI.inRift()) { + val riftExportable = stack.isRiftExportable() ?: return true + if (riftExportable) { + return false + } + } + + hideReason = "Not Rift-Transferable!" + return true + } + private fun hideRiftMotesGrubber(chestName: String, stack: ItemStack): Boolean { + if (!RiftAPI.inRift()) return false if (chestName != "Motes Grubber") return false reverseColor = true |