diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-28 12:02:28 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-09-28 12:02:28 +0200 |
| commit | ef6db162962e5e0831df244d63a1ef8c75c00868 (patch) | |
| tree | 90385628a4b8d204738056c8226c529425795e1c /src/main/java/at/hannibal2/skyhanni/data | |
| parent | 2ea43c913a9d4d28e7d12918ac62c5ffde0ac311 (diff) | |
| download | skyhanni-ef6db162962e5e0831df244d63a1ef8c75c00868.tar.gz skyhanni-ef6db162962e5e0831df244d63a1ef8c75c00868.tar.bz2 skyhanni-ef6db162962e5e0831df244d63a1ef8c75c00868.zip | |
Added support for slayer drops that go directly into the sack.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt index eb351d7d4..1989c5442 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt @@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.events.SlayerChangeEvent import at.hannibal2.skyhanni.events.SlayerProgressChangeEvent import at.hannibal2.skyhanni.events.SlayerQuestCompleteEvent import at.hannibal2.skyhanni.features.slayer.SlayerType -import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.nameWithEnchantment import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.nextAfter @@ -17,7 +16,6 @@ import at.hannibal2.skyhanni.utils.NEUItems.getPrice import at.hannibal2.skyhanni.utils.NumberUtil import at.hannibal2.skyhanni.utils.StringUtils.removeColor import com.google.common.cache.CacheBuilder -import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.concurrent.TimeUnit @@ -49,9 +47,6 @@ object SlayerAPI { // Spider "Cobweb" -> true - "String" -> true - "Spider Eye" -> true - "Bone" -> true // Blaze "Water Bottle" -> true @@ -59,9 +54,7 @@ object SlayerAPI { else -> false } - fun getItemNameAndPrice(stack: ItemStack): Pair<String, Double> { - val internalName = stack.getInternalName() - val amount = stack.stackSize + fun getItemNameAndPrice(internalName: NEUInternalName, amount: Int): Pair<String, Double> { val key = internalName to amount nameCache.getIfPresent(key)?.let { return it |
