aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/notenoughupdates/util
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-04 15:54:56 +0200
committernea <nea@nea.moe>2023-05-04 15:54:56 +0200
commit60ecfedf46e94344e6439a3a90c4c74ee65eeb2e (patch)
tree3bbc081ea1de971d343f438f12707909925d42fe /src/main/kotlin/moe/nea/notenoughupdates/util
parent4053a2995e845b48fdaf584f7a6787cd1e4dd4bc (diff)
downloadFirmament-60ecfedf46e94344e6439a3a90c4c74ee65eeb2e.tar.gz
Firmament-60ecfedf46e94344e6439a3a90c4c74ee65eeb2e.tar.bz2
Firmament-60ecfedf46e94344e6439a3a90c4c74ee65eeb2e.zip
Add parents to collapisble entries
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(