aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/notenoughupdates/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/notenoughupdates/util')
-rw-r--r--src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt b/src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt
index 8d7ef91..cc2d813 100644
--- a/src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt
+++ b/src/main/kotlin/moe/nea/notenoughupdates/util/SkyblockId.kt
@@ -1,14 +1,20 @@
package moe.nea.notenoughupdates.util
+import io.github.moulberry.repo.data.NEUItem
import io.github.moulberry.repo.data.Rarity
import kotlinx.serialization.Serializable
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.json.Json
import net.minecraft.item.ItemStack
import net.minecraft.nbt.NbtCompound
+import net.minecraft.util.Identifier
@JvmInline
-value class SkyblockId(val neuItem: String)
+value class SkyblockId(val neuItem: String) {
+ val identifier get() = Identifier("skyblockitem", neuItem.lowercase().replace(";", "__"))
+}
+
+val NEUItem.skyblockId get() = SkyblockId(skyblockItemId)
@Serializable
data class HypixelPetInfo(