diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-24 19:47:08 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-24 19:47:08 +0100 |
commit | eb7f8ac4b8ddcb420e6e63cfda9d8db9941d1bf5 (patch) | |
tree | 3589b8f9826060925dd877be8294c4d411464a65 /src/main/java/at/hannibal2/skyhanni/utils | |
parent | 1ebc88de808bcfa107f640cc2ea9e3cd17b5cedf (diff) | |
download | skyhanni-eb7f8ac4b8ddcb420e6e63cfda9d8db9941d1bf5.tar.gz skyhanni-eb7f8ac4b8ddcb420e6e63cfda9d8db9941d1bf5.tar.bz2 skyhanni-eb7f8ac4b8ddcb420e6e63cfda9d8db9941d1bf5.zip |
Using neu's isVanilla method.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index 62546ee81..c22a72971 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -115,6 +115,10 @@ object ItemUtils { fun ItemStack.getInternalName() = NEUItems.getInternalName(this) + fun ItemStack.isVanilla() = NEUItems.isVanillaItem(this) + + fun ItemStack.isEnchanted() = isItemEnchanted + fun ItemStack.getSkullTexture(): String? { if (item != Items.skull) return null if (tagCompound == null) return null diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt index dec6964e2..d22a82759 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.utils +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import io.github.moulberry.notenoughupdates.NEUManager import io.github.moulberry.notenoughupdates.NotEnoughUpdates import io.github.moulberry.notenoughupdates.util.ItemResolutionQuery @@ -39,6 +40,8 @@ object NEUItems { return itemStack.copy() } + fun isVanillaItem(item: ItemStack) = manager.auctionManager.isVanillaItem(item.getInternalName()) + fun ItemStack.renderOnScreen(x: Float, y: Float) { GlStateManager.pushMatrix() val isSkull = item === Items.skull |